================ @@ -13273,6 +13273,22 @@ enum { ConstUnknown, // Keep as last element }; +static void MaybeSuggestDerefFixIt(Sema &S, const Expr *E, SourceLocation Loc) { + ExprResult Deref; + Expr *TE = const_cast<Expr *>(E); + { + Sema::TentativeAnalysisScope Trap(S); + Deref = S.ActOnUnaryOp(S.getCurScope(), Loc, tok::star, TE); + } + if (Deref.isUsable() && + Deref.get()->isModifiableLvalue(S.Context, &Loc) == Expr::MLV_Valid && + !E->getType()->isObjCObjectPointerType()) { + S.Diag(Loc, diag::note_typecheck_add_deref_star_not_modifiable_lvalue) ---------------- Rajveer100 wrote:
Sure thing! https://github.com/llvm/llvm-project/pull/94159 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits