Additional testcase for 0130b6cb5a.

This commit is contained in:
Richard Smith 2020-02-04 11:43:15 -08:00
parent f5d1a9f1cf
commit c99fa0b80c
1 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,15 @@
// RUN: %clang_cc1 %s -emit-llvm -o - -triple x86_64-linux-gnu | FileCheck %s
struct A { void *p; void *q; void *r; };
struct B : A {};
static_assert(sizeof(B) == 24);
// CHECK: define dereferenceable(24) {{.*}} @_Z1fR1B({{.*}} dereferenceable(24)
B &f(B &b) { return b; }
struct C : virtual A {};
static_assert(sizeof(C) == 32);
// CHECK: define dereferenceable(8) {{.*}} @_Z1fR1C({{.*}} dereferenceable(8)
C &f(C &c) { return c; }