Commit Graph

14 Commits

Author SHA1 Message Date
Dmitrii Galimzianov
28883b6654 [Diagnostics] Add -[no-]warning-as-error flags for precise control over warning behavior
This commit adds new compiler options -no-warning-as-error/-warning-as-error which allows users to specify behavior for exact warnings and warning groups.
2024-09-07 01:14:43 +02:00
Tim Kientzle
1d961ba22d Add #include "swift/Basic/Assertions.h" to a lot of source files
Although I don't plan to bring over new assertions wholesale
into the current qualification branch, it's entirely possible
that various minor changes in main will use the new assertions;
having this basic support in the release branch will simplify that.
(This is why I'm adding the includes as a separate pass from
rewriting the individual assertions)
2024-06-05 19:37:30 -07:00
Owen Voorhees
68e6065c8e [Diagnostics][NFC] Introduce Structured fix-its
These are defined with macros like errors/warnings/notes, and
make use of format strings and diagnostic arguments. The intent
is to leverage diagnostic arguments in the future to disambiguate
ambiguously spelled types.

Ported a few miscellaneous fix-its to the new system
2019-09-05 10:43:25 -07:00
Jordan Rose
c1e4be1ad2 Catch llvm::report_fatal_error and try to emit a proper diagnostic. (#8639)
This only affects the textual output, but should still improve the
experience when we /do/ hit one of these LLVM errors. In addition to
showing up better in Xcode, it'll also give us a proper
PrettyStackTrace because of the call to abort() instead of exit(1).

(There's a bit of finger-crossing that the act of printing the
diagnostic doesn't cause more errors. I only tested the fallback
path a little.)
2017-04-10 10:40:03 -07:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
Michael Gottesman
1af1cbfb76 [gardening] Add a bunch of end namespace comments found by clang-tidy. 2016-12-06 19:22:52 -08:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
Michael Ilseman
de0062e437 [Diagnostics] Remove all categories
Diagnostic categories are entirely unused and arguably useless as
implemented, as they merely denote the sub-component of the
compiler.

As far as categorizing warnings are concerned, I'm abandoning the
effort for now, as the utility is marginal and Swift and the Swift
compiler are probalby not ready for these to be nailed down. For the
sake of cleanliness, the CATEGORY field is also stripped from
WARNINGS.

If there's a need for automatic identifying of compiler sub-components
for diagnstics in the future, there are better ways to do this.

NFC
2016-01-14 14:39:18 -08:00
practicalswift
1339b5403b Consistent use of header comment format.
Correct format:
//===--- Name of file - Description ----------------------------*- Lang -*-===//
2016-01-04 13:26:31 +01:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Chris Lattner
bc481f0fe1 implement <rdar://problem/16859927> remove the underscore in "auto_closure"
autoclosure is one work, not two.



Swift SVN r20253
2014-07-21 15:23:50 +00:00
Jordan Rose
11008f0ed1 Split diagnostics out into separate files.
Thanks to the way we've set up our diagnostics engine, there's not actually
a reason for /everything/ to get rebuilt when /one/ diagnostic changes.
I've split them up into five categories for now: Parse, Sema, SIL, IRGen,
and Frontend, plus a set of "Common" diagnostics that are used in multiple
areas of the compiler. We can massage this later.

No functionality change, but should speed up compile times!

Swift SVN r12438
2014-01-17 00:15:12 +00:00
Jordan Rose
69a8860a53 Move diagnostics enum out-of-line.
Groundwork for splitting up Diagnostics.def.

Swift SVN r12437
2014-01-17 00:15:10 +00:00
Chris Lattner
96f6398f8d rename Diagnostics.cpp -> DiagnosticList.cpp, it keeps confusing me.
Swift SVN r1773
2012-05-08 18:29:02 +00:00