aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Parser/macro-expansion-recovery.cpp
blob: 6826cc04e4df544f4881c501fb91759fabe15669 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// RUN: %clang_cc1 -fsyntax-only -verify %s

namespace GH143216 {
#define A x y
enum { A }; // expected-error {{missing ',' between enumerators}}

#define B x y
void f() {
    int a[2];
    auto [B] = a; // expected-error {{expected ','}}
}

#define C <int!
template <class T> class D;
D C; // expected-error {{expected unqualified-id}} \
     // expected-error {{expected '>'}} \
     // expected-note {{to match this '<'}}

#define E F::{
class F { E }}; // expected-error {{expected identifier}} \
                // expected-error {{expected member name or ';' after declaration specifiers}}
}