[APSInt] Fix bug in APSInt mentioned in https://github.com/llvm/llvm-project/issues...
authorPeter Rong <PeterRong96@gmail.com>
Tue, 27 Dec 2022 02:05:11 +0000 (18:05 -0800)
committerPeter Rong <PeterRong96@gmail.com>
Fri, 20 Jan 2023 21:25:15 +0000 (13:25 -0800)
commit0a89825a289d149195be390003424adad026067f
tree414c487fbb5328d4c548928a9c627292033a2bce
parentb2b078adc2d00db8dc8f0009e2bfca4d8267149a
[APSInt] Fix bug in APSInt mentioned in https://github.com/llvm/llvm-project/issues/59515

Also provide a `tryExtValue()` API like APInt did in D139683

Reviewed By: RKSimon, efriedma

Differential Revision: https://reviews.llvm.org/D140059
clang/lib/CodeGen/CGDebugInfo.cpp
llvm/include/llvm/ADT/APSInt.h
llvm/lib/CodeGen/MIRParser/MIParser.cpp
llvm/unittests/ADT/APSIntTest.cpp