Fix handling ElaboratedType and TypeWithKeyword instances of id/SEL/Class. - #663
Merged
Merged
Conversation
Member
Author
|
This is probably not the best way to solve this issue, because I would think other types than 'ElaboratedType' and 'TypeWithKeyword' would run into this, but this solution works when parsing all of the frameworks Apple ships with Xcode for iOS, macOS, tvOS and Mac Catalyst. |
…lass. Due to this code: https://github.com/llvm/llvm-project/blob/393783fff844d8919a090f74e641d78c50bcc7f4/clang/tools/libclang/CXType.cpp#L154-L162 an ElaboratedType or TypeWithKeyword can actually have a type of CXType_ObjCClass, CXType_ObjCId, or CXType_ObjCSel, so handle this case.
rolfbjarne
force-pushed
the
special-objc-cxtype
branch
from
January 5, 2026 10:38
c83ae67 to
d626bf9
Compare
tannergooding
approved these changes
Jan 5, 2026
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.
Due to this code:
https://github.com/llvm/llvm-project/blob/393783fff844d8919a090f74e641d78c50bcc7f4/clang/tools/libclang/CXType.cpp#L154-L162
an ElaboratedType or TypeWithKeyword can actually have a type of
CXType_ObjCClass, CXType_ObjCId, or CXType_ObjCSel, so handle this case.