diff options
author | Ted Kremenek <kremenek@apple.com> | 2013-10-08 00:03:41 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2013-10-08 00:03:41 +0000 |
commit | aeb87e7ef327905ba1abba879076e9577a2090c4 (patch) | |
tree | 501524fd30fde24d0b9f7c7a9658d07740830854 /test/Sema | |
parent | 185f156e41b38c2452dba7bb0ee44067f8d92538 (diff) | |
download | clang-aeb87e7ef327905ba1abba879076e9577a2090c4.tar.gz |
Split test to test -Wshadow with emmintrin.h more portable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192144 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema')
-rw-r--r-- | test/Sema/warn-shadow-intrinsics.c | 11 | ||||
-rw-r--r-- | test/Sema/warn-shadow.c | 10 |
2 files changed, 11 insertions, 10 deletions
diff --git a/test/Sema/warn-shadow-intrinsics.c b/test/Sema/warn-shadow-intrinsics.c new file mode 100644 index 0000000000..b291426395 --- /dev/null +++ b/test/Sema/warn-shadow-intrinsics.c @@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -ffreestanding -triple x86_64-apple-macosx10.8.0 -fsyntax-only %s + +#include <emmintrin.h> + +// Test that using two macros from emmintrin do not cause a +// useless -Wshadow warning. +void rdar10679282() { + __m128i qf = _mm_setzero_si128(); + qf = _mm_slli_si128(_mm_add_epi64(qf, _mm_srli_si128(qf, 8)), 8); // no-warning + (void) qf; +} diff --git a/test/Sema/warn-shadow.c b/test/Sema/warn-shadow.c index a9979ff9d7..32aca8d612 100644 --- a/test/Sema/warn-shadow.c +++ b/test/Sema/warn-shadow.c @@ -1,7 +1,5 @@ // RUN: %clang_cc1 -verify -fsyntax-only -fblocks -Wshadow %s -#include <emmintrin.h> - int i; // expected-note 3 {{previous declaration is here}} void foo() { @@ -61,11 +59,3 @@ void rdar8883302() { void test8() { int bob; // expected-warning {{declaration shadows a variable in the global scope}} } - -// Test that using two macros from emmintrin do not cause a -// useless -Wshadow warning. -void rdar10679282() { - __m128i qf = _mm_setzero_si128(); - qf = _mm_slli_si128(_mm_add_epi64(qf, _mm_srli_si128(qf, 8)), 8); // no-warning - (void) qf; -} |