[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / Sema / builtin_vectorelements.c
blob8f669075bcee5ac0e4903125bc1c9d1f4f1f0a20
1 // RUN: %clang_cc1 -triple aarch64 -fsyntax-only -verify -disable-llvm-passes %s
3 void test_builtin_vectorelements() {
4 __builtin_vectorelements(int); // expected-error {{argument to __builtin_vectorelements must be of vector type}}
5 __builtin_vectorelements(float); // expected-error {{argument to __builtin_vectorelements must be of vector type}}
6 __builtin_vectorelements(long*); // expected-error {{argument to __builtin_vectorelements must be of vector type}}
8 int a;
9 __builtin_vectorelements(a); // expected-error {{argument to __builtin_vectorelements must be of vector type}}
11 typedef int veci4 __attribute__((vector_size(16)));
12 (void) __builtin_vectorelements(veci4);
14 veci4 vec;
15 (void) __builtin_vectorelements(vec);
17 typedef veci4 some_other_vec;
18 (void) __builtin_vectorelements(some_other_vec);
20 struct Foo { int a; };
21 __builtin_vectorelements(struct Foo); // expected-error {{argument to __builtin_vectorelements must be of vector type}}