================ @@ -8237,12 +8237,24 @@ Sema::CheckTemplateDeclScope(Scope *S, TemplateParameterList *TemplateParams) { if (CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(Ctx)) { // C++ [temp.mem]p2: // A local class shall not have member templates. - if (RD->isLocalClass()) - return Diag(TemplateParams->getTemplateLoc(), - diag::err_template_inside_local_class) - << TemplateParams->getSourceRange(); - else - return false; + if (RD->isLocalClass()) { + SourceLocation DiagLoc = TemplateParams->getTemplateLoc(); ---------------- emily-dror wrote:
Good catch, thanks for the review. Would you direct me to the documentation for writing test cases? > Also: we need a test for this. A simple reproducer that uses //expected-error > lines that point to a line instead of 'in general' i think will work. https://github.com/llvm/llvm-project/pull/149781 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits