tk1012 added a comment.




================
Comment at: lib/AST/ASTImporter.cpp:1634
   RecordDecl *PrevDecl = nullptr;
-  if (!DC->isFunctionOrMethod()) {
+  if (!DC->isFunctionOrMethod() && SearchName.getAsString() != "") {
     SmallVector<NamedDecl *, 4> ConflictingDecls;
----------------
According to include/clang/AST/Decl.h file, we cannot use 
"RecordDecl::isAnonymousStructOrUnion()" here because "struct { int a; } A;" is 
not an anonymous struct but is unnamed.


https://reviews.llvm.org/D39886



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to