[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / C / drs / dr208.c
blob67c6bc1a5b4e4b3c779d144fb3c976a395ed3227
1 /* RUN: %clang_cc1 -std=c99 -verify -emit-llvm -o - %s | FileCheck %s
2 RUN: %clang_cc1 -std=c11 -verify -emit-llvm -o - %s | FileCheck %s
3 RUN: %clang_cc1 -std=c17 -verify -emit-llvm -o - %s | FileCheck %s
4 RUN: %clang_cc1 -std=c2x -verify -emit-llvm -o - %s | FileCheck %s
5 */
7 /* WG14 DR208: yes
8 * Ambiguity in initialization
9 */
10 int dr208_init(int);
11 void dr208(void) {
12 int a[2] = {
13 dr208_init(0), /* expected-note {{previous initialization with side effects is here (side effects will not occur at run time)}} */
14 dr208_init(1),
15 [0] = dr208_init(2) /* expected-warning {{initializer overrides prior initialization of this subobject}} */
18 /* CHECK-NOT: call {{signext i32|i32}} @dr208_init(i32 noundef {{(signext )?}}0)
19 CHECK-DAG: call {{signext i32|i32}} @dr208_init(i32 noundef {{(signext )?}}1)
20 CHECK-DAG: call {{signext i32|i32}} @dr208_init(i32 noundef {{(signext )?}}2)
21 CHECK-NOT: call {{signext i32|i32}} @dr208_init(i32 noundef {{(signext )?}}0)