// RUN: %clang_cc1 %s -triple aarch64-none-linux-gnu -target-feature +neon -fsyntax-only -verify
// RUN: %clang_cc1 %s -triple aarch64-none-linux-gnu -target-feature +neon -DUSE_LONG -fsyntax-only -verify
// RUN: %clang_cc1 %s -triple arm64-none-linux-gnu -target-feature +neon -fsyntax-only -verify
// RUN: %clang_cc1 %s -triple arm64-none-linux-gnu -target-feature +neon -DUSE_LONG -fsyntax-only -verify
// RUN: %clang_cc1 %s -triple arm64_32-apple-ios -target-feature +neon -fsyntax-only -verify
typedef float float32_t;
typedef unsigned char poly8_t;
typedef unsigned short poly16_t;
// Both "long" and "long long" should work for 64-bit arch like aarch64.
// stdint.h in gnu libc is using "long" for 64-bit arch.
typedef long int64_t;
typedef unsigned long uint64_t;
typedef long long int64_t;
typedef unsigned long long uint64_t;
typedef uint64_t poly64_t;
// Define some valid Neon types.
typedef int int32x2_t;
typedef int int32x4_t;
typedef int64_t int64x1_t;
typedef int64_t int64x2_t;
typedef uint64_t uint64x1_t;
typedef uint64_t uint64x2_t;
typedef float32_t float32x2_t;
typedef float32_t float32x4_t;
typedef poly8_t poly8x16_t;
typedef poly16_t poly16x8_t;
typedef poly64_t poly64x1_t;
typedef poly64_t poly64x2_t;
// The attributes must have a single argument.
typedef int only_one_arg; // expected-error{{attribute takes one argument}}
// The number of elements must be an ICE.
typedef int non_int_width; // expected-error{{attribute requires an integer constant}}
// Only certain element types are allowed.
typedef double double_elt;
typedef void* ptr_elt; // expected-error{{invalid vector element type}}
typedef float32_t bad_poly_elt; // expected-error{{invalid vector element type}}
;
typedef struct aggr aggregate_elt; // expected-error{{invalid vector element type}}
// The total vector size must be 64 or 128 bits.
typedef int int32x1_t; // expected-error{{Neon vector size must be 64 or 128 bits}}
typedef int int32x3_t; // expected-error{{Neon vector size must be 64 or 128 bits}}