================
@@ -988,9 +989,33 @@ void ClangUserExpression::FixupCVRParseErrorDiagnostics(
!m_fixed_text.empty() ? m_fixed_text.c_str() : m_expr_text.c_str());
}
+void ClangUserExpression::FixupTemplateLookupDiagnostics(
+ DiagnosticManager &diagnostic_manager) const {
+ if (llvm::none_of(diagnostic_manager.Diagnostics(),
+ [](std::unique_ptr<Diagnostic> const &diag) {
+ switch (diag->GetCompilerID()) {
+ // FIXME: should we also be checking
+ // clang::diag::err_no_member_template?
+ case clang::diag::err_no_template:
+ case clang::diag::err_non_template_in_template_id:
+ return true;
+ default:
+ return false;
+ }
+ }))
+ return;
+
+ diagnostic_manager.AddDiagnostic(
+ "Naming template instantiation not yet supported. If calling a template "
+ "function, "
+ "try doing so using its mangled name. E.g., expression _Z3fooIiEvi(5)",
----------------
adrian-prantl wrote:
Typically diagnostics try to avoid second person, e.g.:
"Template functions can be invoked via their mangled name, e.g.:"
https://github.com/llvm/llvm-project/pull/179916
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits