[PATCH] D52795: [analyzer][PlistMacroExpansion] Part 3.: Macro arguments are expanded

Umann Kristóf via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 16 11:45:33 PDT 2018


Szelethus added inline comments.


================
Comment at: lib/StaticAnalyzer/Core/PlistDiagnostics.cpp:677
+/// need to expanded further when it is nested inside another macro.
+class MacroArgMap : public std::map<const IdentifierInfo *, ExpArgTokens> {
+public:
----------------
george.karpenkov wrote:
> Please don't do this, inheritance from standard containers is a bad thing (tm)
Actually, I disagree with you on this one. For ease of use, these constructs are used all over the place in the LLVM codebase, and since I never do anything inheritance related, this shouldn't hurt much.

https://clang.llvm.org/doxygen/classclang_1_1ento_1_1PathPieces.html
http://llvm.org/doxygen/classllvm_1_1PredicateBitsetImpl.html
http://llvm.org/doxygen/classllvm_1_1HexagonBlockRanges_1_1RangeList.html

These are just a few.

Do you insist?


https://reviews.llvm.org/D52795





More information about the cfe-commits mailing list