[AMDGPU] Update base addr of dyn alloca considering GrowingUp stack (#119822)
[llvm-project.git] / clang / test / CXX / temp / temp.fct.spec / temp.deduct / temp.deduct.call / basic.cpp
blob33efac02482dc0142391771731b9893bf93a8c2d
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 template<typename T> struct A { };
5 template<typename T> A<T> f0(T*);
7 void test_f0(int *ip, float const *cfp) {
8 A<int> a0 = f0(ip);
9 A<const float> a1 = f0(cfp);
12 template<typename T> void f1(T*, int);
14 void test_f1(int *ip, float fv) {
15 f1(ip, fv);
18 template<typename T> void f2(T*, T*); // expected-note {{candidate template ignored: could not match 'T *' against 'ConvToIntPtr'}} \
19 // expected-note{{candidate template ignored: deduced conflicting types for parameter 'T' ('int' vs. 'float')}}
21 struct ConvToIntPtr {
22 operator int*() const;
25 void test_f2(int *ip, float *fp) {
26 f2(ip, ConvToIntPtr()); // expected-error{{no matching function}}
27 f2(ip, ip); // okay
28 f2(ip, fp); // expected-error{{no matching function}}
31 namespace test3 {
32 template<typename T>
33 struct bar { };
35 template<typename T>
36 struct foo {
37 operator bar<T>();
40 template<typename T>
41 void func(bar<T>) { // expected-note {{candidate template ignored: could not match 'bar' against 'foo'}}
44 void test() {
45 func(foo<int>()); // expected-error {{no matching function}}