r206452 - SemaTemplate.cpp: Rework r206451. Removing an argument was really bad idea.

NAKAMURA Takumi geek4civic at gmail.com
Thu Apr 17 01:57:09 PDT 2014


Author: chapuni
Date: Thu Apr 17 03:57:09 2014
New Revision: 206452

URL: http://llvm.org/viewvc/llvm-project?rev=206452&view=rev
Log:
SemaTemplate.cpp: Rework r206451. Removing an argument was really bad idea.

Modified:
    cfe/trunk/lib/Sema/SemaTemplate.cpp

Modified: cfe/trunk/lib/Sema/SemaTemplate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplate.cpp?rev=206452&r1=206451&r2=206452&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplate.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplate.cpp Thu Apr 17 03:57:09 2014
@@ -1722,8 +1722,7 @@ TemplateParameterList *Sema::MatchTempla
   //   explicitly specialized.
   bool SawNonEmptyTemplateParameterList = false;
 
-  auto CheckExplicitSpecialization = [&](SourceRange Range) {
-    bool Recovery = false;
+  auto CheckExplicitSpecialization = [&](SourceRange Range, bool Recovery) {
     if (SawNonEmptyTemplateParameterList) {
       Diag(DeclLoc, diag::err_specialize_member_of_template)
         << !Recovery << Range;
@@ -1823,7 +1822,8 @@ TemplateParameterList *Sema::MatchTempla
     //   are not explicitly specialized as well.
     if (ParamIdx < ParamLists.size()) {
       if (ParamLists[ParamIdx]->size() == 0) {
-        if (CheckExplicitSpecialization(ParamLists[ParamIdx]->getSourceRange()))
+        if (CheckExplicitSpecialization(ParamLists[ParamIdx]->getSourceRange(),
+                                        false))
           return 0;
       } else
         SawNonEmptyTemplateParameterList = true;
@@ -1959,7 +1959,8 @@ TemplateParameterList *Sema::MatchTempla
   //   specialize a class member template if its en- closing class templates 
   //   are not explicitly specialized as well.
   if (ParamLists.back()->size() == 0 &&
-      CheckExplicitSpecialization(ParamLists[ParamIdx]->getSourceRange()))
+      CheckExplicitSpecialization(ParamLists[ParamIdx]->getSourceRange(),
+                                  false))
     return 0;
 
   // Return the last template parameter list, which corresponds to the





More information about the cfe-commits mailing list