[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGenCXX / dereferenceable.cpp
blob0568521b8946c2011c9ed54bca0583b3efdb369b
1 // RUN: %clang_cc1 %s -emit-llvm -o - -triple x86_64-linux-gnu | FileCheck %s
3 struct A { void *p; void *q; void *r; };
5 struct B : A {};
6 static_assert(sizeof(B) == 24);
8 // CHECK: define{{.*}} nonnull align 8 dereferenceable(24) {{.*}} @_Z1fR1B({{.*}} nonnull align 8 dereferenceable(24)
9 B &f(B &b) { return b; }
11 struct C : virtual A {};
12 static_assert(sizeof(C) == 32);
14 // CHECK: define{{.*}} nonnull align 8 dereferenceable(8) {{.*}} @_Z1fR1C({{.*}} nonnull align 8 dereferenceable(8)
15 C &f(C &c) { return c; }