[PATCH] Warn on malformed header guards
Richard Smith
richard at metafoo.co.uk
Tue Jun 11 19:44:15 PDT 2013
LGTM with one suggested change (and corresponding test).
================
Comment at: include/clang/Lex/MultipleIncludeOpt.h:103
@@ +102,3 @@
+ bool getImmediatelyAfterTopLevelIfndef() const {
+ return ImmediatelyAfterTopLevelIfndef;
+ }
----------------
Maybe this should be "ImmediatelyAfterTopLevelIfndef && !ReadAnyTokens"? I think we don't want this to fire on:
#ifndef FOO
some stuff here
#define BAR
#endif
http://llvm-reviews.chandlerc.com/D898
More information about the cfe-commits
mailing list