Parsing negative integer constants as expressions.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM.
One nitpick, I don't believe it needs addressing but wanted to point it out anyway.
Somehow my comment got trimmed (I think because a new diff appeared between me writing it and pressing submit).
llvm/lib/Target/M68k/AsmParser/M68kAsmParser.cpp | ||
---|---|---|
590 | nit: Is this totally necessary? I don't think - can appear at the start of anything else apart from possibly an identifier (which is parsed by parseExpression anyway). This doesn't make much difference though (but could preserve const). |
llvm/lib/Target/M68k/AsmParser/M68kAsmParser.cpp | ||
---|---|---|
590 | Minus sign can be in front of a pre-decrement memory operand. Although currently isExpr is only used by one function (parseMemOp) in which all usages of isExpr are carefully placed such that they will never be confused with pre-decrement operand. But to prevent potential misuse in the future I prefer isExpr to be more explicit. |
nit: Is this totally necessary? I don't think - can appear at the start of anything else apart from possibly an identifier (which is parsed by parseExpression anyway).
This doesn't make much difference though (but could preserve const).