add opensuse toolchain support, patch by Ismail Donmez!
[clang/stm8.git] / test / Parser / cxx-default-args.cpp
blob7fe8474142bac66f7957e580e5b83b2e89f1a663
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
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 };
10 typedef struct Inst {
11 void m(int x=0);
12 } *InstPtr;
14 struct X {
15 void f(int x = 1:); // expected-error {{unexpected end of default argument expression}}