Surface newly-reachable clang 22 lambda, record, and constexpr accessors#808
Merged
tannergooding merged 3 commits intoJul 17, 2026
Merged
Conversation
Add mid-layer CXCursor accessors (IsCapturelessLambda, IsGenericLambda, LambdaCaptureDefault) and forward them from LambdaExpr through its lambda class, alongside LambdaClass. The capture-enumeration bridges only dispatch on BlockDecl/CapturedStmt, so they stay unsurfaced for lambdas. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Wrap the CXXRecordDecl structural bridges at the mid layer (Is* aggregate/ empty/polymorphic/trivial/standard-layout family and the Has* special-member and field flags) and surface them on CXXRecordDecl. The native shims already guard on getDefinition(), so they stay well-defined on incomplete types. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Wrap Cursor_getConstexprKind/getInitStyle/getIfStatementKind at the mid layer and surface FunctionDecl.ConstexprKind (with derived IsConstexpr/IsConsteval), VarDecl.InitStyle, and IfStmt.StatementKind. VarDecl.isConstexpr has no bridge, so it stays unsurfaced; the IfStmt-scoped Cursor.IsConstexpr is unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Surfaces newly-reachable clang 22 AST accessors on the mid- and high-level managed layers now that the v22 libClangSharp port (#805) has landed. Managed-only; no native or generated-binding changes.
LambdaExpr cluster -- adds
LambdaClass,CaptureDefault,IsGenericLambda, andIsCapturelessLambda, all routed through the lambda'sCXXRecordDecl(where the native predicates dispatch). Capture enumeration is intentionally not surfaced: thegetNumCaptures/getCapturesCXXThis/getCaptureKind/getCapturedVarbridges dispatch only onBlockDecl/CapturedStmt, never on theLambdaExpr, so exposing them would need new native shims.CXXRecordDecl structural predicates -- 10
Is*(aggregate, empty, polymorphic, trivial, standard-layout, ...) and 9Has*special-member/field flags. The native shims already guard ongetDefinition(), so these are well-defined (returnfalse) on incomplete types.constexpr family --
FunctionDecl.ConstexprKind(plus derivedIsConstexpr/IsConsteval),VarDecl.InitStyle, andIfStmt.StatementKind.VarDecl.isConstexprhas no bridge so it stays unsurfaced; the existingIfStmt-scopedCursor.IsConstexpris unchanged.Each cluster forwards through a new mid-layer
CXCursoraccessor (25 total). Interop tests cover all three; full suite green, 0 warnings.Note
Authored with Copilot.