summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/Sema.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2015-08-15 01:18:16 +0000
committerHans Wennborg <hans@hanshq.net>2015-08-15 01:18:16 +0000
commit99000c24c9c08773bb74fede3ed07d6bfd95d538 (patch)
treed7d4dbba37c6c7bf562f6416cae8cb8d4f902eac /clang/lib/Sema/Sema.cpp
parent3a4a60cba5faf2691403206b48b26fca4f666d7c (diff)
downloadbcm5719-llvm-99000c24c9c08773bb74fede3ed07d6bfd95d538.tar.gz
bcm5719-llvm-99000c24c9c08773bb74fede3ed07d6bfd95d538.zip
Delay emitting members of dllexport classes until the class is fully parsed (PR23542)
This enables Clang to correctly handle code such as: struct __declspec(dllexport) S { int x = 42; }; where it would otherwise error due to trying to generate the default constructor before the in-class initializer for x has been parsed. Differential Revision: http://reviews.llvm.org/D11850 llvm-svn: 245139
Diffstat (limited to 'clang/lib/Sema/Sema.cpp')
-rw-r--r--clang/lib/Sema/Sema.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index 9ee6b819a85..b8c290672e1 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -691,6 +691,9 @@ void Sema::ActOnEndOfTranslationUnit() {
assert(DelayedDefaultedMemberExceptionSpecs.empty());
assert(DelayedExceptionSpecChecks.empty());
+ // All dllexport classes should have been processed already.
+ assert(DelayedDllExportClasses.empty());
+
// Remove file scoped decls that turned out to be used.
UnusedFileScopedDecls.erase(
std::remove_if(UnusedFileScopedDecls.begin(nullptr, true),
OpenPOWER on IntegriCloud