blob: f70f9df6c73b9c1e8aa475795edfd31de62f77a1 [file] [log] [blame]
Eli Friedman0c706c22011-09-19 23:17:44 +00001// RUN: %clang_cc1 %s -verify -fsyntax-only -pedantic
Andy Gibbs8e8fb3b2012-10-19 12:44:48 +00002// expected-no-diagnostics
Eli Friedman0c706c22011-09-19 23:17:44 +00003
4// This file tests the clang extension which allows initializing the components
5// of a complex number individually using an initialization list. Basically,
6// if you have an explicit init list for a complex number that contains two
7// initializers, this extension kicks in to turn it into component-wise
8// initialization.
9//
10// See also the testcase for the C version of this extension in
11// test/Sema/complex-init-list.c.
12
13// Basic testcase
14// (No pedantic warning is necessary because _Complex is not part of C++.)
15_Complex float valid1 = { 1.0f, 2.0f };