[llvm] [FileCheck] improve prefix validation (PR #92248)

Paul T Robinson via llvm-commits llvm-commits at lists.llvm.org
Wed May 22 06:03:06 PDT 2024


================
@@ -2468,24 +2468,36 @@ FileCheckString::CheckDag(const SourceMgr &SM, StringRef Buffer,
 
 static bool ValidatePrefixes(StringRef Kind, StringSet<> &UniquePrefixes,
                              ArrayRef<StringRef> SuppliedPrefixes) {
+  static const char *Suffixes[] = {"-NEXT",  "-SAME", "-EMPTY", "-NOT",
+                                   "-COUNT", "-DAG",  "-LABEL"};
+
----------------
pogo59 wrote:

Search for "DAG-NOT" and you will see the place I mean. Looks like it specifically checks for NOT combined with anything else, but not other combinations. FileCheck does not have defined semantics for any combination of suffixes.

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


More information about the llvm-commits mailing list