[cfe-commits] r167714 - /cfe/trunk/lib/AST/Decl.cpp
Rafael Espindola
rafael.espindola at gmail.com
Sun Nov 11 20:32:23 PST 2012
Author: rafael
Date: Sun Nov 11 22:32:23 2012
New Revision: 167714
URL: http://llvm.org/viewvc/llvm-project?rev=167714&view=rev
Log:
Remove calls to getMostRecentDecl. The case they were added for in r117526 are
now covered by attribute merging.
Modified:
cfe/trunk/lib/AST/Decl.cpp
Modified: cfe/trunk/lib/AST/Decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=167714&r1=167713&r2=167714&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Decl.cpp (original)
+++ cfe/trunk/lib/AST/Decl.cpp Sun Nov 11 22:32:23 2012
@@ -656,8 +656,7 @@
llvm::Optional<Visibility> NamedDecl::getExplicitVisibility() const {
// Use the most recent declaration of a variable.
if (const VarDecl *Var = dyn_cast<VarDecl>(this)) {
- if (llvm::Optional<Visibility> V =
- getVisibilityOf(Var->getMostRecentDecl()))
+ if (llvm::Optional<Visibility> V = getVisibilityOf(Var))
return V;
if (Var->isStaticDataMember()) {
@@ -671,8 +670,7 @@
// Use the most recent declaration of a function, and also handle
// function template specializations.
if (const FunctionDecl *fn = dyn_cast<FunctionDecl>(this)) {
- if (llvm::Optional<Visibility> V
- = getVisibilityOf(fn->getMostRecentDecl()))
+ if (llvm::Optional<Visibility> V = getVisibilityOf(fn))
return V;
// If the function is a specialization of a template with an
More information about the cfe-commits
mailing list