Summary
In a .h header, a class declared with an all-caps export/visibility macro between the class/struct keyword and the type name — the ubiquitous Unreal Engine / library form class ENGINE_API Foo : public Bar — is misclassified by the header language heuristic as C instead of C++. Parsed with the C grammar, the class definition is never recovered and disappears from the graph.
Reproduction
Header Foo.h:
class ENGINE_API Foo : public Bar
{
public:
void Tick();
};
Index the file → there is no class node for Foo and no extends Bar edge.
Impact
Any .h using the class MODULE_API Type : Base form — standard across Unreal Engine and the many C/C++ libraries that use *_API / *_EXPORT export macros — loses its class definition, its base clause, and its members. That breaks type-hierarchy, callers, and blast-radius queries that flow through the type.
Root cause
looksLikeCpp (src/extraction/grammars.ts) recognizes class Foo : Base but not class MACRO Foo : Base: the macro token between the keyword and the identifier defeats the C++ signal, so ambiguous .h files fall back to the C grammar.
Fix
PR #1133 — extend the looksLikeCpp pattern to also accept an all-caps macro between class/struct and the identifier before the : / {.
Summary
In a
.hheader, a class declared with an all-caps export/visibility macro between theclass/structkeyword and the type name — the ubiquitous Unreal Engine / library formclass ENGINE_API Foo : public Bar— is misclassified by the header language heuristic as C instead of C++. Parsed with the C grammar, the class definition is never recovered and disappears from the graph.Reproduction
Header
Foo.h:Index the file → there is no
classnode forFooand noextends Baredge.Impact
Any
.husing theclass MODULE_API Type : Baseform — standard across Unreal Engine and the many C/C++ libraries that use*_API/*_EXPORTexport macros — loses its class definition, its base clause, and its members. That breaks type-hierarchy, callers, and blast-radius queries that flow through the type.Root cause
looksLikeCpp(src/extraction/grammars.ts) recognizesclass Foo : Basebut notclass MACRO Foo : Base: the macro token between the keyword and the identifier defeats the C++ signal, so ambiguous.hfiles fall back to the C grammar.Fix
PR #1133 — extend the
looksLikeCpppattern to also accept an all-caps macro betweenclass/structand the identifier before the:/{.