aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-06-25 00:05:45 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-06-25 00:05:45 +0000
commitfba9e8f85b3043da0e045cd653bcba9b6c60e067 (patch)
tree9cbc784709c89e770a28d04088dbed8784c38c38 /lib/Sema/SemaDecl.cpp
parent56b6ecad6c117a3f937cb22977c02ad9274cad33 (diff)
Add comment for my last patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106813 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 5c1de6aeb8..ba84f7c223 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -1454,7 +1454,13 @@ void Sema::MergeVarDecl(VarDecl *New, LookupResult &Previous) {
New->setInvalidDecl();
return;
}
-
+ // c99 6.2.2 P4.
+ // For an identifier declared with the storage-class specifier extern in a
+ // scope in which a prior declaration of that identifier is visible, if
+ // the prior declaration specifies internal or external linkage, the linkage
+ // of the identifier at the later declaration is the same as the linkage
+ // specified at the prior declaration.
+ // FIXME. revisit this code.
if (New->hasExternalStorage() &&
Old->getLinkage() == InternalLinkage &&
New->getDeclContext() == Old->getDeclContext())