]> granicus.if.org Git - clang/commitdiff
Add comment for my last patch.
authorFariborz Jahanian <fjahanian@apple.com>
Fri, 25 Jun 2010 00:05:45 +0000 (00:05 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Fri, 25 Jun 2010 00:05:45 +0000 (00:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106813 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDecl.cpp

index 5c1de6aeb8805f6724a7bb77bc70d71824b66317..ba84f7c223350fc3ad2fa9031ba4f220744dbef1 100644 (file)
@@ -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())