[PATCH] D157441: [-Wunsafe-buffer-usage] Use `Strategy` to determine whether to fix a parameter

Rashmi Mudduluru via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 17 15:47:14 PDT 2023


t-rasmud added inline comments.


================
Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:2719
+  Strategy NaiveStrategy = getNaiveStrategy(
+      llvm::make_range(VisitedVars.begin(), VisitedVars.end()));
   VariableGroupsManagerImpl VarGrpMgr(Groups, VarGrpMap, GrpsUnionForParms);
----------------
ziqingluo-90 wrote:
> `VisitedVars` are the set of variables on the computed graph.  The previous `UnsafeVars` is a superset of it, including safe variables that have `FixableGadget`s discovered.  We do not want to assign strategies other than `Won't fix` to those safe variables.
Would it make more sense (make the code more readable) if we renamed `UnsafeVars` to say, `FixableVars`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157441



More information about the cfe-commits mailing list