diff options
author | Roman Divacky <rdivacky@freebsd.org> | 2011-02-15 20:43:39 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@freebsd.org> | 2011-02-15 20:43:39 +0000 |
commit | 738a00eb861c045dc11366b4d3203cde0e528f22 (patch) | |
tree | c1c0736e438690fc24e151ac78134654072f640f /test/MC/AsmParser | |
parent | 79bb6dd363fd0a23040910b32d69a282063521bd (diff) | |
download | external_llvm-738a00eb861c045dc11366b4d3203cde0e528f22.zip external_llvm-738a00eb861c045dc11366b4d3203cde0e528f22.tar.gz external_llvm-738a00eb861c045dc11366b4d3203cde0e528f22.tar.bz2 |
Add support for parsing [expr].
This is submitted by Joerg Sonnenberger and fixes his PR8685.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125595 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/AsmParser')
-rw-r--r-- | test/MC/AsmParser/exprs.s | 2 | ||||
-rw-r--r-- | test/MC/AsmParser/paren.s | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/test/MC/AsmParser/exprs.s b/test/MC/AsmParser/exprs.s index 153701d..0861922 100644 --- a/test/MC/AsmParser/exprs.s +++ b/test/MC/AsmParser/exprs.s @@ -35,6 +35,8 @@ k: check_expr 1 << 1, 2 check_expr 2 >> 1, 1 check_expr (~0 >> 1), -1 + check_expr [~0 >> 1], -1 + check_expr 4 * [4 + (3 + [2 * 2] + 1)], 48 check_expr 3 - 2, 1 check_expr 1 ^ 3, 2 check_expr 1 && 2, 1 diff --git a/test/MC/AsmParser/paren.s b/test/MC/AsmParser/paren.s new file mode 100644 index 0000000..702e309 --- /dev/null +++ b/test/MC/AsmParser/paren.s @@ -0,0 +1,8 @@ +// RUN: not llvm-mc -triple i386-unknown-unknown %s 2> %t1 > %t2 +// RUN: FileCheck < %t1 %s + +// CHECK: error: expected ']' in brackets expression +.size x, [.-x) + +// CHECK: error: expected ')' in parentheses expression +.size y, (.-y] |