[PATCH] D139759: [analyzer] Fix assertion in getAPSIntType
Balázs Benics via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Dec 11 14:30:00 PST 2022
steakhal accepted this revision.
steakhal added a comment.
This revision is now accepted and ready to land.
The fix feels suboptimal in readability but let it be whatever.
Functionally feels good. Tests are there and gets the job done.
I wont object.
================
Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:158
+ !T->isSignedIntegerOrEnumerationType());
+ } else if (T->isFixedPointType()) {
+ return APSIntType(Ctx.getIntWidth(T), !T->isSignedFixedPointType());
----------------
else, or else if just complicates the control flow after a return statement.
And I also intentionally recommended to use the isUnsigned.. stuff to make it easier to read withoutthe negation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139759/new/
https://reviews.llvm.org/D139759
More information about the cfe-commits
mailing list