2020-08-21 23:19:36 +02:00
|
|
|
// RUN: not llvm-tblgen -DERROR1 %s 2>&1 | FileCheck --check-prefix=ERROR1 %s
|
|
|
|
// RUN: not llvm-tblgen -DERROR2 %s 2>&1 | FileCheck --check-prefix=ERROR2 %s
|
|
|
|
|
|
|
|
defvar list1 = ["foo", "bar", "snork"];
|
|
|
|
|
|
|
|
// Pasting a list with a reserved word should produce an error.
|
|
|
|
|
|
|
|
#ifdef ERROR1
|
|
|
|
def list_paste {
|
|
|
|
list<string> the_list = list1 # in;
|
|
|
|
}
|
2020-11-02 18:37:25 +01:00
|
|
|
// ERROR1: error: Unknown or reserved token when parsing a value
|
2020-08-21 23:19:36 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
// Pasting an identifier with a reserved word should produce an error.
|
|
|
|
|
|
|
|
#ifdef ERROR2
|
|
|
|
def name_paste#in {
|
|
|
|
}
|
2020-11-02 18:37:25 +01:00
|
|
|
// ERROR2: error: Unknown or reserved token when parsing a value
|
2020-08-21 23:19:36 +02:00
|
|
|
#endif
|