Commit 4de8e569 authored by Jessica Clarke's avatar Jessica Clarke Committed by Tom Stellard
Browse files

[RISCV] Fix parseBareSymbol to not double-parse top-level operators

By failing to lex the token we end up both parsing it as a binary
operator ourselves and parsing it as a unary operator when calling
parseExpression on the RHS. For plus this is harmless but for minus this
parses "foo - 4" as "foo - -4", effectively treating a top-level minus
as a plus.

Fixes https://github.com/llvm/llvm-project/issues/54105

Reviewed By: asb, MaskRay

Differential Revision: https://reviews.llvm.org/D120635

(cherry picked from commit 6aa8521f)
parent b29813fb
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment