================
Comment at: tools/clang/lib/Lex/MacroInfo.cpp:64
@@ +63,3 @@
+  for (const MacroInfo *MI = this; MI; MI = MI->PreviousDefinition) {
+    if (!SM.getFileEntryForID(SM.getFileID(MI->Location)) ||
+        SM.isBeforeInTranslationUnit(MI->Location, L))
----------------
Richard Smith wrote:
> Alexander Kornienko wrote:
> > Richard Smith wrote:
> > > Under what circumstances is this test necessary?
> > It's intended to handle a case when a macro is defined via command line. 
> > Does isBeforeInTranslationUnit handle this case?
> Yes, isBeforeInTranslationUnit should handle that.
Checking isValid, as command-line macros have no valid location.

================
Comment at: tools/clang/lib/Sema/AnalysisBasedWarnings.cpp:748
@@ +747,3 @@
+  Tokens.push_back(T);
+  T.setFlag(Token::DisableExpand);
+  Tokens.push_back(T);
----------------
This hack is used to pass to information, that we need hasLeadingSpace check, 
to MacroDefinitionEquals.
Is there a better way to do this?


http://llvm-reviews.chandlerc.com/D50
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to