summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/cxx1z-class-deduction.cpp
blob: 0761f2129b51ac2965f57c976182a89fcdf23446 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// RUN: %clang_cc1 -std=c++1z %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s

template<typename T> struct A {
  A(T = 0);
  A(void*);
};

template<typename T> A(T*) -> A<long>;
A() -> A<int>;

// CHECK-LABEL: @_Z1fPi(
void f(int *p) {
  // CHECK: @_ZN1AIiEC
  A a{};

  // CHECK: @_ZN1AIlEC
  A b = p;

  // CHECK: @_ZN1AIxEC
  A c = 123LL;
}