forked from OSchip/llvm-project
Don't complain about a variable within a linkage-specification that is
initialized. Fixes PR7076. llvm-svn: 116553
This commit is contained in:
parent
150c3cc825
commit
d4e1fb562e
|
@ -4339,7 +4339,7 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) {
|
|||
}
|
||||
}
|
||||
} else if (VDecl->isFileVarDecl()) {
|
||||
if (VDecl->getStorageClass() == SC_Extern &&
|
||||
if (VDecl->getStorageClassAsWritten() == SC_Extern &&
|
||||
(!getLangOptions().CPlusPlus ||
|
||||
!Context.getBaseElementType(VDecl->getType()).isConstQualified()))
|
||||
Diag(VDecl->getLocation(), diag::warn_extern_init);
|
||||
|
|
|
@ -86,3 +86,6 @@ namespace N {
|
|||
}
|
||||
|
||||
extern "C++" using N::value;
|
||||
|
||||
// PR7076
|
||||
extern "C" const char *Version_string = "2.9";
|
||||
|
|
Loading…
Reference in New Issue