[clang] [Clang] Explain why a type trait evaluated to false. (PR #141238)
via cfe-commits
cfe-commits at lists.llvm.org
Fri May 23 08:57:37 PDT 2025
================
@@ -1762,6 +1762,29 @@ def err_user_defined_msg_constexpr : Error<
"%sub{subst_user_defined_msg}0 must be produced by a "
"constant expression">;
+// Type traits explanations
+def note_unsatisfied_trait : Note<"%0 is not %enum_select<TraitName>{"
+ "%TriviallyRelocatable{trivially relocatable}"
+ "}1">;
+
+def note_unsatisfied_trait_reason
+ : Note<"because it "
----------------
cor3ntin wrote:
Yeah, in these cases it's super useful, thanks :D
https://github.com/llvm/llvm-project/pull/141238
More information about the cfe-commits
mailing list