Commit Graph

4 Commits

Author SHA1 Message Date
Richard Smith 089ee1554c PR16339: Don't produce a diagnostic pointing at the whitespace between a '#if'
and a '!defined(X)' if we find a broken header guard. This is suboptimal; we
should point the diagnostic at the 'X' token not the 'if' token, but it fixes
the crash.

llvm-svn: 184054
2013-06-16 05:05:39 +00:00
Richard Trieu 33a4b3db0d Introducing -Wheader-guard, a warning that checks header guards actually work
properly.  This warning checks that the #ifndef and #define directives at
the beginning of a header refer to the same macro name.  Includes a fix-it
hint to correct the header guard.

llvm-svn: 183867
2013-06-12 21:20:57 +00:00
Daniel Dunbar cb08212fd5 tests: Use FileCheck instead of external input; I think this test was failing on
Win32 because of line ending differences.

llvm-svn: 109029
2010-07-21 19:40:01 +00:00
Douglas Gregor af82e3510b Introduce a new lexer function to compute the "preamble" of a file,
which is the part of the file that contains all of the initial
comments, includes, and preprocessor directives that occur before any
of the actual code. Added a new -print-preamble cc1 action that is
only used for testing.

llvm-svn: 108913
2010-07-20 20:18:03 +00:00