[PATCH] D157079: [TableGen] Fix wrong lex result on 64-bit integer boundaries

Senran Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 4 02:13:07 PDT 2023


zsrkmyn created this revision.
zsrkmyn added reviewers: MaskRay, Paul-C-Anagnostopoulos.
Herald added a subscriber: hiraditya.
Herald added a project: All.
zsrkmyn requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Binary and decimal values were reconginzed by strtoll, which returns
error when the msb is 1, and the error was ignored, resulting to wrong
results.

This patch fixes the issue.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D157079

Files:
  llvm/lib/TableGen/TGLexer.cpp
  llvm/test/TableGen/64-bit-int.td

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157079.547140.patch
Type: text/x-patch
Size: 5363 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230804/ee1f70db/attachment.bin>


More information about the llvm-commits mailing list