================
@@ -7909,6 +7903,37 @@ bool
Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param,
Arg.getLocation());
}
+static Sema::SemaDiagnosticBuilder noteLocation(Sema &S, const NamedDecl &Decl,
+ unsigned HereDiagID,
+ unsigned ExternalDiagID) {
+ if (Decl.getLocation().isValid())
+ return S.Diag(Decl.getLocation(), HereDiagID);
+
+ SmallString<128> Str;
+ llvm::raw_svector_ostream Out(Str);
+ PrintingPolicy PP = S.getPrintingPolicy();
+ PP.TerseOutput = 1;
+ Decl.print(Out, PP);
+ return S.Diag(Decl.getLocation(), ExternalDiagID) << Out.str();
----------------
cor3ntin wrote:
Why not `<< Decl` directly?
https://github.com/llvm/llvm-project/pull/71264
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits