This patch uses castAs instead of getAs to resolve dereference issue with nullptr boundObjC when calling canAssignObjCInterfaces() or isObjCIdType() in applyObjCTypeArgs() since getAs returns nullptr.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Sema/SemaType.cpp | ||
---|---|---|
956 | Note for future reviewers: This 'if' on both branches dereferences the boundObjC pointer. The true path is just below here, on 959. Second is in the condition inside of the else if on 961, canAssignObjCInterfaces immediately dereferences the parameters. |
clang/lib/Sema/SemaType.cpp | ||
---|---|---|
956 |
Yes. Thank you @erichkeane for reviews! |
Note for future reviewers: This 'if' on both branches dereferences the boundObjC pointer. The true path is just below here, on 959. Second is in the condition inside of the else if on 961, canAssignObjCInterfaces immediately dereferences the parameters.