Details
Details
Diff Detail
Diff Detail
Event Timeline
clang/test/AST/Interp/literals.cpp | ||
---|---|---|
412 | I'd also like some test cases where the result of the operation is discarded. e.g., constexpr int func() { int i = 12; i += 10; return i; } static_assert(func() == 22); and a test with a float-point type (okay for it to fail for the moment): constexpr float func() { float f = 1.0f; f += 10.0f; return f; } static_assert(func() == 11.0f); | |
426 | We also need tests for failure situations: constexpr int func() { int i = __INT_MAX__; i += 1; // oops return i; } constexpr int another() { int i = __INT_MIN__; i -= 1; // oops return i; } |
clang/test/AST/Interp/literals.cpp | ||
---|---|---|
426 | woops, I was sure I added this but it was for the ++/-- patch it seems. |
I'd also like some test cases where the result of the operation is discarded. e.g.,
and a test with a float-point type (okay for it to fail for the moment):