[clang] Better diagnostics when assertion fails in `consteval` (PR #130458)
Yanzuo Liu via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 9 06:08:39 PDT 2025
================
@@ -8361,6 +8361,17 @@ class ExprEvaluatorBase
return false;
}
+ // If an assertion fails during constant evaluation, give a specific note explaining that
+ if (FD->getName() == "__assert_fail") {
----------------
zwuis wrote:
The name of corresponding function in Microsoft CRT is `_wassert`.
Can you handle this case?
https://github.com/llvm/llvm-project/pull/130458
More information about the cfe-commits
mailing list