[all-commits] [llvm/llvm-project] 97ea0a: [TableGen] Do not exit in template argument check ...
Markus Böck via All-commits
all-commits at lists.llvm.org
Mon Jan 6 12:06:40 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 97ea0aba15f7f618d7a0caabf0627793563f3850
https://github.com/llvm/llvm-project/commit/97ea0aba15f7f618d7a0caabf0627793563f3850
Author: Markus Böck <markus.boeck02 at gmail.com>
Date: 2025-01-06 (Mon, 06 Jan 2025)
Changed paths:
M llvm/lib/TableGen/TGParser.cpp
M llvm/lib/TableGen/TGParser.h
M llvm/test/TableGen/template-args.td
A mlir/test/tblgen-lsp-server/templ-arg-check.test
Log Message:
-----------
[TableGen] Do not exit in template argument check (#121636)
The signature of `CheckTemplateArgValues` implements error handling via
the `bool` return type, yet always returned false. The single possible
error case instead used `PrintFatalError,` which exits the program
afterward.
This behavior is undesirable: It prevents any further errors from being
printed and makes TableGen less usable as a library as it crashes the
entire process (e.g. `tblgen-lsp-server`).
This PR therefore fixes the issue by using `Error` instead and returning
true if an error occurred. All callers already perform proper error
handling.
As `llvm-tblgen` exits on error, a test was also added to the LSP to
ensure it exits normally despite the error.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list