[all-commits] [llvm/llvm-project] 9c9fff: [clang][Sema] Split a err_typecheck_assign_const d...
Michael Buch via All-commits
all-commits at lists.llvm.org
Thu Feb 12 07:53:26 PST 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9c9fff983fff3b92406065e33468234b28278b11
https://github.com/llvm/llvm-project/commit/9c9fff983fff3b92406065e33468234b28278b11
Author: Michael Buch <michaelbuch12 at gmail.com>
Date: 2026-02-12 (Thu, 12 Feb 2026)
Changed paths:
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/lib/Sema/SemaExpr.cpp
M lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
Log Message:
-----------
[clang][Sema] Split a err_typecheck_assign_const diagnostic into a separate tablegen entry (#179895)
As of recently, in LLDB, when trying to mutate an object in a const
method, we emit a hint about why we failed to run the expression (with
an associated hint on how to fix it). This relies on the diagnostic ID
that Clang told us about. However, we only want to emit this message
when we assign to a member in a const method. But not all the other
situations that `err_typecheck_assign` gets used in. We currently work
around this by grepping the error message, but it would be nice if we
could just rely on the diagnostic ID.
This patch splits out the relevant diagnostic.
This isn't urgent and we can live with the "grep the error message"
approach. But if the Clang maintainers don't feel strongly about keeping
the tablegen as-is, it'd be nice to clean up from LLDB's perspective.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list