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

llvm-svn: 117298
This commit is contained in:
Daniel Dunbar 2010-10-25 20:18:53 +00:00
parent 95db1cc022
commit 7484d2cbec
2 changed files with 3 additions and 4 deletions

View File

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

View File

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