summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-11-21 02:53:22 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-11-21 02:53:22 +0000
commit6dcddfb85237ffe1a214eef8162f9928e16de5d0 (patch)
tree32e9b25d5ce68d3eebaad6e48cd01e2336ffbc3e /clang/lib/AST/Decl.cpp
parenta508c5de587f7311353449d1ba21a4f8a37c8a95 (diff)
downloadbcm5719-llvm-6dcddfb85237ffe1a214eef8162f9928e16de5d0.tar.gz
bcm5719-llvm-6dcddfb85237ffe1a214eef8162f9928e16de5d0.zip
Remove redundant code.
llvm-svn: 168411
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r--clang/lib/AST/Decl.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index ed48c439b54..1f390eec05e 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -777,12 +777,10 @@ static LinkageInfo getLVForDecl(const NamedDecl *D, bool OnlyTemplate) {
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;
}
OpenPOWER on IntegriCloud