================ @@ -3425,7 +3425,13 @@ NamedDecl *ASTDeclReader::getAnonymousDeclForMerging(ASTReader &Reader, // If this is the first time, but we have parsed a declaration of the context, // build the anonymous declaration list from the parsed declaration. auto *PrimaryDC = getPrimaryDCForAnonymousDecl(DC); - if (PrimaryDC && !cast<Decl>(PrimaryDC)->isFromASTFile()) { + auto InstantiatedLocally = [](Decl *D, SourceManager &SourceMgr) -> bool { + auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(D); + return CTSD && CTSD->getPointOfInstantiation().isValid() && + SourceMgr.isLocalSourceLocation(CTSD->getPointOfInstantiation()); ---------------- mpark wrote:
Ah... great point. Let me see if I can capture this into a bit flag instead. https://github.com/llvm/llvm-project/pull/155948 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits