From d9e790dded1f8dc79896f2fc4689a31016d97683 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Thu, 17 Apr 2014 08:57:09 +0000 Subject: [PATCH] SemaTemplate.cpp: Rework r206451. Removing an argument was really bad idea. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206452 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaTemplate.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index e4d2a41f5a..a7764d8df9 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -1722,8 +1722,7 @@ TemplateParameterList *Sema::MatchTemplateParametersToScopeSpecifier( // 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::MatchTemplateParametersToScopeSpecifier( // 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::MatchTemplateParametersToScopeSpecifier( // 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 -- 2.40.0