[PATCH] D32902: [Analyzer] Iterator Checker - Part 7: Support for push and pop operations

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 16 14:51:35 PDT 2018


NoQ added inline comments.
Herald added subscribers: Szelethus, mikhail.ramalho.


================
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:1477-1530
+bool isPushBackCall(const FunctionDecl *Func) {
+  const auto *IdInfo = Func->getIdentifier();
+  if (!IdInfo)
+    return false;
+  if (Func->getNumParams() != 1)
+    return false;
+  return IdInfo->getName() == "push_back";
----------------
I guess we should think if we want to use `CallDescription` for these when D48027 lands.


https://reviews.llvm.org/D32902





More information about the cfe-commits mailing list