diff options
Diffstat (limited to 'clang/test/SemaCXX/constant-expression-cxx11.cpp')
-rw-r--r-- | clang/test/SemaCXX/constant-expression-cxx11.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/clang/test/SemaCXX/constant-expression-cxx11.cpp b/clang/test/SemaCXX/constant-expression-cxx11.cpp index e2b3f091f70..0b36f3b6cb8 100644 --- a/clang/test/SemaCXX/constant-expression-cxx11.cpp +++ b/clang/test/SemaCXX/constant-expression-cxx11.cpp @@ -279,17 +279,17 @@ static_assert(&s.x > &s.y, "false"); // expected-error {{false}} static_assert(0 == &y, "false"); // expected-error {{false}} static_assert(0 != &y, ""); -constexpr bool n3 = 0 <= &y; // expected-error {{must be initialized by a constant expression}} -constexpr bool n4 = 0 >= &y; // expected-error {{must be initialized by a constant expression}} -constexpr bool n5 = 0 < &y; // expected-error {{must be initialized by a constant expression}} -constexpr bool n6 = 0 > &y; // expected-error {{must be initialized by a constant expression}} +constexpr bool n3 = (int*)0 <= &y; // expected-error {{must be initialized by a constant expression}} +constexpr bool n4 = (int*)0 >= &y; // expected-error {{must be initialized by a constant expression}} +constexpr bool n5 = (int*)0 < &y; // expected-error {{must be initialized by a constant expression}} +constexpr bool n6 = (int*)0 > &y; // expected-error {{must be initialized by a constant expression}} static_assert(&x == 0, "false"); // expected-error {{false}} static_assert(&x != 0, ""); -constexpr bool n9 = &x <= 0; // expected-error {{must be initialized by a constant expression}} -constexpr bool n10 = &x >= 0; // expected-error {{must be initialized by a constant expression}} -constexpr bool n11 = &x < 0; // expected-error {{must be initialized by a constant expression}} -constexpr bool n12 = &x > 0; // expected-error {{must be initialized by a constant expression}} +constexpr bool n9 = &x <= (int*)0; // expected-error {{must be initialized by a constant expression}} +constexpr bool n10 = &x >= (int*)0; // expected-error {{must be initialized by a constant expression}} +constexpr bool n11 = &x < (int*)0; // expected-error {{must be initialized by a constant expression}} +constexpr bool n12 = &x > (int*)0; // expected-error {{must be initialized by a constant expression}} static_assert(&x == &x, ""); static_assert(&x != &x, "false"); // expected-error {{false}} |