1 // RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -O0 %s -o - 2>&1 -std=c++11 | FileCheck %s
6 // CHECK-LABEL: define void @_ZN7lambdas7LambdasEPc
7 void Lambdas(char *ptr) {
8 auto L1 = [](void *const p __attribute__((pass_object_size(0)))) {
9 return __builtin_object_size(p, 0);
13 auto L2 = [&i](void *const p __attribute__((pass_object_size(0)))) {
14 return __builtin_object_size(p, 0) + i;
17 // CHECK: @llvm.objectsize
19 // CHECK: @llvm.objectsize
23 // CHECK-DAG: define internal i64 @"_ZZN7lambdas7LambdasEPcENK3$_0clEPvU17pass_object_size0"
24 // CHECK-NOT: call i64 @llvm.objectsize
25 // CHECK-DAG: define internal i64 @"_ZZN7lambdas7LambdasEPcENK3$_1clEPvU17pass_object_size0"
26 // CHECK-NOT: call i64 @llvm.objectsize