Commit Graph

13 Commits

Author SHA1 Message Date
Chris Lattner f9150bac01 arrange for -Wno-error=foo warnings to be immune to -Werror as
they are supposed to be.

llvm-svn: 69265
2009-04-16 04:32:54 +00:00
Chris Lattner f5f049b548 add another sanity check for -Werror=xx
llvm-svn: 69157
2009-04-15 07:05:12 +00:00
Chris Lattner 5ea5dc8a3a add a missing &&
llvm-svn: 69156
2009-04-15 07:03:57 +00:00
Chris Lattner e9dba48684 fix a broken test, that passed for the wrong reason. Two wrongs make a right! :)
llvm-svn: 69155
2009-04-15 07:02:57 +00:00
Chris Lattner e007de3b9a Rejigger how -pedantic and -pedantic-errors work and their interaction
with other diagnostic mapping.  In the new scheme, -Wfoo or -Wno-foo or 
-Werror=foo all override the -pedantic options, and __extension__ 
robustly silences all extension diagnostics in their scope.

An added bonus of this change is that MAP_DEFAULT goes away, meaning that
per-diagnostic mapping information can now be stored in 2 bits, doubling
the density of the Diagnostic::DiagMapping array.  This also 
substantially simplifies Diagnostic::getDiagnosticLevel.

OTOH, this temporarily introduces some "macro intensive" code in 
Diagnostic.cpp.  This will be addressed in a later patch.

llvm-svn: 69154
2009-04-15 07:01:18 +00:00
Daniel Dunbar a45cf5b6b0 Rename clang to clang-cc.
Tests and drivers updated, still need to shuffle dirs.

llvm-svn: 67602
2009-03-24 02:24:46 +00:00
Chris Lattner e07ea35817 fix PR3798 by ignoring all diagnostics generated while repreprocessing a file in rewrite macros.
llvm-svn: 66961
2009-03-13 21:44:46 +00:00
Chris Lattner 7253991f9d add \n characters to the scratch buffer *before* returned tokens.
This prevents caret diagnostics from the scratch buffer from 
including other tokens in the scratch buffer that occurred beforei
them.

llvm-svn: 66375
2009-03-08 08:16:41 +00:00
Chris Lattner 59da739613 Fix PR3635 by handling ## magically
llvm-svn: 65374
2009-02-24 05:29:33 +00:00
Chris Lattner 9ef847be12 Fix rdar://6562329, a static analyzer crash Ted noticed on
wine sources.  This was happening because HighlightMacros was 
calling EnterMainFile multiple times on the same preprocessor
object and getting an assert due to the new #line stuff (the
file in question was bison output with #line directives).

The fix for this is to not reenter the file.  Instead, 
relex the tokens in raw mode, swizzle them a bit and repreprocess
the token stream.  An added bonus of this is that rewrite macros
will now hilight the macro definition as well as its uses.  Woo.

llvm-svn: 64480
2009-02-13 19:33:24 +00:00
Chris Lattner 7f33544cc7 fix bogus run line.
llvm-svn: 54940
2008-08-18 19:54:48 +00:00
Ted Kremenek 0883fd5817 Removed option "-parse-ast-check" from clang driver. This is now implemented
using "-parse-ast -verify".

Updated all test cases (using a sed script) that invoked -parse-ast-check to
now use -parse-ast -verify.

Fixed a bug where using "-verify" instead of "-parse-ast-check" would not
correctly create the DiagClient needed to accumulate diagnostics.

llvm-svn: 42365
2007-09-26 20:14:22 +00:00
Chris Lattner ac9823bc5d Build ASTs before relexing the file. This avoids having comment finding mutate the
preprocessor state, causing bogus diagnostics when the file is parsed for real.  This
implements Misc/diag-checker.c.  Thanks to Ted for noticing this.

llvm-svn: 41000
2007-08-10 18:27:41 +00:00