[PATCH] D156762: [-Wunsafe-buffer-usage][NFC] Refactor `getFixIts`---where fix-its are generated

Rashmi Mudduluru via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 3 12:53:27 PDT 2023


t-rasmud added inline comments.


================
Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:2145
 
-static bool impossibleToFixForVar(const FixableGadgetSets &FixablesForAllVars,
-                                  const Strategy &S,
-                                  const VarDecl * Var) {
-  for (const auto &F : FixablesForAllVars.byVar.find(Var)->second) {
-    std::optional<FixItList> Fixits = F->getFixits(S);
-    if (!Fixits) {
-      return true;
+// Erasing variables in `FixItsForVariable`, if such a variable has an unfixable
+// group mate.  A variable `v` is unfixable iff `FixItsForVariable` does not
----------------
// Erases variables in `FixItsForVariable`, if such a variable has an unfixable


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156762



More information about the cfe-commits mailing list