aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2009-04-15 15:20:03 +0000
committerSteve Naroff <snaroff@apple.com>2009-04-15 15:20:03 +0000
commitee3899e1cabcbf70d9a316b33f9b79bf3189bd01 (patch)
tree0f312bf83c74c4916b5821aa3b45b954868699fc /lib/Sema/SemaDecl.cpp
parent9dbbdbf63785cf39e9cc1dfd1eab1729d0048f17 (diff)
Fix <rdar://problem/6789707> "warning: 'extern' variable has an initializer" not correct for __private_extern__.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69167 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 6456ee8d9a..8b7e26de22 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -2488,7 +2488,7 @@ void Sema::AddInitializerToDecl(DeclPtrTy dcl, ExprArg init, bool DirectInit) {
}
}
} else if (VDecl->isFileVarDecl()) {
- if (VDecl->hasExternalStorage())
+ if (VDecl->getStorageClass() == VarDecl::Extern)
Diag(VDecl->getLocation(), diag::warn_extern_init);
if (!VDecl->isInvalidDecl())
if (CheckInitializerTypes(Init, DclT, VDecl->getLocation(),