Author: Timothy Choi Date: 2025-08-23T15:31:02+02:00 New Revision: 66eaa80c39ae0f8aa6cd58024ac6562037038b5f
URL: https://github.com/llvm/llvm-project/commit/66eaa80c39ae0f8aa6cd58024ac6562037038b5f DIFF: https://github.com/llvm/llvm-project/commit/66eaa80c39ae0f8aa6cd58024ac6562037038b5f.diff LOG: [Clang] Remove redundant check for scoped enums in shift operators (#152865) This check, introduced in 0bf3140424a0a13a928a4e6bf0f112e6167a5636, has not been necessary since 21673c4e7ec08457b53798b9879b7cc9a5909eb8 Added: Modified: clang/lib/Sema/SemaExpr.cpp Removed: ################################################################################ diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index caa04e73ab2ab..a73093545aa7f 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -11808,12 +11808,6 @@ QualType Sema::CheckShiftOperands(ExprResult &LHS, ExprResult &RHS, return ResultTy; } - // C++0x: Don't allow scoped enums. FIXME: Use something better than - // hasIntegerRepresentation() above instead of this. - if (isScopedEnumerationType(LHSType) || - isScopedEnumerationType(RHSType)) { - return InvalidOperands(Loc, LHS, RHS); - } DiagnoseBadShiftValues(*this, LHS, RHS, Loc, Opc, LHSType); // "The type of the result is that of the promoted left operand." _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits