[cfe-commits] r168667 - /cfe/trunk/lib/AST/Decl.cpp
Rafael Espindola
rafael.espindola at gmail.com
Mon Nov 26 17:44:25 PST 2012
Author: rafael
Date: Mon Nov 26 19:44:24 2012
New Revision: 168667
URL: http://llvm.org/viewvc/llvm-project?rev=168667&view=rev
Log:
Revert r168411 for now.
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=168667&r1=168666&r2=168667&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Decl.cpp (original)
+++ cfe/trunk/lib/AST/Decl.cpp Mon Nov 26 19:44:24 2012
@@ -777,10 +777,12 @@
if (llvm::Optional<Visibility> Vis = Function->getExplicitVisibility())
LV.mergeVisibility(*Vis, true);
}
-
- // 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.
+
+ if (const FunctionDecl *Prev = Function->getPreviousDecl()) {
+ LinkageInfo PrevLV = getLVForDecl(Prev, OnlyTemplate);
+ if (PrevLV.linkage()) LV.setLinkage(PrevLV.linkage());
+ LV.mergeVisibility(PrevLV);
+ }
return LV;
}
More information about the cfe-commits
mailing list