[clang] [compiler-rt] [UBSan] Diagnose assumption violation (PR #104741)
Vitaly Buka via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 24 15:34:35 PDT 2024
================
@@ -633,9 +633,11 @@ static void handleInvalidBuiltin(InvalidBuiltinData *Data, ReportOptions Opts) {
ScopedReport R(Opts, Loc, ET);
- Diag(Loc, DL_Error, ET,
- "passing zero to %0, which is not a valid argument")
- << ((Data->Kind == BCK_CTZPassedZero) ? "ctz()" : "clz()");
+ if (Data->Kind == BCK_AssumePassedFalse)
+ Diag(Loc, DL_Error, ET, "assumption is violated during execution");
----------------
vitalybuka wrote:
Maybe keep generic `passing zero to __builtin_assume()` ?
https://github.com/llvm/llvm-project/pull/104741
More information about the cfe-commits
mailing list