2010-04-20 15:18:24 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify -ftemplate-depth 5 -ftemplate-backtrace-limit 4 %s
|
2011-11-22 03:36:32 +08:00
|
|
|
// RUN: %clang -fsyntax-only -Xclang -verify -ftemplate-depth-5 -ftemplate-backtrace-limit=4 %s
|
|
|
|
// RUN: %clang -fsyntax-only -Xclang -verify -ftemplate-depth=5 -ftemplate-backtrace-limit=4 %s
|
2009-03-10 08:06:19 +08:00
|
|
|
|
2010-04-20 15:18:24 +08:00
|
|
|
template<typename T> struct X : X<T*> { }; \
|
|
|
|
// expected-error{{recursive template instantiation exceeded maximum depth of 5}} \
|
|
|
|
// expected-note 3 {{instantiation of template class}} \
|
2010-04-21 13:40:43 +08:00
|
|
|
// expected-note {{skipping 2 contexts in backtrace}} \
|
2011-11-22 03:36:32 +08:00
|
|
|
// expected-note {{use -ftemplate-depth=N to increase recursive template instantiation depth}}
|
2009-03-10 08:06:19 +08:00
|
|
|
|
|
|
|
void test() {
|
2009-03-11 02:03:33 +08:00
|
|
|
(void)sizeof(X<int>); // expected-note {{instantiation of template class}}
|
2009-03-10 08:06:19 +08:00
|
|
|
}
|