Registry Mirror
Skip to content

Conversation

@tannergooding

Copy link
Copy Markdown
Member

Surfaces the clang 22 Type-side classification predicates and FunctionProtoType exception-spec accessors on the managed AST, now that the v22 libClangSharp port bridges them. Managed-only; no native or generated-binding changes. Complements the cursor-side predicates from #808.


Type classifiers -- IsScalarType, IsArithmeticType, IsFloatingType, IsRealFloatingType, IsAggregateType, IsObjectType, plus the HasPointerRepresentation/HasIntegerRepresentation/HasFloatingRepresentation flags. These dispatch on the generic Type, so they live on Type and forward through new mid-layer CXType accessors.

AutoType -- IsConstrained, IsDecltypeAuto, IsGNUAutoType.

VectorType -- VectorKind (CX_VectorKind).

FunctionProtoType -- HasTrailingReturn and NoexceptExpr. ExceptionSpecType was already surfaced.

The per-exception getExceptionType(i) enumeration is intentionally not surfaced: it's guarded natively by getNumExceptions(), but no count bridge is exposed today, so a clean list would need a new native shim.

Interop tests cover the classifiers, AutoType predicates, VectorKind, and the FunctionProtoType set; full suite green, 0 warnings.

Note

Authored with Copilot.

Adds the scalar/arithmetic/floating/aggregate/object classifiers and pointer/integer/floating representation flags on Type, the constrained/decltype/GNU predicates on AutoType, VectorKind on VectorType, and HasTrailingReturn/NoexceptExpr on FunctionProtoType.

getExceptionType enumeration is left unsurfaced; it needs a getNumExceptions count bridge that isn't exposed today.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@tannergooding
tannergooding merged commit 462a094 into dotnet:main Jul 17, 2026
12 checks passed
@tannergooding
tannergooding deleted the tannergooding-v22-type-predicates branch July 17, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant