Mercurial > hg > CbC > CbC_llvm
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/llvm/test/TableGen/paste-reserved.td Tue Jun 08 06:07:14 2021 +0900 @@ -0,0 +1,22 @@ +// 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; +} +// ERROR1: error: Unknown or reserved token when parsing a value +#endif + + +// Pasting an identifier with a reserved word should produce an error. + +#ifdef ERROR2 +def name_paste#in { +} +// ERROR2: error: Unknown or reserved token when parsing a value +#endif