[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

Jonas Toth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 13 02:26:08 PST 2016


JonasToth marked an inline comment as done.
JonasToth added inline comments.


================
Comment at: clang-tidy/cppcoreguidelines/NoMallocCheck.cpp:29
+  Finder->addMatcher(
+      callExpr(callee(functionDecl(hasAnyName("::malloc", "::calloc"))))
+          .bind("aquisition"),
----------------
malcolm.parsons wrote:
> C memory management functions are also present in the `std` namespace.
in the clang codebase, std::malloc got catched as well. see the tidy_output_no_malloc.txt in one of my previous comments.


Repository:
  rL LLVM

https://reviews.llvm.org/D26167





More information about the cfe-commits mailing list