[PATCH] D72488: [clang-tidy] Add check for CERT-OOP57-CPP

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 16 07:11:28 PST 2020


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

LGTM with a few nits.



================
Comment at: clang-tools-extra/clang-tidy/cert/NonTrivialTypesLibcMemoryCallsCheck.cpp:71-74
+  if (!getLangOpts().CPlusPlus)
+    return;
+  if (getLangOpts().ObjC)
+    return;
----------------
I'd combine these into a single `if`.


================
Comment at: clang-tools-extra/clang-tidy/cert/NonTrivialTypesLibcMemoryCallsCheck.h:25
+public:
+  NonTrivialTypesLibcMemoryCallsCheck(StringRef Name, ClangTidyContext *Context);
+  void storeOptions(ClangTidyOptions::OptionMap &Opts) override;
----------------
You should do this formatting change, the per-merge check is actually correct for once. Don't bother with the ones in the test files though.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72488





More information about the cfe-commits mailing list