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

Kim Gräsman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 27 03:42:54 PST 2016


kimgr added a comment.

Minor spelling nits inline



================
Comment at: clang-tidy/cppcoreguidelines/NoMallocCheck.cpp:30
+      callExpr(callee(functionDecl(hasAnyName("::malloc", "::calloc"))))
+          .bind("aquisition"),
+      this);
----------------
Spelling nit: acquisition

But I wonder if there's a simpler word you can use for this, e.g. "alloc"


================
Comment at: clang-tidy/cppcoreguidelines/NoMallocCheck.cpp:47
+
+  if ((Call = Result.Nodes.getNodeAs<CallExpr>("aquisition")))
+    Recommendation = "consider a container or a smart pointer";
----------------
"aquisition" as above


Repository:
  rL LLVM

https://reviews.llvm.org/D26167





More information about the cfe-commits mailing list