add opensuse toolchain support, patch by Ismail Donmez!
[clang/stm8.git] / test / Parser / DelayedTemplateParsing.cpp
blobb447fff2f1c03f229eb153a9c68675d802978bf4
1 // RUN: %clang_cc1 -fdelayed-template-parsing -fsyntax-only -verify %s
3 template <class T>
4 class A {
5 void foo() {
6 undeclared();
8 void foo2();
9 };
11 template <class T>
12 class B {
13 void foo4() { } // expected-note {{previous definition is here}} expected-note {{previous definition is here}}
14 void foo4() { } // expected-error {{class member cannot be redeclared}} expected-error {{redefinition of 'foo4'}} expected-note {{previous definition is here}}
18 template <class T>
19 void B<T>::foo4() {// expected-error {{redefinition of 'foo4'}}
22 template <class T>
23 void A<T>::foo2() {
24 undeclared();
28 template <class T>
29 void foo3() {
30 undeclared();
33 template void A<int>::foo2();
36 void undeclared()
41 template <class T> void foo5() {} //expected-note {{previous definition is here}}
42 template <class T> void foo5() {} // expected-error {{redefinition of 'foo5'}}