Files
codeql/cpp/ql/test/library-tests
copilot-swe-agent[bot] bfb7b1d046 Commit 6: Fix POSIX-bracket mis-parses revealed by Commit 5
POSIX bracket expressions ([:name:], [.x.], [=x=]) are only valid nested
inside another character class in std::regex. The three predicates now
additionally require that at position `start` we are inside an outer
character class, approximated by requiring more non-escaped `[` than
non-escaped `]` before `start`. A well-formed POSIX bracket contributes
one `[` and one `]` at/after `start`, so the check is unaffected by
earlier POSIX brackets.

Also stop emitting individual charSetTokens for characters inside a
POSIX bracket (`inAnyPosixBracket` guard), which removes the spurious
`[RegExpCharacterRange] :]-z` on [[:alpha:]-z].

Post-fix, unnested `[:digit:]`, `[:alpha:]`, and `a[🅱️]c` are correctly
parsed as ordinary character classes / literal sequences rather than
`RegExpNamedCharacterProperty`; and the [[:alpha:]-z] range no longer
crosses the POSIX bracket boundary.

Bundle: github/codeql-action codeql-bundle-v2.26.1 (CodeQL CLI 2.26.1).
2026-07-21 12:24:52 +00:00
..
2020-03-19 09:18:32 -04:00
2025-11-26 13:42:43 +01:00
2020-10-07 13:14:54 -04:00
2024-12-20 13:53:35 +01:00
2024-04-09 15:15:41 +02:00
2025-04-23 16:56:56 +02:00
2024-11-12 09:49:10 +00:00
2025-06-27 14:42:08 +02:00
2025-06-11 11:41:50 +02:00
2020-01-20 15:00:09 +00:00
2020-01-29 13:11:50 +01:00
2024-10-16 11:33:18 +02:00
2022-08-25 20:52:27 +02:00
2022-10-21 18:36:12 +01:00
2020-11-03 13:39:33 -05:00
2022-08-25 20:52:27 +02:00
2020-06-30 17:46:08 +01:00
2025-06-13 09:44:03 +02:00
2024-01-29 14:11:07 +00:00
2025-11-18 20:03:24 +00:00
2025-08-03 12:17:34 +01:00