diff options
author | Hans Wennborg <hans@chromium.org> | 2019-12-02 16:25:23 +0100 |
---|---|---|
committer | Hans Wennborg <hans@chromium.org> | 2019-12-04 13:13:41 +0100 |
commit | 92ce2aff680e31a726c17267e36ff13a1ef31696 (patch) | |
tree | 394f03abf97544cbfb3d967cd73e031089a05086 /clang/lib/Sema/SemaDeclCXX.cpp | |
parent | 201d91daad4fe9c0b0233a2fa15f8c5fbccea2d9 (diff) | |
download | bcm5719-llvm-92ce2aff680e31a726c17267e36ff13a1ef31696.tar.gz bcm5719-llvm-92ce2aff680e31a726c17267e36ff13a1ef31696.zip |
Actually delay processing DelayedDllExportClasses until the outermost class is finished (PR40006)
This was already the intention of DelayedDllExportClasses, but code such as
this would break it:
template<typename> struct Tmpl {};
struct Outer {
struct Inner {
__declspec(dllexport) Inner() = default;
unsigned int x = 0;
};
Tmpl<Inner> y;
};
ActOnFinishCXXNonNestedClass() would get called when the instantiation of
Templ<Inner> is finished, even though the compiler is still not finished with
Outer, causing the compile fail.
This hooks into Sema::{Push,Pop}ParsingClass() to avoid calling
ActOnFinishCXXNonNestedClass() for template instantiations while a class is
being parsed.
Differential revision: https://reviews.llvm.org/D70905
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 36f7bb320e0..cc3510b0d47 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -11829,7 +11829,7 @@ void Sema::ActOnFinishCXXMemberDecls() { } } -void Sema::ActOnFinishCXXNonNestedClass(Decl *D) { +void Sema::ActOnFinishCXXNonNestedClass() { referenceDLLExportedClassMethods(); if (!DelayedDllExportMemberFunctions.empty()) { |