mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-30 15:46:06 +00:00

Conversion done using the script at https://gist.github.com/nikic/98357b71fd67756b0f064c9517b62a34. These are tests where the conversion worked out of the box and no manual fixup was performed.
28 lines
551 B
C++
28 lines
551 B
C++
// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm %s -o - | \
|
|
// RUN: FileCheck %s
|
|
// RUN: %clang_cc1 -triple i386-apple-darwin -emit-llvm %s -o - | \
|
|
// RUN: FileCheck %s
|
|
|
|
struct A {};
|
|
|
|
struct B
|
|
{
|
|
operator A&();
|
|
};
|
|
|
|
|
|
struct D : public B {
|
|
operator A();
|
|
};
|
|
|
|
extern B f();
|
|
extern D d();
|
|
|
|
int main() {
|
|
const A& rca = f();
|
|
const A& rca2 = d();
|
|
}
|
|
|
|
// CHECK: call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN1BcvR1AEv
|
|
// CHECK: call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN1BcvR1AEv
|