================ @@ -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()) { ---------------- budimirarandjelovicsyrmia wrote:
This solution originally was posted on [Phabricator](https://reviews.llvm.org/D141192). I reviewed commit and found that it makes more sense to diagnose bad shift values inside function DiagnoseBadShiftValues(...) instead in mentioned IF. If there are no more questions, I will edit this part of code. 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