Files
codeql/cpp/ql/test/library-tests/regex/Consistency.ql
copilot-swe-agent[bot] 633ba01b77 Commit 7: Add Consistency.ql regression guard
New cpp/ql/test/library-tests/regex/Consistency.ql selects, for each
corpus RegExp, characters that failedToParse. The empty
Consistency.expected asserts that no corpus regex has any unparsed
character, mirroring PR #22200's Consistency test as the primary
regression guard for the parser.

Bundle: github/codeql-action codeql-bundle-v2.26.1 (CodeQL CLI 2.26.1).
2026-07-21 12:26:05 +00:00

12 lines
274 B
Plaintext

/**
* Regression guard: every corpus regex must parse without leaving any
* character unaccounted for. Expected output is empty.
*/
import cpp
import semmle.code.cpp.regex.internal.ParseRegExp
from RegExp re, int i
where re.failedToParse(i)
select re, i, re.getChar(i)