[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:47:22 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:
----------------
Szelethus wrote:
> 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?
I mean, polymorphism, not inheritance.


https://reviews.llvm.org/D52795





More information about the cfe-commits mailing list