diff options
author | Ted Kremenek <kremenek@apple.com> | 2013-10-07 23:51:11 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2013-10-07 23:51:11 +0000 |
commit | 854cc293a70bba6c613600bd72dba6c7ba33e6de (patch) | |
tree | e3b7aae61d5a0112caf0c30c0638da4584a1722e /clang/test/Sema/warn-shadow.c | |
parent | db78c7049e838623cd5cfc774c543a525e00470f (diff) | |
download | bcm5719-llvm-854cc293a70bba6c613600bd72dba6c7ba33e6de.tar.gz bcm5719-llvm-854cc293a70bba6c613600bd72dba6c7ba33e6de.zip |
Suppress useless -Wshadow warning when using _mm* macros from emmintrin.h
Fixes <rdar://problem/10679282>.
I'm not completely satisfied with this patch. Sprinkling "diagnostic ignored"
_Pragmas throughout this file is gross, but I couldn't suppress
it for the entire file.
llvm-svn: 192143
Diffstat (limited to 'clang/test/Sema/warn-shadow.c')
-rw-r--r-- | clang/test/Sema/warn-shadow.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Sema/warn-shadow.c b/clang/test/Sema/warn-shadow.c index 32aca8d612b..a9979ff9d79 100644 --- a/clang/test/Sema/warn-shadow.c +++ b/clang/test/Sema/warn-shadow.c @@ -1,5 +1,7 @@ // RUN: %clang_cc1 -verify -fsyntax-only -fblocks -Wshadow %s +#include <emmintrin.h> + int i; // expected-note 3 {{previous declaration is here}} void foo() { @@ -59,3 +61,11 @@ 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; +} |