Files
codeql/cpp/ql/lib/semmle
copilot-swe-agent[bot] cebddbdd42 Commit 7: Implement POSIX collating symbol and equivalence class support
Add posixCollatingSymbol([.x.]) and posixEquivalenceClass([=x=]) predicates
to ParseRegExp.qll, enabling correct tokenization of all three POSIX bracket
atom types inside character classes:
  - [:name:]  — already handled, unchanged
  - [.x.]     — new: posixCollatingSymbol predicate
  - [=x=]     — new: posixEquivalenceClass predicate

Refactored:
- charSetDelimiter: use inAnyPosixBracket helper (covers all three types)
- charSet closing: use inAnyPosixBracket helper
- inPosixBracket: updated to cover all three types
- simpleCharacter: updated to exclude all three types
- namedCharacterProperty: includes posixCollatingSymbol and posixEquivalenceClass
- inAnyPosixBracket: new private helper; uses pos in [x..y-1] for QL binding

Before this commit (commit 6):
  [[.a.]] → RegExpCharacterClass([[.a.]) + stray ]   (WRONG)
  [[=a=]] → RegExpCharacterClass([[=a=]) + stray ]   (WRONG)

After this commit:
  [[.a.]] → RegExpCharacterClass containing RegExpNamedCharacterProperty [.a.]
  [[=a=]] → RegExpCharacterClass containing RegExpNamedCharacterProperty [=a=]

Regenerated parse.expected and regexp.expected via codeql test run --learn
(CodeQL 2.26.1); all 2 tests pass.
2026-07-21 10:22:50 +00:00
..