Fix another case where the extern-ness of extern "C" wasn't being captured.
This makes me think that we should make hasExternalStorage perform this check... llvm-svn: 71962
This commit is contained in:
parent
5b53576fe4
commit
7bf3c4227d
|
@ -2703,7 +2703,8 @@ void Sema::ActOnUninitializedDecl(DeclPtrTy dcl) {
|
|||
QualType InitType = Type;
|
||||
if (const ArrayType *Array = Context.getAsArrayType(Type))
|
||||
InitType = Array->getElementType();
|
||||
if (!Var->hasExternalStorage() && InitType->isRecordType()) {
|
||||
if ((!Var->hasExternalStorage() && !Var->isExternC(Context)) &&
|
||||
InitType->isRecordType()) {
|
||||
CXXRecordDecl *RD =
|
||||
cast<CXXRecordDecl>(InitType->getAsRecordType()->getDecl());
|
||||
CXXConstructorDecl *Constructor = 0;
|
||||
|
|
|
@ -21,3 +21,7 @@ extern "C" int foo;
|
|||
|
||||
extern "C" const int bar;
|
||||
extern "C" int const bar;
|
||||
|
||||
// <rdar://problem/6895431>
|
||||
extern "C" struct bar d;
|
||||
extern struct bar e;
|
||||
|
|
Loading…
Reference in New Issue