hintonda created this revision. hintonda added reviewers: doug.gregor, lvoufo. hintonda added a subscriber: cfe-commits.
The code sets isPartialSpecialization = false instead of returning true, which will cause a crash later when the missing template parameter is referenced. http://reviews.llvm.org/D16971 Files: lib/Sema/SemaTemplate.cpp Index: lib/Sema/SemaTemplate.cpp =================================================================== --- lib/Sema/SemaTemplate.cpp +++ lib/Sema/SemaTemplate.cpp @@ -2542,7 +2542,7 @@ InstantiationDependent)) { Diag(TemplateNameLoc, diag::err_partial_spec_fully_specialized) << VarTemplate->getDeclName(); - IsPartialSpecialization = false; + return true; } if (isSameAsPrimaryTemplate(VarTemplate->getTemplateParameters(), @@ -6286,7 +6286,7 @@ InstantiationDependent)) { Diag(TemplateNameLoc, diag::err_partial_spec_fully_specialized) << ClassTemplate->getDeclName(); - isPartialSpecialization = false; + return true; } }
Index: lib/Sema/SemaTemplate.cpp =================================================================== --- lib/Sema/SemaTemplate.cpp +++ lib/Sema/SemaTemplate.cpp @@ -2542,7 +2542,7 @@ InstantiationDependent)) { Diag(TemplateNameLoc, diag::err_partial_spec_fully_specialized) << VarTemplate->getDeclName(); - IsPartialSpecialization = false; + return true; } if (isSameAsPrimaryTemplate(VarTemplate->getTemplateParameters(), @@ -6286,7 +6286,7 @@ InstantiationDependent)) { Diag(TemplateNameLoc, diag::err_partial_spec_fully_specialized) << ClassTemplate->getDeclName(); - isPartialSpecialization = false; + return true; } }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits