diff options
-rw-r--r-- | test/Headers/arm-neon-header.c | 5 | ||||
-rw-r--r-- | test/Sema/arm-neon-types.c | 13 |
2 files changed, 13 insertions, 5 deletions
diff --git a/test/Headers/arm-neon-header.c b/test/Headers/arm-neon-header.c index 3f8b3d1436..e119041110 100644 --- a/test/Headers/arm-neon-header.c +++ b/test/Headers/arm-neon-header.c @@ -3,8 +3,3 @@ // RUN: %clang_cc1 -x c++ -triple thumbv7-apple-darwin10 -target-cpu cortex-a8 -fsyntax-only -Wvector-conversions -verify %s #include <arm_neon.h> - -// Radar 8228022: Should not report incompatible vector types. -int32x2_t test(int32x2_t x) { - return vshr_n_s32(x, 31); -} diff --git a/test/Sema/arm-neon-types.c b/test/Sema/arm-neon-types.c new file mode 100644 index 0000000000..40513c4ff7 --- /dev/null +++ b/test/Sema/arm-neon-types.c @@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -triple thumbv7-apple-darwin10 -target-cpu cortex-a8 -fsyntax-only -Wvector-conversions -verify %s + +#include <arm_neon.h> + +// Radar 8228022: Should not report incompatible vector types. +int32x2_t test(int32x2_t x) { + return vshr_n_s32(x, 31); +} + +// ...but should warn when the types really do not match. +float32x2_t test2(uint32x2_t x) { + return vcvt_n_f32_s32(x, 0); // expected-warning {{incompatible vector types}} +} |