[PATCH] D52742: [analyzer][WIP] Add macro expansions to the plist output

Umann Kristóf via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 2 10:02:57 PDT 2018


Szelethus updated this revision to Diff 167966.
Szelethus added a comment.

- Prettified the `RUN:` lines,
- Fixed a crash with variadic macros,
- Added `TODO`s to handle `#` and `##`,
- Added an expected plist output.

I initially justified the size of this patch due to how intertwined everything is, but given that there's still some work left to do, I might end up splitting it up.

In https://reviews.llvm.org/D52742#1252441, @donat.nagy wrote:

> What would happen if this checker encounters a variadic macro (introduced to the standard in in C++11, see syntax (3) and (4) here <https://en.cppreference.com/w/cpp/preprocessor/replace>) or the `#` and `##` preprocessor operators?


Spot on observation, but it'll probably be the task of a followup patch.


https://reviews.llvm.org/D52742

Files:
  include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
  lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
  lib/StaticAnalyzer/Core/BugReporter.cpp
  lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
  test/Analysis/Inputs/expected-plists/plist-macros-with-expansion.cpp.plist
  test/Analysis/plist-macros-with-expansion.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52742.167966.patch
Type: text/x-patch
Size: 158428 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181002/699e7881/attachment-0001.bin>


More information about the cfe-commits mailing list