From dbc68bd28d5868f3b1b5179add40b33cec7bea07 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Fri, 7 Oct 2011 20:08:35 +0000 Subject: [PATCH] Add a simple PCH test for _Atomic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141409 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/PCH/types.c | 6 ++++-- test/PCH/types.h | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/test/PCH/types.c b/test/PCH/types.c index ba00dc6824..fc37a9c33d 100644 --- a/test/PCH/types.c +++ b/test/PCH/types.c @@ -14,12 +14,14 @@ __attribute__((address_space(1))) int int_as_one; ASInt *as_int_ptr1 = &int_value; // expected-error{{changes address space of pointer}} ASInt *as_int_ptr2 = &int_as_one; -// FIXME: TYPE_FIXED_WIDTH_INT - // TYPE_COMPLEX _Complex float Cfloat_val; Cfloat *Cfloat_ptr = &Cfloat_val; +// TYPE_ATOMIC +_Atomic(int) AtomicInt_val; +AtomicInt *AtomicInt_ptr = &AtomicInt_val; + // TYPE_POINTER int_ptr int_value_ptr = &int_value; diff --git a/test/PCH/types.h b/test/PCH/types.h index ab42331fe4..7df3f99700 100644 --- a/test/PCH/types.h +++ b/test/PCH/types.h @@ -3,11 +3,12 @@ // TYPE_EXT_QUAL typedef __attribute__((address_space(1))) int ASInt; -// FIXME: TYPE_FIXED_WIDTH_INT - // TYPE_COMPLEX typedef _Complex float Cfloat; +// TYPE_ATOMIC +typedef _Atomic(int) AtomicInt; + // TYPE_POINTER typedef int * int_ptr; -- 2.40.0