diff --git a/.gitignore b/.gitignore index 20c4f52cd37860..361fae3f420e2b 100644 --- a/.gitignore +++ b/.gitignore @@ -70,3 +70,5 @@ pythonenv* /clang/utils/analyzer/projects/*/RefScanBuildResults # automodapi puts generated documentation files here. /lldb/docs/python_api/ +.github/workflows/llvm.msi +.github/workflows/llvm.wixpdb diff --git a/clang/include/clang/ASTMatchers/ASTMatchers.h b/clang/include/clang/ASTMatchers/ASTMatchers.h index 8e26234b8e2a3b..2320ed9eec7864 100644 --- a/clang/include/clang/ASTMatchers/ASTMatchers.h +++ b/clang/include/clang/ASTMatchers/ASTMatchers.h @@ -3946,6 +3946,11 @@ AST_POLYMORPHIC_MATCHER(isMissingDllImportOrExport, VarDecl)) { bool PermittedToExport = false; if (const CXXRecordDecl *CXXD = dyn_cast(&Node)) { + if (isa(CXXD->getParent())) { + // This type declaration is part of a template, and therefore can not be + // exported. + return false; + } if (const VarDecl *CXXDVD = dyn_cast_or_null(CXXD->getNextDeclInContext())) { if (CXXDVD != nullptr && @@ -3974,8 +3979,8 @@ AST_POLYMORPHIC_MATCHER(isMissingDllImportOrExport, PermittedToExport = VD->hasGlobalStorage() && VD->getStorageClass() != SC_Static; } - return PermittedToExport && (!Node.hasAttr()) && - (!Node.hasAttr()); + return PermittedToExport && (!(Node.hasAttr())) && + (!(Node.hasAttr())); } // @unreal: END