[PATCH] D75529: [analyzer] Limit UCharMax to min of max uchar or max int

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 10 00:53:02 PDT 2020


NoQ added a comment.

Aha, ok, i appreciate making life easier for downstream users.



================
Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:519
+  // architectures, but not for others.
+  const RangeInt UCharMax = 
+      std::min(BVF.getMaxValue(ACtx.UnsignedCharTy).getLimitedValue(), IntMax);
----------------
Let's rename this constant then, so that we still had our `UCharMax` when we actually need the real `UCHAR_MAX` in the summary.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75529/new/

https://reviews.llvm.org/D75529





More information about the cfe-commits mailing list