[llvm] [mlir] [TableGen] Do not exit in template argument check (PR #121636)
Rahul Joshi via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 4 16:53:55 PST 2025
Markus =?utf-8?q?Böck?= <markus.boeck02 at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/121636 at github.com>
================
@@ -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(
----------------
jurahul wrote:
The change is good, but can we also adjust the error Loc to be more accurate? It seems that the Loc here is the position of the name of the class. but it might be better to show the location of the actual class arguments? I am not sure if those locations are actually tracked by the TG Lexer/Parser.
https://github.com/llvm/llvm-project/pull/121636
More information about the llvm-commits
mailing list