shafik added inline comments.
================ Comment at: clang/lib/AST/Interp/Interp.h:133 + // operand, and must not overflow the corresponding unsigned type. + // C++2a [expr.shift]p2: E1 << E2 is the unique value congruent to + // E1 x 2^E2 module 2^N. ---------------- Maybe this quote for C++20 should be moved below the else block with a comment noting that C++20 forward the above is no longer UB? My first reading I thought the second quote applied to the `else if` below and was super confused. ================ Comment at: clang/lib/AST/Interp/Interp.h:136 + if (LHS.isNegative()) + S.CCEDiag(E, diag::note_constexpr_lshift_of_negative) << 12; + else if (LHS.toUnsigned().countLeadingZeros() < static_cast<unsigned>(RHS)) ---------------- Do we test this diagnostic? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150209/new/ https://reviews.llvm.org/D150209 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits