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

Thomas Preud'homme via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 17 08:25:46 PST 2024


RoboTux wrote:

> > I feel what we need is to change DagNotStrings to be a vector of FileCheckString instead of a vector of Pattern since it's FileCheckString that associate a Prefix, Loc and Pattern. All we need then is to create FileCheckString for CHECK-NOTs and CHECK-DAGs with an empty DagNotStrings for them.
> > Does that make sense?
> 
> It would still require the code in checkInput () to be changed to include custom NOT prefixes, which seems a little tedious, and would require a lot of change!
> 
> EDIT: I think I will go ahead and try to work in you suggestion, it seems sound. I think I might be able to get it working.

>From a quick look I think it only needs to have an if around the call to CheckStr.Check() to exclude CHECK-NOT and CHECK-DAG. No doubt other places will need to be adapted. Alternatively Check() could bail out on CHECK-NOT and CHECK-DAG.

I realize it's a much bigger work than the original patch. You can reach me on discord if you have questions along the way. In any case it'll be a good way to get familiar with FileCheck's codebase.

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


More information about the llvm-commits mailing list