[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 21 03:25:04 PST 2018


martong added inline comments.


================
Comment at: lib/AST/DeclBase.cpp:1469
         assert(Pos != Map->end() && "no lookup entry for decl");
-        if (Pos->second.getAsVector() || Pos->second.getAsDecl() == ND)
+        // Remove the decl only if it is contained.
+        if ((Pos->second.getAsVector() && Pos->second.containsInVector(ND)) ||
----------------
Szelethus wrote:
> Contained in?
Indeed, `containedInVector` sounds better, so I renamed.


Repository:
  rC Clang

https://reviews.llvm.org/D53655





More information about the cfe-commits mailing list