-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[NFC] Rename ExtInfo::Uncommon to ExtInfo::ClangTypeInfo. #33117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NFC] Rename ExtInfo::Uncommon to ExtInfo::ClangTypeInfo. #33117
Conversation
@swift-ci please smoke test |
AnyFunctionType(TypeKind Kind, const ASTContext *CanTypeContext, | ||
Type Output, RecursiveTypeProperties properties, | ||
unsigned NumParams, ExtInfo Info) | ||
: TypeBase(Kind, CanTypeContext, properties), Output(Output) { | ||
Bits.AnyFunctionType.ExtInfoBits = Info.Bits; | ||
Bits.AnyFunctionType.HasUncommonInfo = Info.getUncommonInfo().hasValue(); | ||
Bits.AnyFunctionType.HasClangTypeInfo = Info.getClangTypeInfo().hasValue(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @varungandhi-apple, looking at this I was wondering if maybe worth to ExtInfo
to have an hasClangTypeInfo()
API? Just a thought, maybe something like this could not be a relevant gain but could be an improvement over the getClangTypeInfo().hasValue()
calls
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I deliberately avoided that. IMO it doesn't make sense to implement hasXYZ()
, getXYZ()
for every type and optional field; that's precisely what Optional
is for, so you can just return an Optional
and have the caller use that. If it was the case that a large number of callers want to check only for existence, I would've been fine with adding a convenience method, but that's not the case here.
3630010
to
5f18829
Compare
Force pushed because changing some comments above/below created merge conflicts. @swift-ci please smoke test |
Oh wait, some whitespace changes snuck in. 🤦 |
The previous name was poorly chosen (by me). Time to fix that.
5f18829
to
aeda622
Compare
@swift-ci please smoke test |
The previous name was poorly chosen (by me). Time to fix that.
I broke off this commit out of the ExtInfo builder-pattern refactoring (that one's pretty large, like 1k+, 1k-).