================
@@ -988,9 +989,32 @@ 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. Template functions "
+      "can be invoked via their mangled name. E.g., expression _Z3fooIiEvi(5)",
----------------
adrian-prantl wrote:

The amount of punctuation is confusing, and the argument `5`  comes out of 
nowhere and is confusing
```
can be invoked via their mangled name. For example, using `_Z3fooIiEvi(123)` 
for `foo<int>(123)`".
```


https://github.com/llvm/llvm-project/pull/179916
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to