[llvm] [WebAssembly] Allow AsmTypeCheck detect multiple errors in function (PR #109705)

Thomas Lively via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 23 14:24:47 PDT 2024


================
@@ -70,14 +70,9 @@ void WebAssemblyAsmTypeCheck::dumpTypeStack(Twine Msg) {
 }
 
 bool WebAssemblyAsmTypeCheck::typeError(SMLoc ErrorLoc, const Twine &Msg) {
-  // Once you get one type error in a function, it will likely trigger more
-  // which are mostly not helpful.
-  if (TypeErrorThisFunction)
----------------
tlively wrote:

I guess Binaryen's validator can produce the same kind of false positive error messages if the parser hooks up the parents and children incorrectly due to the buggy input.

Reporting all the errors seems fine, but reporting just one error per block might be a nice way to generate fewer false positives. The other tools could benefit from that, too, so this idea isn't specific to LLVM in any way. OTOH, the number of users of this functionality is tiny, so it's probably not worth investing much in the quality of the error messages.

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


More information about the llvm-commits mailing list