summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/shift.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/shift.cpp')
-rw-r--r--clang/test/SemaCXX/shift.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/shift.cpp b/clang/test/SemaCXX/shift.cpp
index f99b53e358a..6c5f1c1913e 100644
--- a/clang/test/SemaCXX/shift.cpp
+++ b/clang/test/SemaCXX/shift.cpp
@@ -82,3 +82,8 @@ void vect_shift_2(vec16 *x, vec16 y) { *x = *x << y; }
void vect_shift_3(vec16 *x, vec8 y) {
*x = *x << y; // expected-error {{vector operands do not have the same number of elements}}
}
+static_assert(-1 >> 1 == -1);
+static_assert(-1 >> 31 == -1);
+static_assert(-2 >> 1 == -1);
+static_assert(-3 >> 1 == -2);
+static_assert(-4 >> 1 == -2);
OpenPOWER on IntegriCloud