summaryrefslogtreecommitdiffstats
path: root/test/Parser/cxx-default-args.cpp
blob: a084fb0812bace6c8e1b1c00a72bceaaa3232cbc (plain)
1
2
3
4
5
6
7
8
9
// RUN: %clang_cc1 -fsyntax-only -verify %s

// PR6647
class C {
  // After the error, the rest of the tokens inside the default arg should be
  // skipped, avoiding a "expected ';' after class" after 'undecl'.
  void m(int x = undecl + 0); // expected-error {{use of undeclared identifier 'undecl'}}
};

OpenPOWER on IntegriCloud