[PATCH] D52986: [analyzer][PlistMacroExpansion] Part 4.: Support for __VA_ARGS__

Umann Kristóf via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 28 10:17:24 PST 2018


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__");
+
----------------
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.


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

https://reviews.llvm.org/D52986





More information about the cfe-commits mailing list