[clang] [clang][ObjC][CodeComplete] Fix crash on C-Style cast with parenthesized operand in ObjC++ (PR #180343)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 13 21:02:52 PST 2026
================
@@ -5152,7 +5152,7 @@ void SemaCodeCompletion::CodeCompletePostfixExpression(Scope *S, ExprResult E,
QualType PreferredType) {
if (E.isInvalid())
CodeCompleteExpression(S, PreferredType);
- else if (getLangOpts().ObjC)
+ else if (getLangOpts().ObjC && !E.get()->getType().isNull())
----------------
edisongz wrote:
> but there's no reason to leave the hazard
Thanks for the feedback. Moved the guard into `CodeCompleteObjCInstanceMessage` as suggested.
https://github.com/llvm/llvm-project/pull/180343
More information about the cfe-commits
mailing list