Files
codeql/cpp/ql/test/library-tests
copilot-swe-agent[bot] d7a8f48c1c Commit 3: Add test.cpp corpus wrapped in std::regex stubs; generate .expected
Introduces cpp/ql/test/library-tests/regex/test.cpp with the Ruby regex
corpus mechanically translated to C++ string literals and wrapped in
std::regex construction calls using fully self-contained in-file stubs
(no #include of any external/standard header).

Stub surface:
  std::basic_regex<CharT>  constructor(const char*), constructor(const char*, int),
                           assign(const char*)
  std::regex               typedef for basic_regex<char>
  std::regex_match / regex_search / regex_replace  free functions

1:1 corpus mapping from regexp.rb:
  - All Ruby /regex/ literals translated to C++ "string" literals
    (each backslash doubled: /\d/ -> "\\d")
  - Dropped: /#{A}bc/ (Ruby string interpolation, no string-literal form)
  - Kept: a{,8}, .*m, \A, \z, \G, \h\H, (?'foo'...) — these are removed
    in commits 4 and 5 (keeping them here preserves 1:1 mapping)

Also removes `abstract` from RegExp class in ParseRegExp.qll so that all
StringLiterals are regex candidates (trivial syntactic gate; no dataflow).

.expected generated by:
  codeql test run --learn --search-path=. cpp/ql/test/library-tests/regex/
  (CodeQL CLI 2.26.1, bundled C/C++ extractor)
All 2 tests passed.
2026-07-21 10:11:27 +00:00
..
2020-03-19 09:18:32 -04:00
2019-09-09 11:25:53 +02:00
2025-11-26 13:42:43 +01:00
2019-09-09 11:25:53 +02: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
2019-09-09 11:25:53 +02:00
2025-04-23 16:56:56 +02:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +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
2019-09-09 11:25:53 +02:00
2020-01-20 15:00:09 +00:00
2020-01-29 13:11:50 +01:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2024-10-16 11:33:18 +02:00
2022-08-25 20:52:27 +02:00
2019-09-09 11:25:53 +02:00
2022-10-21 18:36:12 +01:00
2020-11-03 13:39:33 -05:00
2019-09-09 11:25:53 +02:00
2022-08-25 20:52:27 +02:00
2020-06-30 17:46:08 +01:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2025-06-13 09:44:03 +02:00
2024-01-29 14:11:07 +00:00
2019-09-09 11:25:53 +02:00
2025-11-18 20:03:24 +00:00
2025-08-03 12:17:34 +01:00