MC/AsmLexer: Fix bug in source location for Slash token.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117298 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar 2010-10-25 20:18:53 +00:00
parent 048a19abe6
commit bdf90d679b
2 changed files with 3 additions and 4 deletions

View File

@ -119,7 +119,7 @@ AsmToken AsmLexer::LexSlash() {
switch (*CurPtr) { switch (*CurPtr) {
case '*': break; // C style comment. case '*': break; // C style comment.
case '/': return ++CurPtr, LexLineComment(); case '/': return ++CurPtr, LexLineComment();
default: return AsmToken(AsmToken::Slash, StringRef(CurPtr, 1)); default: return AsmToken(AsmToken::Slash, StringRef(CurPtr-1, 1));
} }
// C Style comment. // C Style comment.

View File

@ -19,9 +19,8 @@ k:
check_expr +1, 1 check_expr +1, 1
check_expr 1 + 2, 3 check_expr 1 + 2, 3
check_expr 1 & 3, 1 check_expr 1 & 3, 1
// FIXME: There is a bug here in macro expansion. check_expr 4 / 2, 2
.byte 4 / 2 check_expr 4 / -2, -2
.byte 4 / -2
check_expr 1 == 1, 1 check_expr 1 == 1, 1
check_expr 1 == 0, 0 check_expr 1 == 0, 0
check_expr 1 > 0, 1 check_expr 1 > 0, 1