[llvm] [FileCheck] Clarify --implicit-check-not coverage in CommandGuide (PR #226476)

Emil Laine via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 06:02:02 PDT 2026


https://github.com/emillaine created https://github.com/llvm/llvm-project/pull/226476

The option description said checks apply "between positive checks", which reads as gaps only. The pattern is actually rejected anywhere in the input except text matched by a positive check: before the first check, between checks, after the last check, and across the whole input when there are no positive checks.


>From a8e237763ae4131c589212e8ffcc43149fa4664c Mon Sep 17 00:00:00 2001
From: Emil Laine <laine.emil at gmail.com>
Date: Fri, 25 Sep 2026 15:58:15 +0300
Subject: [PATCH] [FileCheck] Clarify --implicit-check-not coverage in
 CommandGuide

The option description said checks apply "between positive checks",
which reads as gaps only. The pattern is actually rejected anywhere in
the input except text matched by a positive check: before the first
check, between checks, after the last check, and across the whole input
when there are no positive checks.
---
 llvm/docs/CommandGuide/FileCheck.md | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/llvm/docs/CommandGuide/FileCheck.md b/llvm/docs/CommandGuide/FileCheck.md
index 390cb0c77c6ed0..ef50f838baf404 100644
--- a/llvm/docs/CommandGuide/FileCheck.md
+++ b/llvm/docs/CommandGuide/FileCheck.md
@@ -97,7 +97,10 @@ FileCheck to use case-insensitive matching.
 :::
 
 :::{option} --implicit-check-not check-pattern
-Adds implicit negative checks for the specified patterns between positive
+Adds implicit negative checks for the specified patterns across the whole
+input. An occurrence of a pattern fails the check unless that same text is
+also matched by a positive check. This covers before the first check, between
+checks, after the last check, and the entire input when there are no positive
 checks. The option allows writing stricter tests without stuffing them with
 `CHECK-NOT`s.
 



More information about the llvm-commits mailing list