// C++ initialization is handled later.
}
- if (ElemType->isScalarType())
+ // FIXME: Need to handle atomic aggregate types with implicit init lists.
+ if (ElemType->isScalarType() || ElemType->isAtomicType())
return CheckScalarType(Entity, IList, ElemType, Index,
StructuredList, StructuredIndex);
+ assert((ElemType->isRecordType() || ElemType->isVectorType() ||
+ ElemType->isArrayType()) && "Unexpected type");
+
if (const ArrayType *arrayType = SemaRef.Context.getAsArrayType(ElemType)) {
// arrayType can be incomplete if we're initializing a flexible
// array member. There's nothing we can do with the completed
_Atomic(int*) PR12527_a;
void PR12527() { int *b = PR12527_a; }
+
+void PR16931(int* x) { // expected-note {{passing argument to parameter 'x' here}}
+ typedef struct { _Atomic(_Bool) flag; } flag;
+ flag flagvar = { 0 };
+ PR16931(&flagvar); // expected-warning {{incompatible pointer types}}
+}