1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/test/TableGen/spurious-semi.td
Paul C. Anagnostopoulos e29674d7e7 [TableGen] Improve error message for semicolon after braced body.
Add a test for this message.

Differential Revision: https://reviews.llvm.org/D94412
2021-01-12 09:38:05 -05:00

40 lines
735 B
TableGen

// 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