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
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index 90a561e..d4cffb9 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -102,7 +102,7 @@
F.ConsiderVisibilityAttributes = false;
return F;
}
-};
+};
} // end anonymous namespace
/// \brief Get the most restrictive linkage for the types in the given
@@ -153,18 +153,14 @@
// 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: