[llvm] [mlir] [TableGen] Do not exit in template argument check (PR #121636)

Markus Böck via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 4 22:29:34 PST 2025


================
@@ -4439,16 +4440,16 @@ bool TGParser::CheckTemplateArgValues(
                "result of template arg value cast has wrong type");
         Value = Value->cloneWithValue(CastValue);
       } else {
-        PrintFatalError(Loc, "Value specified for template argument '" +
-                                 Arg->getNameInitAsString() + "' is of type " +
-                                 ArgValue->getType()->getAsString() +
-                                 "; expected type " + ArgType->getAsString() +
-                                 ": " + ArgValue->getAsString());
+        HasError |= Error(
----------------
zero9178 wrote:

I've added separate location tracking for the arguments in the parser since the `Init`s sadly do not track locations (since that would make the node folding redundant). Let me know what you think


https://github.com/llvm/llvm-project/pull/121636


More information about the llvm-commits mailing list