[InstCombine] Preserve NSW flags for `lshr (mul nuw X, C1), C2 -> mul nuw nsw X,...
[llvm-project.git] / clang / test / CodeGenCXX / copy-initialization.cpp
blobaa0c6395f158d07dfc792a5d39d279760b65e472
1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
3 struct Foo {
4 Foo();
5 Foo(const Foo&);
6 };
8 struct Bar {
9 Bar();
10 operator const Foo&() const;
13 void f(Foo);
15 // CHECK-LABEL: define{{.*}} void @_Z1g3Foo(ptr noundef %foo)
16 void g(Foo foo) {
17 // CHECK: call void @_ZN3BarC1Ev
18 // CHECK: @_ZNK3BarcvRK3FooEv
19 // CHECK: call void @_Z1f3Foo
20 f(Bar());
21 // CHECK: call void @_ZN3FooC1Ev
22 // CHECK: call void @_Z1f3Foo
23 f(Foo());
24 // CHECK: call void @_ZN3FooC1ERKS_
25 // CHECK: call void @_Z1f3Foo
26 f(foo);
27 // CHECK: ret