]> granicus.if.org Git - clang/commitdiff
Split test to test -Wshadow with emmintrin.h more portable.
authorTed Kremenek <kremenek@apple.com>
Tue, 8 Oct 2013 00:03:41 +0000 (00:03 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 8 Oct 2013 00:03:41 +0000 (00:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192144 91177308-0d34-0410-b5e6-96231b3b80d8

test/Sema/warn-shadow-intrinsics.c [new file with mode: 0644]
test/Sema/warn-shadow.c

diff --git a/test/Sema/warn-shadow-intrinsics.c b/test/Sema/warn-shadow-intrinsics.c
new file mode 100644 (file)
index 0000000..b291426
--- /dev/null
@@ -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;
+}
index a9979ff9d7967172e8b7ba27801e80c7a7f96f8a..32aca8d612b21d6d412e47df0145a43bfe7f2e42 100644 (file)
@@ -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;
-}