diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-11-21 02:53:22 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-11-21 02:53:22 +0000 |
commit | 16c8cf1c3c5e4265b90103a7b5e924e567ab5cd1 (patch) | |
tree | 4f3f6612206548645a16031b67f82d477a2ade48 /lib/AST/Decl.cpp | |
parent | 5175861336cf35cce8b2889282d9b55394a4380c (diff) |
Remove redundant code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168411 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r-- | lib/AST/Decl.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index ed48c439b5..1f390eec05 100644 --- a/lib/AST/Decl.cpp +++ b/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; } |