diff options
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/PCH/ext_vector.c | 10 | ||||
| -rw-r--r-- | clang/test/PCH/ext_vector.h | 4 |
2 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/PCH/ext_vector.c b/clang/test/PCH/ext_vector.c new file mode 100644 index 00000000000..4b5c25980e5 --- /dev/null +++ b/clang/test/PCH/ext_vector.c @@ -0,0 +1,10 @@ +// Test this without pch. +// RUN: clang-cc -include %S/ext_vector.h -fsyntax-only -verify %s && + +// Test with pch. +// RUN: clang-cc -emit-pch -o %t %S/ext_vector.h && +// RUN: clang-cc -include-pch %t -fsyntax-only -verify %s + +int test(float4 f4) { + return f4.xy; // expected-error{{float2}} +} diff --git a/clang/test/PCH/ext_vector.h b/clang/test/PCH/ext_vector.h new file mode 100644 index 00000000000..39ab9233584 --- /dev/null +++ b/clang/test/PCH/ext_vector.h @@ -0,0 +1,4 @@ +// Header file for ext_vector.c PCH test + +typedef __attribute__((ext_vector_type(2))) float float2; +typedef __attribute__((ext_vector_type(4))) float float4; |

