[all-commits] [llvm/llvm-project] 92ce2a: Actually delay processing DelayedDllExportClasses ...
Hans via All-commits
all-commits at lists.llvm.org
Wed Dec 4 04:24:52 PST 2019
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 92ce2aff680e31a726c17267e36ff13a1ef31696
https://github.com/llvm/llvm-project/commit/92ce2aff680e31a726c17267e36ff13a1ef31696
Author: Hans Wennborg <hans at chromium.org>
Date: 2019-12-04 (Wed, 04 Dec 2019)
Changed paths:
M clang/include/clang/Sema/Sema.h
M clang/lib/Parse/ParseDeclCXX.cpp
M clang/lib/Sema/SemaDeclCXX.cpp
M clang/lib/Sema/SemaTemplateInstantiate.cpp
M clang/test/CodeGenCXX/dllexport.cpp
Log Message:
-----------
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
More information about the All-commits
mailing list