a.sidorin added a comment. Hello Takafumi,
Thank you for this patch. Looks like you're trying to disable lookup for similar structures if the structure is anonymous but there are two things I'm worrying about this solution. 1. Are import conflicts for anonymous structures resolved correctly? 2. Are equal structures present in both TUs imported correctly, without duplication? Could you please check this and add tests if possible? ================ Comment at: lib/AST/ASTImporter.cpp:1634 RecordDecl *PrevDecl = nullptr; - if (!DC->isFunctionOrMethod()) { + if (!DC->isFunctionOrMethod() && SearchName.getAsString() != "") { SmallVector<NamedDecl *, 4> ConflictingDecls; ---------------- D->isAnonymousStructOrUnion()? ================ Comment at: unittests/AST/ASTImporterTest.cpp:503 + has( + declStmt( + has( ---------------- Broken indentation? https://reviews.llvm.org/D39886 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits