================
@@ -19959,7 +19961,10 @@ bool Sema::DiagRuntimeBehavior(SourceLocation Loc,
ArrayRef<const Stmt*> Stmts,
case ExpressionEvaluationContext::ConstantEvaluated:
case ExpressionEvaluationContext::ImmediateFunctionContext:
// Relevant diagnostics should be produced by constant evaluation.
- break;
+
+ // Solution below works for warnings detected in
+ // Sema::DiagnoseBadShiftValues()
+ return DiagIfReachable(Loc, Stmts, PD);
----------------
AaronBallman wrote:
This seems incorrect to me -- `DiagRuntimeBehavior()` is used to diagnose
runtime issues, so we should not be emitting diagnostics for constant
evaluations.
https://github.com/llvm/llvm-project/pull/70307
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits