]> granicus.if.org Git - clang/commit
Delay emitting members of dllexport classes until the class is fully parsed (PR23542)
authorHans Wennborg <hans@hanshq.net>
Sat, 15 Aug 2015 01:18:16 +0000 (01:18 +0000)
committerHans Wennborg <hans@hanshq.net>
Sat, 15 Aug 2015 01:18:16 +0000 (01:18 +0000)
commit6cc4f84bf426a1181d10bb3c1dd71735f8d54708
treec156b3430a16c37e5543a797675fe71bb5cbdba6
parent241bfa20d3f4d11859b72a2f5bce056ba1a20f88
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@245139 91177308-0d34-0410-b5e6-96231b3b80d8
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