Argyrios Kyrtzidis | 7fd3a64 | 2010-03-30 22:14:32 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | |
| 3 | // PR6647 |
| 4 | class 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 Kyrtzidis | 2b602ad | 2010-08-06 09:47:24 +0000 | [diff] [blame] | 10 | typedef struct Inst { |
| 11 | void m(int x=0); |
| 12 | } *InstPtr; |
Argyrios Kyrtzidis | 219cffc | 2010-08-09 21:08:13 +0000 | [diff] [blame] | 13 | |
| 14 | struct X { |
| 15 | void f(int x = 1:); // expected-error {{unexpected end of default argument expression}} |
| 16 | }; |