fix(extraction): broaden the curated C++ inline-macro library list (#1103)
* fix(extraction): broaden the curated C++ inline-macro library list Since #1102 the post-parse salvage already recovers the NAME for any macro, so adding a library now buys full return-type recovery for it. Extend the curated list across the major C++ ecosystem: Mozilla/SpiderMonkey, Protobuf, {fmt}, Hedley + nlohmann/json, GLM, Bullet (SIMD_FORCE_INLINE), Skia, OpenCV, EASTL, Cocos2d-x, Chromium/WebKit (NEVER_INLINE), GLib, SQLite, and the unambiguous Windows calling conventions (WINAPI / APIENTRY / STDMETHODCALLTYPE / WINAPIV — which sit between the return type and the name, so blanking them recovers the return type, e.g. `HRESULT WINAPI Foo()` -> Foo : HRESULT). Every entry is an exact, curated token matched only in specifier position, so a real all-caps return type is never touched. Anything still missed keeps its name via the universal salvage. CARLA control unchanged (440->6 mangles, 0 regressions — none of these libs appear there, confirming no collateral). Eleven representative full-recovery tests added. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(changelog): note broadened C++ inline-macro library coverage (#1103) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
cb20a3bf7f
commit
00765200d8
@@ -286,6 +286,29 @@ const CPP_INLINE_MACROS = [
|
||||
'V8_INLINE', 'V8_NOINLINE',
|
||||
'EIGEN_STRONG_INLINE', 'EIGEN_ALWAYS_INLINE', 'EIGEN_DEVICE_FUNC',
|
||||
'RAPIDJSON_FORCEINLINE',
|
||||
// Mozilla / SpiderMonkey
|
||||
'MOZ_ALWAYS_INLINE', 'MOZ_NEVER_INLINE',
|
||||
// Protocol Buffers
|
||||
'PROTOBUF_ALWAYS_INLINE', 'PROTOBUF_NOINLINE',
|
||||
// {fmt} / spdlog
|
||||
'FMT_CONSTEXPR20', 'FMT_CONSTEXPR', 'FMT_INLINE',
|
||||
// Hedley + nlohmann/json (bundles Hedley)
|
||||
'JSON_HEDLEY_ALWAYS_INLINE', 'JSON_HEDLEY_NEVER_INLINE',
|
||||
'HEDLEY_ALWAYS_INLINE', 'HEDLEY_NEVER_INLINE',
|
||||
// GLM (graphics math — pervasive in games/rendering)
|
||||
'GLM_FUNC_QUALIFIER', 'GLM_FUNC_DECL', 'GLM_CONSTEXPR', 'GLM_INLINE',
|
||||
// Bullet Physics / Skia / OpenCV / EASTL / Cocos2d-x / Chromium-WebKit
|
||||
'SIMD_FORCE_INLINE',
|
||||
'SK_ALWAYS_INLINE',
|
||||
'CV_ALWAYS_INLINE', 'CV_INLINE',
|
||||
'EA_FORCE_INLINE', 'EA_NOINLINE',
|
||||
'CC_INLINE',
|
||||
'NEVER_INLINE',
|
||||
// C libraries: GLib, SQLite (internal linkage)
|
||||
'G_INLINE_FUNC', 'SQLITE_PRIVATE', 'SQLITE_API',
|
||||
// Windows calling conventions (linkage position — recover the return type; the
|
||||
// name is salvaged regardless). Only the unambiguous, non-word-like ones.
|
||||
'STDMETHODCALLTYPE', 'WINAPIV', 'WINAPI', 'APIENTRY',
|
||||
// Common cross-ecosystem inline/attribute hints
|
||||
'ALWAYS_INLINE', 'FORCE_INLINE', 'NOINLINE',
|
||||
] as const;
|
||||
|
||||
Reference in New Issue
Block a user