forked from OSchip/llvm-project
MC/AsmLexer: Fix bug in source location for Slash token.
llvm-svn: 117298
This commit is contained in:
parent
95db1cc022
commit
7484d2cbec
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue