Summary
Large, heavily-reflected Unreal Engine C++ classes disappear from the index. UE reflection / visibility markup that tree-sitter's C++ grammar doesn't recognize accumulates parse errors until the enclosing class_specifier collapses into an ERROR node — taking the whole class, its base clause, and its members with it. UCharacterMovementComponent (~240 such macros) vanished entirely.
There are three distinct triggers:
- In-body reflection macro calls — line-leading, no-semicolon
UPROPERTY(...), UFUNCTION(...), UCLASS(...), GENERATED_BODY(), UE_DEPRECATED_*(...), DECLARE_DELEGATE_*(...) decorating members.
- Member/method-level export macros —
*_API / *_EXPORT / *_ABI prefixing exported members (ENGINE_API virtual void Tick(...), static ENGINE_API void AddReferencedObjects(...)); the macro is read as an extra type token, so each declaration falls into error recovery.
- Mid-line annotation macros —
UMETA(...) on an enum value, UPARAM(ref) on a parameter, or a deprecation tag inside a using alias (using FOnNetTick UE_DEPRECATED(5.5, "...") = ...;, which alone collapsed UWorld in World.h).
Reproduction
UCLASS(MinimalAPI)
class UMyMovement : public UPawnMovementComponent, public IRVOAvoidanceInterface
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere) float MaxWalkSpeed;
UFUNCTION(BlueprintCallable) float ComputeSpeed() const;
};
Index → no class node for UMyMovement; its base clause and members are gone.
Real engine headers that reproduce it: CharacterMovementComponent.h, Actor.h, World.h, ActorComponent.h, SkeletalMeshComponent.h, LightComponent.h.
Impact
Every subclass / type-hierarchy / inheritance-impact / blast-radius query that flows through these core UE classes is broken, because the classes are absent from the graph entirely.
Root cause
tree-sitter-cpp doesn't know these tokens are macros; each drops into error recovery and the errors compound until the class_specifier can't close and collapses.
Fix
PR #1158 — three offset-preserving, C++-only pre-parse passes (blankCppAnnotationMacroCalls, blankCppApiPrefixMacros, blankCppInlineAnnotationMacros) that blank the markup before parsing so the class survives. Verified on the real engine headers above (residual tree-sitter errors cut from hundreds to single/low-double digits).
Summary
Large, heavily-reflected Unreal Engine C++ classes disappear from the index. UE reflection / visibility markup that tree-sitter's C++ grammar doesn't recognize accumulates parse errors until the enclosing
class_specifiercollapses into an ERROR node — taking the whole class, its base clause, and its members with it.UCharacterMovementComponent(~240 such macros) vanished entirely.There are three distinct triggers:
UPROPERTY(...),UFUNCTION(...),UCLASS(...),GENERATED_BODY(),UE_DEPRECATED_*(...),DECLARE_DELEGATE_*(...)decorating members.*_API/*_EXPORT/*_ABIprefixing exported members (ENGINE_API virtual void Tick(...),static ENGINE_API void AddReferencedObjects(...)); the macro is read as an extra type token, so each declaration falls into error recovery.UMETA(...)on an enum value,UPARAM(ref)on a parameter, or a deprecation tag inside ausingalias (using FOnNetTick UE_DEPRECATED(5.5, "...") = ...;, which alone collapsedUWorldinWorld.h).Reproduction
Index → no
classnode forUMyMovement; its base clause and members are gone.Real engine headers that reproduce it:
CharacterMovementComponent.h,Actor.h,World.h,ActorComponent.h,SkeletalMeshComponent.h,LightComponent.h.Impact
Every subclass / type-hierarchy / inheritance-impact / blast-radius query that flows through these core UE classes is broken, because the classes are absent from the graph entirely.
Root cause
tree-sitter-cpp doesn't know these tokens are macros; each drops into error recovery and the errors compound until the
class_specifiercan't close and collapses.Fix
PR #1158 — three offset-preserving, C++-only pre-parse passes (
blankCppAnnotationMacroCalls,blankCppApiPrefixMacros,blankCppInlineAnnotationMacros) that blank the markup before parsing so the class survives. Verified on the real engine headers above (residual tree-sitter errors cut from hundreds to single/low-double digits).