diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-20 21:20:51 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-20 21:20:51 +0000 |
commit | 583e75cce441388bc562fa225d23499261a0091e (patch) | |
tree | 5944a7c248d4a8c858db45abc3444eb69270a3c8 /test/CodeGenCXX/cxx1z-class-deduction.cpp | |
parent | 7442d6faa2719e4e7d33a7021c406c5a4facd74d (diff) |
Notes
Diffstat (limited to 'test/CodeGenCXX/cxx1z-class-deduction.cpp')
-rw-r--r-- | test/CodeGenCXX/cxx1z-class-deduction.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/CodeGenCXX/cxx1z-class-deduction.cpp b/test/CodeGenCXX/cxx1z-class-deduction.cpp new file mode 100644 index 000000000000..0761f2129b51 --- /dev/null +++ b/test/CodeGenCXX/cxx1z-class-deduction.cpp @@ -0,0 +1,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; +} |