comparison llvm/test/TableGen/paste-reserved.td @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents
children
comparison
equal deleted inserted replaced
173:0572611fdcc8 207:2e18cbf3894f
1 // RUN: not llvm-tblgen -DERROR1 %s 2>&1 | FileCheck --check-prefix=ERROR1 %s
2 // RUN: not llvm-tblgen -DERROR2 %s 2>&1 | FileCheck --check-prefix=ERROR2 %s
3
4 defvar list1 = ["foo", "bar", "snork"];
5
6 // Pasting a list with a reserved word should produce an error.
7
8 #ifdef ERROR1
9 def list_paste {
10 list<string> the_list = list1 # in;
11 }
12 // ERROR1: error: Unknown or reserved token when parsing a value
13 #endif
14
15
16 // Pasting an identifier with a reserved word should produce an error.
17
18 #ifdef ERROR2
19 def name_paste#in {
20 }
21 // ERROR2: error: Unknown or reserved token when parsing a value
22 #endif