|  | Commit message (Collapse) | Author | Age | Files | Lines | 
|---|
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | the second pass reports warnings/errors.  This has the effect that we follow 
the more canonical "last option wins" paradigm when there are conflicting 
options.
rdar://10383776
Previously, we parsed the warning options in order.  This caused non-intuitive
behavior:
1) clang test.c -Wnosuchwarning -Wno-unknown-warning-option
Before:
warning: unknown warning option '-Wnosuchwarning' [-Wunknown-warning-option]
1 warning generated.
After:
[0 warning generated.]
2) clang test.c -Wnosuchwarning -Werror=unknown-warning-option
Before:
warning: unknown warning option '-Wnosuchwarning' [-Wunknown-warning-option]
1 warning generated.
After:
error: unknown warning option '-Wnosuchwarning' [-Werror,-Wunknown-warning-option]
3) clang test.c -Werror=unknown-warning-option -Wnosuchwarning -Wno-error=unknown-warning-option -Wnosuchwarning
Before:
error: unknown warning option '-Wnosuchwarning' [-Werror,-Wunknown-warning-option]
warning: unknown warning option '-Wnosuchwarning' [-Wunknown-warning-option]
After:
warning: unknown warning option '-Wnosuchwarning' [-Wunknown-warning-option]
warning: unknown warning option '-Wnosuchwarning' [-Wunknown-warning-option]
2 warnings generated.
4) clang test.c -Werror=unknown-warning-option -Wnosuchwarning -Wno-error=unknown-warning-option -Wno-unknown-warning-option -Wnosuchwarning
Before:
error: unknown warning option '-Wnosuchwarning' [-Werror,-Wunknown-warning-option]
After:
[0 warning generated.]
llvm-svn: 143657 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | DiagnosticsEngine::setDiagnosticGroup{ErrorAsFatal,WarningAsError} methods which
more accurately model the correct API -- no internal change to the diagnostics
engine yet though.
 - Also, stop honoring -Werror=everything (etc.) as a valid (but oddly behaved) option.
llvm-svn: 140747 | 
| | 
| 
| 
| | llvm-svn: 140478 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | 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 | 
| | 
| 
| 
| 
| 
| 
| 
| | LLVM.h imports
them into the clang namespace.
llvm-svn: 135852 | 
| | 
| 
| 
| 
| 
| | passing -Wunknown-warning-option will re-enable warnings about -Wno-foo.
llvm-svn: 132570 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | Patch by Matthieu Monrocq with tweaks by me to avoid StringRefs in the static
diagnostic data structures, which resulted in a huge global-var-init function.
Depends on llvm commit r132046.
llvm-svn: 132047 | 
| | 
| 
| 
| 
| 
| 
| | candidates printed.  We default to 'all'.  At the moment, 'best' prints only
the first 4 overloads, but we'll improve that over time.
llvm-svn: 105815 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | we will print with each error that occurs during template
instantiation. When the backtrace is longer than that, we will print
N/2 of the innermost backtrace entries and N/2 of the outermost
backtrace entries, then skip the middle entries with a note such as:
  note: suppressed 2 template instantiation contexts; use
  -ftemplate-backtrace-limit=N to change the number of template
  instantiation entries shown
This should eliminate some excessively long backtraces that aren't
providing any value.
llvm-svn: 101882 | 
| | 
| 
| 
| | llvm-svn: 100687 | 
| | 
| 
| 
| | llvm-svn: 98721 | 
| | 
| 
| 
| 
| 
| | of printf, patch by Christian Adaker!
llvm-svn: 92019 | 
| | 
| 
| 
| | llvm-svn: 91938 | 
| | 
| 
| 
| | llvm-svn: 86968 | 
| | 
| 
| 
| | llvm-svn: 86760 | 
| | 
| 
| 
| | llvm-svn: 81346 | 
| | 
| 
| 
| 
| 
| 
| | -Wno-error disables WarningsAsErrors instead of
mistakenly being treated like -Werror
llvm-svn: 78987 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | not *fprintf*!
Among other things, this makes the warning about unknown warning options mappable.
For example:
$ clang t.c -Werror -Wfoo
error: unknown warning option '-Wfoo' [-Wunknown-warning-option]
For another thing, they are properly color coded now too :)
llvm-svn: 73936 | 
| | 
| 
| 
| | llvm-svn: 72101 | 
|  | files to lib/Frontend.
llvm-svn: 72099 |