[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaCXX / invalid-deduction-guide-as-template-candidates.cpp
blobad7441ff4847777dd25f96e1c23711185ae98c09
1 // RUN: %clang_cc1 -std=c++17 -fsyntax-only -verify %s
3 template <class T> class Foo {}; // expected-note {{candidate template ignored: couldn't infer template argument 'T'}} \
4 // expected-note {{implicit deduction guide declared as 'template <class T> Foo(Foo<T>) -> Foo<T>'}} \
5 // expected-note {{candidate function template not viable: requires 1 argument, but 0 were provided}} \
6 // expected-note {{implicit deduction guide declared as 'template <class T> Foo() -> Foo<T>'}}
7 Foo(); // expected-error {{deduction guide declaration without trailing return type}}
8 Foo vs; // expected-error {{no viable constructor or deduction guide for deduction of template arguments of 'Foo'}}