================ @@ -13367,6 +13367,8 @@ static void DiagnoseConstAssignment(Sema &S, const Expr *E, if (!DiagnosticEmitted) { S.Diag(Loc, diag::err_typecheck_assign_const) << ExprRange << ConstVariable << VD << VD->getType(); + S.Diag(Loc, diag::note_typecheck_expression_not_modifiable_lvalue) + << E->getSourceRange(); ---------------- Sirraide wrote:
> This addition caused few more tests to fail. Yes, that much is expected because the tests expect that certain diagnostics (and only those diagnostics) are emitted. You will probably have to update several tests to include this diagnostic because of that. Just make sure that the failures actually make sense (i.e. they’re failing because we’re adding this here, which is expected; we previously weren’t emitting this, and now we are) and that they aren’t something unrelated that your changes broke somehow. 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