[PATCH] D86135: [analyzer][MacroExpansion] Fix a crash where multiple parameters resolved to __VA_ARGS__

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 24 06:59:31 PDT 2020


martong added a comment.

I can feel your pain.

> The fundamental problem is, we simply can't ask Preprocessor what a macro expands into without hacking really hard.

Can you summarize what is the exact problem (or give a link to a discussion, etc)? Is it an architectural problem in Clang itself? Could we somehow refactor Clang and the Preprocessor to be usable for us? I mean LLVM and Clang has the mindset to build reusable components, the Preprocessor (and the Sema) should be one of them too, not just the AST.



================
Comment at: clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp:910
+
+  void injextRange(const ArgTokensTy &Range) {
+    TokenRange = Range;
----------------
typo? `injectRange` ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86135



More information about the cfe-commits mailing list