diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-10-15 01:21:46 +0000 | 
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-10-15 01:21:46 +0000 | 
| commit | d4e1fb562e77b3328549d7af09162efcfca3b34c (patch) | |
| tree | cf0da4be20e76087f5741a1a4c694e88e573d262 /clang/lib | |
| parent | 150c3cc8252e4c1f6367eab57b8ca3b50c10b0da (diff) | |
| download | bcm5719-llvm-d4e1fb562e77b3328549d7af09162efcfca3b34c.tar.gz bcm5719-llvm-d4e1fb562e77b3328549d7af09162efcfca3b34c.zip | |
Don't complain about a variable within a linkage-specification that is
initialized. Fixes PR7076.
llvm-svn: 116553
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 93909f995d4..4a834cd5601 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -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); | 

