[PATCH] D35372: [clang-tidy] Refactor the code and add a close-on-exec check on memfd_create() in Android module.

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 10 06:06:45 PDT 2017


alexfh accepted this revision.
alexfh added a comment.
This revision is now accepted and ready to land.

LG with a few nits.



================
Comment at: clang-tidy/android/CloexecCheck.cpp:49
+  Finder->addMatcher(
+      ast_matchers::callExpr(
+          ast_matchers::callee(
----------------
No need to qualify names in `ast_matchers::`, since there's a using directive above.


================
Comment at: clang-tidy/android/CloexecCheck.h:38
+                       ast_matchers::internal::Matcher<FunctionDecl> Function);
+  /// Currently, we have three types of fixes.
+  ///
----------------
nit: Please add an empty line before this comment.


================
Comment at: clang-tidy/android/CloexecCheck.h:54
+  void insertMacroFlag(const ast_matchers::MatchFinder::MatchResult &Result,
+                       const StringRef MarcoFlag, const int ArgPos);
+
----------------
Please remove top-level const from the last two arguments. It has no effect in declaration (and definition can still use top-level const, if needed, since it is not a part of the function signature). Same below.


https://reviews.llvm.org/D35372





More information about the cfe-commits mailing list