[llvm] [FileCheck]: Fix diagnostic for trailing CHECK-NOT (PR #78412)

Thomas Preud'homme via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 18 02:46:26 PST 2024


RoboTux wrote:

> @RoboTux I am unable to get the code to detect the NOT prefix where an implicit-check-not occurs. Other than that the solution I have arrived seems to be working fine.
> 
> Would it be advisable if I simply set the prefix to IMPLICIT CHECK-NOT: ...? I think that is a neater diagnostic, but it would require changing some of the existing tests to make the test-suite pass. Other than that, the approach works fine without breakage in the tests.

Yes I think in the `for (StringRef PatternString : Req.ImplicitCheckNot) {` loop in readCheckFile() instead of creating a pattern you would need to create a CheckString as well and you can use "IMPLICIT-CHECK" as a prefix (this way it'll show up as IMPLICIT-CHECK-NOT). It will require test updates for sure.

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


More information about the llvm-commits mailing list