Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CXX / temp / temp.param / p9.cpp
blobb2318c275e44cbc466567adf629ed87922222196
1 // RUN: %clang_cc1 -fsyntax-only -std=c++98 -verify %s
3 // A default template-argument shall not be specified in a function
4 // template declaration or a function template definition
5 template<typename T = int> // expected-warning{{default template arguments for a function template are a C++11 extension}}
6 void foo0(T);
7 template<typename T = int> // expected-warning{{default template arguments for a function template are a C++11 extension}}
8 void foo1(T) { }
10 // [...] nor in the template-parameter-list of the definition of a
11 // member of a class template.
12 template<int N>
13 struct X0 {
14 void f();
17 template<int N = 0> // expected-error{{cannot add a default template argument}}
18 void X0<N>::f() { }
20 class X1 {
21 template<template<int> class TT = X0> // expected-error{{not permitted on a friend template}}
22 friend void f2();