================ @@ -11773,7 +11786,25 @@ QualType Sema::CheckShiftOperands(ExprResult &LHS, ExprResult &RHS, isScopedEnumerationType(RHSType)) { return InvalidOperands(Loc, LHS, RHS); } - DiagnoseBadShiftValues(*this, LHS, RHS, Loc, Opc, LHSType); + + BadShiftValueKind BSVKind = + DiagnoseBadShiftValues(*this, LHS, RHS, Loc, Opc, LHSType); + if (ExprEvalContexts.back().isConstantEvaluated()) { ---------------- shafik wrote:
This feels pretty hacky but perhaps I am not fully understanding the solution. Can you update the description with more details on why this is a good approach to the problem. https://github.com/llvm/llvm-project/pull/70307 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits