| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
and move the WarningOption struct into an anonymous namespace instead of clang namespace since it no longer needs to be forward declared in the header.
llvm-svn: 189569
|
|
|
|
|
|
| |
array. Then only store offsets into it in the OptionTable. Saves about 4K from the clang binary and removes 400 relocation entries from DiagnosticIDs.o.
llvm-svn: 189568
|
|
|
|
|
|
| |
~4K from clang binary.
llvm-svn: 189445
|
|
|
|
|
|
|
|
| |
The individual group and subgroups tables are now two large tables. The option table stores an index into these two tables instead of pointers. This reduces the size of the options tabe since it doesn't need to store pointers. It also reduces the number of relocations needed.
My build shows this reducing DiagnosticsIDs.o and the clang binary by ~20.5K. It also removes ~400 relocation entries from DiagnosticIDs.o.
llvm-svn: 189438
|
|
|
|
|
|
| |
consistency with other fields and to be explicit about bit count.
llvm-svn: 186796
|
|
|
|
| |
llvm-svn: 186795
|
|
|
|
|
|
|
|
|
|
| |
Diag ID is used throughout clang as a sentinel id meaning "this is an
invalid diagnostic id." Confusingly, Diag ID maps to a valid, usable,
diagnostic id. Instead, start diagnostic ids at ID one.
Incidently, remove an unused element from StaticDiagInfo.
llvm-svn: 186760
|
|
|
|
| |
llvm-svn: 186649
|
|
|
|
| |
llvm-svn: 186300
|
|
|
|
|
|
| |
These all appear in comments or (ironically) diagnostics output.
llvm-svn: 176383
|
|
|
|
|
|
| |
brought into 'clang' namespace by clang/Basic/LLVM.h
llvm-svn: 172323
|
|
|
|
|
|
|
|
|
|
|
|
| |
Patch by Will Dietz:
Minor touchup so the values of Offset/ID reflect their intention.
Previously, the sum (Offset+ID) was correct, but Offset/ID
individually were wrong.
Caught by investigating unsigned overflow reported by -fsanitize=integer.
llvm-svn: 171421
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of doing a binary search over the whole diagnostic table (which weighs
a whopping 48k on x86_64), use the existing enums to compute the index in the
table. This avoids loading any unneeded data from the table and avoids littering
CPU caches with it. This code is in a hot path for code with many diagnostics.
1% speedup on -fsyntax-only gcc.c, which emits a lot of warnings.
llvm-svn: 169890
|
|
|
|
|
|
|
|
|
| |
with -Werror. Previously, compiling with -Werror would emit only the first
warning in a compilation unit, because clang assumes that once an error occurs,
further analysis is unlikely to return valid results. However, warnings that
have been upgraded to errors should not be treated as "errors" in this sense.
llvm-svn: 169649
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
uncovered.
This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.
I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.
llvm-svn: 169237
|
|
|
|
|
|
|
|
|
|
|
| |
diagnostic count.
If a DiagnosticConsumer sub-class overwrites IncludeInDiagnosticCounts,
this should change diagnostic counts. However, it currently also
influences Diag.ErrorOccurred, which in turn influences the behavior of
parsing and semantic analysis (in a way that can make it crash).
llvm-svn: 164824
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
diagnostics implemented -- see testcases.
I created a new TableGen file for comment diagnostics,
DiagnosticCommentKinds.td, because comment diagnostics don't logically
fit into AST diagnostics file. But I don't feel strongly about it.
This also implements support for self-closing HTML tags in comment
lexer and parser (for example, <br />).
In order to issue precise diagnostics CommentSema needs to know the
declaration the comment is attached to. There is no easy way to find a decl by
comment, so we match comments and decls in lockstep: after parsing one
declgroup we check if we have any new, not yet attached comments. If we do --
then we do the usual comment-finding process.
It is interesting that this automatically handles trailing comments.
We pick up not only comments that precede the declaration, but also
comments that *follow* the declaration -- thanks to the lookahead in
the lexer: after parsing the declgroup we've consumed the semicolon
and looked ahead through comments.
Added -Wdocumentation-html flag for semantic HTML errors to allow the user to
disable only HTML warnings (but not HTML parse errors, which we emit as
warnings in -Wdocumentation).
llvm-svn: 160078
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we'd halt at the fatal error as expected, but not actually emit
any -verify-related diagnostics. This lets us catch cases that emit a
/different/ fatal error from the one we expected.
This is implemented by adding a "force emit" mode to DiagnosticBuilder, which
will cause diagnostics to immediately be emitted regardless of current
suppression. Needless to say this should probably be used /very/ sparingly.
Patch by Andy Gibbs! Tests for all of Andy's -verify patches coming soon.
llvm-svn: 160053
|
|
|
|
|
|
|
|
|
|
|
| |
the new Objective-C NSArray/NSDictionary/NSNumber literal syntax.
This introduces a new library, libEdit, which provides a new way to support
migration of code that improves on the original ARC migrator. We now believe
that most of its functionality can be refactored into the existing libraries,
and thus this new library may shortly disappear.
llvm-svn: 152141
|
|
|
|
|
|
| |
Reviewed by Ted Kremenek.
llvm-svn: 150616
|
|
|
|
|
|
|
|
| |
option table instead of storing the name.
Another 8 bytes + relocation removed from every diagnostic on x86_64.
llvm-svn: 150615
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This option was added in r129614 and doesn't have any use case that I'm aware
of. It's possible that external tools are using these names - and if that's
the case we can certainly reassess the functionality, but for now it lets us
shave out a few unneeded bits from clang.
Move the "StaticDiagNameIndex" table into the only remaining consumer, diagtool.
This removes the actual diagnostic name strings from clang entirely.
Reviewed by Chris Lattner & Ted Kremenek.
llvm-svn: 150612
|
|
|
|
|
|
|
|
| |
unused and wasted space for nothing.
- per PR11952.
llvm-svn: 150199
|
|
|
|
|
|
| |
the limit on the number of fixits.
llvm-svn: 149676
|
|
|
|
|
|
|
|
|
| |
-Wno-everything remap all warnings to ignored.
We can now use "-Wno-everything -W<warning>" to ignore all warnings except
specific ones.
llvm-svn: 149121
|
|
|
|
|
|
| |
This allows -Wswitch-enum to find switches that need updating when these enums are modified.
llvm-svn: 148281
|
|
|
|
|
|
|
| |
diagnostics. Conflating them was highly confusing and makes it harder to
establish a firm layering separation between these two libraries.
llvm-svn: 146207
|
|
|
|
| |
llvm-svn: 145293
|
|
|
|
|
|
|
|
| |
don't display either.
Also add a maximum edit distance threshold, so we don't correct "-Wx" to "-W#pragma-messages".
llvm-svn: 144644
|
|
|
|
|
|
|
| |
$ clang -Wololo t.c
warning: unknown warning option '-Wololo'; did you mean '-Wall'? [-Wunknown-warning-option]
llvm-svn: 144591
|
|
|
|
|
|
| |
<rdar://problem/10245086>.
llvm-svn: 142571
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes clang to match GCC's behavior for __extension__, which temporarily
disables the -pedantic flag. Warnings that are enabled without -pedantic
are not affected. Besides the general goodness of matching GCC's precedent,
my motivation for this is that macros in the arm_neon.h header need to use
__extension__ to avoid pedantic complaints about their use of statement
expressions, yet we still want to warn about incompatible pointer arguments
for those macros.
llvm-svn: 141804
|
|
|
|
|
|
| |
is done, and add a note that the new setDiagnosticGroup{...} methods only operate on the current diagnostic state.
llvm-svn: 140771
|
|
|
|
|
|
|
|
| |
be straighter line code, use the new DiagnosticMappingInfo flags, and eliminate the odd MAP_WARNING_NO_WERROR and friend mappings.
- This fixes a host of obscure bugs with regards to how warning mapping options composed with one another, and I believe makes the code substantially easier to read and reason about.
llvm-svn: 140770
|
|
|
|
|
|
|
|
| |
"no-warning-as-error", "no-error-as-fatal", and "show-in-system-header", and update DiagnosticsEngine::setDiagnosticGroup{WarningAsError,ErrorAsFatal} and GetDefaultDiagMappingInfo to set them appropriately.
- No actual functionality change for now, we still also use the diag::Mapping::{MAP_WARNING_NO_ERROR,MAP_ERROR_NO_FATAL,MAP_WARNING_SHOW_IN_SYSTEM_HEADER} for a little while longer.
llvm-svn: 140768
|
|
|
|
|
|
|
| |
that in DiagnosticEngine instead of the convoluted calling into DiagnosticIDs
which then calls back into the DiagnosticsEngine.
llvm-svn: 140766
|
|
|
|
|
|
| |
- Also, spell const_iterator as const_iterator.
llvm-svn: 140765
|
|
|
|
|
|
|
| |
storing mappings with that instead of straying some magic constants about the
source.
llvm-svn: 140760
|
|
|
|
|
|
| |
worth methodizing.
llvm-svn: 140759
|
|
|
|
|
|
| |
killed the sole client.
llvm-svn: 140756
|
|
|
|
|
|
|
|
| |
TextDiagnosticPrinter to use that instead of extracting the current mapping via getDiagnosticLevel, which fixes one class of corner cases w.r.t. printing the "-Werror" diagnostic option marker.
- The TextDiagnosticPrinter code is still fragile as it is just "reverse engineering" what the diagnostic engine is doing. Not my current priority to fix though.
llvm-svn: 140752
|
|
|
|
|
|
|
| |
"show-in-system-header" bits, which is part of teasing them apart from the
diagnostic mapping kind.
llvm-svn: 140742
|
|
|
|
| |
llvm-svn: 140493
|
|
|
|
| |
llvm-svn: 140478
|
|
|
|
| |
llvm-svn: 140368
|
|
|
|
| |
llvm-svn: 140367
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mapped to be ignored.
Currently this includes -pedantic warnings as well; we'll need to consider whether these should
be included.
This works as expected with -Werror.
Test cases were added to Sema/warn-unused-parameters.c, but they should probably be broken off into
their own test file.
llvm-svn: 137910
|
|
|
|
|
|
| |
messages. Fi from David Blaikie, tests from Nikola Smiljanic!
llvm-svn: 137851
|
|
|
|
| |
llvm-svn: 137552
|
|
|
|
|
|
| |
in the internal table of DiagnosticIDs.
llvm-svn: 137108
|