blob: 7fe8474142bac66f7957e580e5b83b2e89f1a663 [file] [log] [blame]
Argyrios Kyrtzidis7fd3a642010-03-30 22:14:32 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3// PR6647
4class C {
5 // After the error, the rest of the tokens inside the default arg should be
6 // skipped, avoiding a "expected ';' after class" after 'undecl'.
7 void m(int x = undecl + 0); // expected-error {{use of undeclared identifier 'undecl'}}
8};
9
Argyrios Kyrtzidis2b602ad2010-08-06 09:47:24 +000010typedef struct Inst {
11 void m(int x=0);
12} *InstPtr;
Argyrios Kyrtzidis219cffc2010-08-09 21:08:13 +000013
14struct X {
15 void f(int x = 1:); // expected-error {{unexpected end of default argument expression}}
16};