]> granicus.if.org Git - clang/commitdiff
Use the unused merge() function, fixing an minor, unintended change I
authorDouglas Gregor <dgregor@apple.com>
Mon, 6 Dec 2010 18:50:56 +0000 (18:50 +0000)
committerDouglas Gregor <dgregor@apple.com>
Mon, 6 Dec 2010 18:50:56 +0000 (18:50 +0000)
introduced in r121023.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121025 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/Decl.cpp

index 90a561e5c6efbf2e3beaf60532b766d0cf532f9e..d4cffb9b68268996d07c023805f4b00fa9d959f2 100644 (file)
@@ -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: