aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-03-23 16:17:01 +0000
committerDouglas Gregor <dgregor@apple.com>2009-03-23 16:17:01 +0000
commit38179b29df101e3f55dbdff4d15d4d55cd82e2bd (patch)
tree35a664c7afd3db73de539bec27f458b5bd7c94dd /lib/Sema/SemaDecl.cpp
parentc50b00dbd843cd929b5f220d4a8699852249f64c (diff)
Thanks to Eli for pointing out my misreading of 6.2.2p5
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67530 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 255fd6c5ba..62b9bff3de 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -841,8 +841,7 @@ bool Sema::MergeVarDecl(VarDecl *New, Decl *OldD) {
// the prior declaration. If no prior declaration is visible, or
// if the prior declaration specifies no linkage, then the
// identifier has external linkage.
- if ((New->hasExternalStorage() || New->getStorageClass() == VarDecl::None) &&
- Old->hasLinkage())
+ if (New->hasExternalStorage() && Old->hasLinkage())
/* Okay */;
else if (New->getStorageClass() != VarDecl::Static &&
Old->getStorageClass() == VarDecl::Static) {