[InstCombine] Preserve NSW flags for `lshr (mul nuw X, C1), C2 -> mul nuw nsw X,...
[llvm-project.git] / clang / test / CodeGenCXX / address-of-fntemplate.cpp
blob4840fe89edb84018064a47b7b54251bb5e4bdba5
1 // RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s
2 template <typename T> void f(T) {}
3 template <typename T> void f() { }
5 void test() {
6 // CHECK: @_Z1fIiEvT_
7 void (*p)(int) = &f;
9 // CHECK: @_Z1fIiEvv
10 void (*p2)() = f<int>;
12 // CHECK-LABEL: define linkonce_odr {{.*}}void @_Z1fIiEvT_
13 // CHECK-LABEL: define linkonce_odr {{.*}}void @_Z1fIiEvv
15 namespace PR6973 {
16 template<typename T>
17 struct X {
18 void f(const T&);
21 template<typename T>
22 int g();
24 void h(X<int (*)()> xf) {
25 xf.f(&g<int>);