Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/AST/Interp/Interp.h | ||
---|---|---|
132 | OH! No, and the 12 was just a debug value I forgot to replace with the real thing. |
Comment Actions
LGTM
clang/lib/AST/Interp/Interp.h | ||
---|---|---|
137–138 | Just adding a reference to https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0907r4.html since that is the paper that changed this behavior |
clang/test/AST/Interp/shifts.cpp | ||
---|---|---|
165–171 | I'd like a test along the lines of: constexpr int foo(int a) { return -a << 2; } static_assert(foo(10)); // Should fail constexpr int a = -2; static_assert(foo(a)); // Should be fine static_assert(foo(-a)); // Should fail |
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.