aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-12-06 18:50:56 +0000
committerDouglas Gregor <dgregor@apple.com>2010-12-06 18:50:56 +0000
commit89d63e5e4f4423455f7ee6b1e85143c34d088128 (patch)
tree35f999c0217516b7fde578262b00b04e8ab50008 /lib/AST/Decl.cpp
parent381d34e0b205ca27bcc7e7c1652561941c437965 (diff)
Use the unused merge() function, fixing an minor, unintended change I
introduced in r121023. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121025 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r--lib/AST/Decl.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index 90a561e5c6..d4cffb9b68 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -102,7 +102,7 @@ struct LVFlags {
F.ConsiderVisibilityAttributes = false;
return F;
}
-};
+};
} // end anonymous namespace
/// \brief Get the most restrictive linkage for the types in the given
@@ -153,18 +153,14 @@ static LVPair getLVForTemplateArgumentList(const TemplateArgument *Args,
// The decl can validly be null as the representation of nullptr
// arguments, valid only in C++0x.
if (Decl *D = Args[I].getAsDecl()) {
- if (NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
- LinkageInfo LI = getLVForDecl(ND, F);
- LV = merge(LV, LVPair(LI.linkage(), LI.visibility()));
- }
+ if (NamedDecl *ND = dyn_cast<NamedDecl>(D))
+ LV = merge(LV, getLVForDecl(ND, F));
}
break;
case TemplateArgument::Template:
- if (TemplateDecl *Template = Args[I].getAsTemplate().getAsTemplateDecl()){
- LinkageInfo LI = getLVForDecl(Template, F);
- LV = merge(LV, LVPair(LI.linkage(), LI.visibility()));
- }
+ if (TemplateDecl *Template = Args[I].getAsTemplate().getAsTemplateDecl())
+ LV = merge(LV, getLVForDecl(Template, F));
break;
case TemplateArgument::Pack: