1 Commits
Author SHA1 Message Date
Colby MchenryandClaude Opus 5.5 5c3aa92f23 fix(cpp): keep classes written around macros and mid-declaration conditionals (#2186)
nlohmann/json's basic_json was lost whole. Offset-preserving preParse
fixes (the kernel parses the same text):

- an access specifier spelled as a macro (JSON_PRIVATE_UNLESS_TESTED:,
  Q_SIGNALS:) becomes the keyword it stands for, padded
- a lone attribute macro is blanked after a comment line (/// @sa
  https://…/meta/ ends in '/') and after a template head (ends in '>'),
  which read as operator continuations; a line's continuation is judged
  on its code, so 'CURLE_X, /* 100 */' still continues (curl's enums)
- a preprocessor conditional where the code before it hasn't ended a
  statement/declaration (in an initializer list, between a template head
  and its function, in an argument list) keeps its first branch:
  directives and later branches blanked; #define continuation lines and
  statement macros without ';' (RAPIDJSON_DIAG_OFF(x)) are not code

Parse-error files: redis 192->186, curl 210->203, pybind11 98->95,
spdlog 111->110, leveldb 21->20, none newly broken across json, rapidjson,
fmt, jq; kernel parity 0 diffs; basic_json 0 -> 393 members.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 18:07:46 +00:00