1c99fa0b8SRichard Smith // RUN: %clang_cc1 %s -emit-llvm -o - -triple x86_64-linux-gnu | FileCheck %s 2c99fa0b8SRichard Smith 3c99fa0b8SRichard Smith struct A { void *p; void *q; void *r; }; 4c99fa0b8SRichard Smith 5c99fa0b8SRichard Smith struct B : A {}; 6c99fa0b8SRichard Smith static_assert(sizeof(B) == 24); 7c99fa0b8SRichard Smith 8*fd739804SFangrui Song // CHECK: define{{.*}} nonnull align 8 dereferenceable(24) {{.*}} @_Z1fR1B({{.*}} nonnull align 8 dereferenceable(24) f(B & b)9c99fa0b8SRichard SmithB &f(B &b) { return b; } 10c99fa0b8SRichard Smith 11c99fa0b8SRichard Smith struct C : virtual A {}; 12c99fa0b8SRichard Smith static_assert(sizeof(C) == 32); 13c99fa0b8SRichard Smith 14*fd739804SFangrui Song // CHECK: define{{.*}} nonnull align 8 dereferenceable(8) {{.*}} @_Z1fR1C({{.*}} nonnull align 8 dereferenceable(8) f(C & c)15c99fa0b8SRichard SmithC &f(C &c) { return c; } 16