[cfe-commits] r168900 - /cfe/trunk/lib/AST/Decl.cpp

Rafael Espindola rafael.espindola at gmail.com
Thu Nov 29 08:38:22 PST 2012


Author: rafael
Date: Thu Nov 29 10:38:22 2012
New Revision: 168900

URL: http://llvm.org/viewvc/llvm-project?rev=168900&view=rev
Log:
Now that the underlying problem has been fixed, add r168411 back.
Original commit message:

Remove redundant code.

Modified:
    cfe/trunk/lib/AST/Decl.cpp

Modified: cfe/trunk/lib/AST/Decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=168900&r1=168899&r2=168900&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Decl.cpp (original)
+++ cfe/trunk/lib/AST/Decl.cpp Thu Nov 29 10:38:22 2012
@@ -777,12 +777,10 @@
         if (llvm::Optional<Visibility> Vis = Function->getExplicitVisibility())
           LV.mergeVisibility(*Vis, true);
       }
-      
-      if (const FunctionDecl *Prev = Function->getPreviousDecl()) {
-        LinkageInfo PrevLV = getLVForDecl(Prev, OnlyTemplate);
-        if (PrevLV.linkage()) LV.setLinkage(PrevLV.linkage());
-        LV.mergeVisibility(PrevLV);
-      }
+
+      // Note that Sema::MergeCompatibleFunctionDecls already takes care of
+      // merging storage classes and visibility attributes, so we don't have to
+      // look at previous decls in here.
 
       return LV;
     }





More information about the cfe-commits mailing list