From 952eddef9aff85b1e92626e89baaf7a360e2ac85 Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 22 Dec 2013 00:07:40 +0000 Subject: Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3): https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841 --- test/Parser/cxx-default-args.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test/Parser/cxx-default-args.cpp') diff --git a/test/Parser/cxx-default-args.cpp b/test/Parser/cxx-default-args.cpp index 7fe8474..36abf0d 100644 --- a/test/Parser/cxx-default-args.cpp +++ b/test/Parser/cxx-default-args.cpp @@ -14,3 +14,20 @@ typedef struct Inst { struct X { void f(int x = 1:); // expected-error {{unexpected end of default argument expression}} }; + +// PR13657 +struct T { + template struct T1 { enum {V};}; + template struct T2 { enum {V}; }; + template static int func(int); + + + void f1(T1 = T1()); + void f2(T1 = T1(), T2<0, 5> = T2<0, 5>()); + void f3(int a = T2<0, (T1::V > 10) ? 5 : 6>::V, bool b = 4<5 ); + void f4(bool a = 1 < 0, bool b = 2 > 0 ); + void f5(bool a = 1 > T2<0, 0>::V, bool b = T1::V < 3, int c = 0); + void f6(bool a = T2<0,3>::V < 4, bool b = 4 > T2<0,3>::V); + void f7(bool a = T1::V < 3); + void f8(int = func<0,1<2>(0), int = 1<0, T1(int) = 0); +}; -- cgit v1.1