[PATCH] D76590: [Analyzer] Model `empty()` member function of containers

Balogh, Ádám via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 23 00:31:06 PDT 2020


baloghadamsoftware marked 3 inline comments as done.
baloghadamsoftware added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp:359
     State = State->BindExpr(CE, LCtx, RetVal);
   }
 
----------------
Maybe I should move these lines into a separate function in the library to avoid repetition.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp:377
+      C.addTransition(StateNonEqual);
   }
+
----------------
This is way longer than the previously used `processComparison()` but I am reluctant to pass `CheckerContext` to a non-member function. (And especially add transitions there. Even worse, to a function in a common library.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76590





More information about the cfe-commits mailing list