Mercurial > hg > CbC > CbC_llvm
view clang/test/SemaCXX/invalid-template-base-specifier.cpp @ 222:81f6424ef0e3 llvm-original
LLVM original branch
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 18 Jul 2021 22:10:01 +0900 |
parents | 79ff65ed7e25 |
children |
line wrap: on
line source
// RUN: %clang_cc1 -frecovery-ast -verify %s bool Foo(int *); // expected-note 3{{candidate function not viable}} template <typename T> struct Crash : decltype(Foo(T())) { // expected-error {{no matching function for call to 'Foo'}} Crash(){}; }; void test() { Crash<int>(); } // expected-note {{in instantiation of template class}} template <typename T> using Alias = decltype(Foo(T())); // expected-error {{no matching function for call to 'Foo'}} template <typename T> struct Crash2 : decltype(Alias<T>()) { // expected-note {{in instantiation of template type alias 'Alias' requested here}} Crash2(){}; }; void test2() { Crash2<int>(); } // expected-note {{in instantiation of template class 'Crash2<int>' requested here}} template <typename T> class Base {}; template <typename T> struct Crash3 : Base<decltype(Foo(T()))> { // expected-error {{no matching function for call to 'Foo'}} Crash3(){}; }; void test3() { Crash3<int>(); } // expected-note {{in instantiation of template class}}