From: Rafael Espindola Date: Wed, 21 Nov 2012 02:53:22 +0000 (+0000) Subject: Remove redundant code. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6dcddfb85237ffe1a214eef8162f9928e16de5d0;p=platform%2Fupstream%2Fllvm.git Remove redundant code. llvm-svn: 168411 --- diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index ed48c43..1f390ee 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 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; }