[cfe-commits] r121025 - /cfe/trunk/lib/AST/Decl.cpp

Douglas Gregor dgregor at apple.com
Mon Dec 6 10:50:56 PST 2010


Author: dgregor
Date: Mon Dec  6 12:50:56 2010
New Revision: 121025

URL: http://llvm.org/viewvc/llvm-project?rev=121025&view=rev
Log:
Use the unused merge() function, fixing an minor, unintended change I
introduced in r121023.

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=121025&r1=121024&r2=121025&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Decl.cpp (original)
+++ cfe/trunk/lib/AST/Decl.cpp Mon Dec  6 12:50:56 2010
@@ -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:





More information about the cfe-commits mailing list