objc_super is special and needs LookupPredefedObjCSuperType() called before performing builtin type comparisons.
This fixes an error when compiling macOS headers. A test is added.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I'll go ahead and commit this after the builds pass, as it's affecting an user and the fix is simple and obvious. Hopefully post-commit review is acceptable per my understanding of the rules.
Thanks, this fixes the specific translation unit I was looking at today. It's going to take some time before I have full build results but I don't expect any problems.
clang/lib/Sema/SemaDecl.cpp | ||
---|---|---|
9674 | Can we avoid doing this except for the small number of builtins that use struct objc_super? We already have the BuiltinID. |
clang/lib/Sema/SemaDecl.cpp | ||
---|---|---|
9674 | LookupPredefedObjCSuperType() already checks if the identifier is "objc_msgSendSuper". But it'd probably be more efficient to check the BuiltinID. I'll follow this up tomorrow. |
Oh, I didn't notice that this only did work conditionally based on the builtin ID. Yes, please make a function like lookupNecessaryTypesForBuiltin that takes the builtin ID. Maybe we can generalize this to solve the problem with that other builtin, too.
Can we avoid doing this except for the small number of builtins that use struct objc_super? We already have the BuiltinID.