From c6b82c353bef4cbc0d1dde8580abf8d0a266e64b Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Mon, 12 Nov 2012 04:32:23 +0000 Subject: [PATCH] Remove calls to getMostRecentDecl. The case they were added for in r117526 are now covered by attribute merging. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167714 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/Decl.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index 7b13755979..74abbaa492 100644 --- a/lib/AST/Decl.cpp +++ b/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 -- 2.40.0