Szelethus marked 2 inline comments as done.
Szelethus added inline comments.


================
Comment at: lib/StaticAnalyzer/Core/PlistDiagnostics.cpp:884
+  // even if we lex a tok::comma and ParanthesesDepth == 1.
+  const IdentifierInfo *__VA_ARGS__II = PP.getIdentifierInfo("__VA_ARGS__");
+
----------------
Szelethus wrote:
> xazax.hun wrote:
> > Is it possible to undef `__VA_ARGS__`? If so, can this cause problems? 
> > Should we use `findDirectiveAtLoc` instead?
> Luckily, no :)
> 
> But, even if you could, we're not looking for a `MacroInfo` (through 
> `MacroDirective`), but rather an `IdentifierInfo`, and those won't disappear 
> even if you undef a macro.
Hmmm, simply acquiring the range of tokens `__VA_ARGS__` is defined to in the 
expansion context would be neat, but it doesn't seem to be possible. It seems 
like `__VA_ARGS__` just doesn't have a `MacroDirective`.

In fact, if you CTRL+F "variadic" on `Preprocessor`'s doxygen page, you get 
basically nothing (if you look for `__VA_ARGS__`, you get //literally// 
nothing). Sooooo working with the most primitive tools available is the best I 
can do here, I'm afraid :/


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D52986/new/

https://reviews.llvm.org/D52986



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to