From: Rafael Espindola Date: Mon, 12 Nov 2012 04:32:23 +0000 (+0000) Subject: Remove calls to getMostRecentDecl. The case they were added for in r117526 are X-Git-Tag: llvmorg-3.3.0-rc1~12012 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ab53a7278141efe50e2f9c5710d0277bd9d1e969;p=platform%2Fupstream%2Fllvm.git Remove calls to getMostRecentDecl. The case they were added for in r117526 are now covered by attribute merging. llvm-svn: 167714 --- diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index 7b13755979f1..74abbaa492de 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -656,8 +656,7 @@ LinkageInfo NamedDecl::getLinkageAndVisibility() const { llvm::Optional NamedDecl::getExplicitVisibility() const { // Use the most recent declaration of a variable. if (const VarDecl *Var = dyn_cast(this)) { - if (llvm::Optional V = - getVisibilityOf(Var->getMostRecentDecl())) + if (llvm::Optional V = getVisibilityOf(Var)) return V; if (Var->isStaticDataMember()) { @@ -671,8 +670,7 @@ llvm::Optional NamedDecl::getExplicitVisibility() const { // Use the most recent declaration of a function, and also handle // function template specializations. if (const FunctionDecl *fn = dyn_cast(this)) { - if (llvm::Optional V - = getVisibilityOf(fn->getMostRecentDecl())) + if (llvm::Optional V = getVisibilityOf(fn)) return V; // If the function is a specialization of a template with an