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.
Paths
| Differential D11850
Delay emitting members of dllexport classes until the class is fully parsed (PR23542) ClosedPublic Authored by hans on Aug 7 2015, 3:48 PM.
Details Summary 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.
Diff Detail Event TimelineThis revision is now accepted and ready to land.Aug 14 2015, 4:45 PM Closed by commit rL245139: Delay emitting members of dllexport classes until the class is fully parsed… (authored by hans). · Explain WhyAug 14 2015, 6:19 PM This revision was automatically updated to reflect the committed changes. Comment Actions
Sorry, I saw the bug but didn't have time to look at it yet. I will try to get to it tomorrow.
Revision Contents
Diff 32201 include/clang/Sema/Sema.h
lib/Parse/ParseDeclCXX.cpp
lib/Sema/Sema.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaTemplateInstantiate.cpp
test/CodeGenCXX/dllexport.cpp
|
Can we bail out of the function early in this case?