[PATCH] D130811: [Clang] Fix handling of Max from getValueRange(...) in IntExprEvaluator::VisitCastExpr(...)

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 1 06:16:19 PDT 2022


erichkeane added inline comments.


================
Comment at: clang/lib/AST/ExprConstant.cpp:13540
         ED->getValueRange(Max, Min);
+        --Max;
 
----------------
I don't think this is the correct answer.  Even though the other use of this seems to 'work', `getValueRange` is still returning wrapped values here.  The fix is to figure out how to fix the math in getValueRange, and change the sanitizer's IR generation if necessary.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130811



More information about the cfe-commits mailing list