1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2 // RUN: %clang_cc1 %s -emit-llvm -triple x86_64-unknown-linux-gnu -o - | FileCheck %s
4 // CHECK: @[[STR:.*]] = private unnamed_addr constant [45 x i8] c"_Generic selection expression should be fine\00", section "llvm.metadata"
5 // CHECK-NEXT: @[[FILENAME:.*]] = private unnamed_addr constant {{.*}}, section "llvm.metadata"
6 // CHECK-NEXT: @[[ARGS:.*]] = private unnamed_addr constant { i32 } zeroinitializer, section "llvm.metadata"
8 // CHECK-LABEL: @_Z1fv(
10 // CHECK-NEXT: [[N:%.*]] = alloca i32, align 4
11 // CHECK-NEXT: [[J:%.*]] = alloca i32, align 4
12 // CHECK-NEXT: store i32 10, ptr [[N]], align 4
13 // CHECK-NEXT: call void @llvm.var.annotation.p0.p0(ptr [[J]], ptr @[[STR]], ptr @[[FILENAME]], i32 {{.*}}, ptr @[[ARGS]])
14 // CHECK-NEXT: store i32 0, ptr [[J]], align 4
15 // CHECK-NEXT: ret void
19 [[clang::annotate("_Generic selection expression should be fine", _Generic(n
, int : 0, default : 1))]]
20 int j
= 0; // second arg should resolve to 0 fine