[cfe-commits] r155099 - /cfe/trunk/lib/AST/Decl.cpp
Rafael Espindola
rafael.espindola at gmail.com
Wed Apr 18 21:27:48 PDT 2012
Author: rafael
Date: Wed Apr 18 23:27:47 2012
New Revision: 155099
URL: http://llvm.org/viewvc/llvm-project?rev=155099&view=rev
Log:
The explicit bit in LV already tracks exactly the same information as
DHasExplicitVisibility. Simplify the code a bit.
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=155099&r1=155098&r2=155099&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Decl.cpp (original)
+++ cfe/trunk/lib/AST/Decl.cpp Wed Apr 18 23:27:47 2012
@@ -484,18 +484,14 @@
LinkageInfo LV;
- bool DHasExplicitVisibility = false;
// If we have an explicit visibility attribute, merge that in.
if (F.ConsiderVisibilityAttributes) {
- if (llvm::Optional<Visibility> Vis = D->getExplicitVisibility()) {
+ if (llvm::Optional<Visibility> Vis = D->getExplicitVisibility())
LV.mergeVisibility(*Vis, true);
-
- DHasExplicitVisibility = true;
- }
}
// Ignore both global visibility and attributes when computing our
// parent's visibility if we already have an explicit one.
- LVFlags ClassF = DHasExplicitVisibility ?
+ LVFlags ClassF = LV.visibilityExplicit() ?
LVFlags::CreateOnlyDeclLinkage() : F;
// If we're paying attention to global visibility, apply
More information about the cfe-commits
mailing list