llvm / clangir

A new (MLIR based) high-level IR for clang.
https://clangir.org
Other
327 stars 86 forks source link

[CIR] Remove redundant error from parseConstantValue #567

Closed orbiri closed 3 months ago

orbiri commented 3 months ago

ASMParser::parseAttribute is responsible for emitting its own errors or forwarding errors of the parsers below it. There is no reason to emit a subsequent error as it doesn't add extra information to the user.

As a driveby, beutify a bit the tests that "relied" on this error and make the expected error easier to read by moving it to the line before.