summaryrefslogtreecommitdiff
path: root/llvm/test/TableGen/spurious-semi.td
blob: 9e3b7ada02de87faa4d0e0491c0c701bba690817 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// RUN: llvm-tblgen %s | FileCheck %s
// RUN: not llvm-tblgen -DERROR1 %s 2>&1 | FileCheck --check-prefix=ERROR1 %s

// This file tests the error message that is printed when a body is
// terminated with a semicolon in addition to the close brace.

// CHECK: class Class0
// CHECK: def Rec0

class Class0 {
}

def Rec0 {
}

multiclass MC0 {
  def R;
}

#ifdef ERROR1

// ERROR1: error: A class or def body should not end with a semicolon
// ERROR1: Semicolon ignored
// ERROR1: error: A class or def body should not end with a semicolon
// ERROR1: Semicolon ignored
// ERROR1: error: A multiclass body should not end with a semicolon
// ERROR1: Semicolon ignored

class Class1 {
};

def Rec1 {
};

multiclass MC1 {
  def R;
};

#endif