Files
clang-p2996/clang/test/CodeGenObjC/return-objc-object.mm
Eli Friedman 62f3ef2b53 [CGCall] Annotate references with "align" attribute.
If we're going to assume references are dereferenceable, we should also
assume they're aligned: otherwise, we can't actually dereference them.

See also D80072.

Differential Revision: https://reviews.llvm.org/D80166
2020-05-19 20:21:30 -07:00

20 lines
406 B
Plaintext

// RUN: %clang_cc1 -triple x86_64 -emit-llvm -o - %s | FileCheck %s
@protocol P1 @end
@interface NSOperationQueue
{
char ch[64];
double d;
}
@end
NSOperationQueue &f();
NSOperationQueue<P1> &f1();
void call_once() {
f();
f1();
}
// CHECK: call nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0* @_Z1fv()
// CHECK: call nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0* @_Z2f1v()