[PATCH] D58818: [clang-tidy] added cppcoreguidelines-use-raii-locks check
Lewis Clark via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 1 07:17:23 PST 2019
lewmpk marked 3 inline comments as done.
lewmpk added inline comments.
================
Comment at: clang-tidy/cppcoreguidelines/UseRaiiLocksCheck.cpp:26
+ recordType(hasDeclaration(cxxRecordDecl(hasName("::std::mutex"))))));
+ // Match expressions of type mutex or mutex pointer
+ const auto MutexExpr =
----------------
lebedev.ri wrote:
> Terminology: *this* doesn't match anything.
> It's a matcher, yes, but it's just a lambda.
> The actual match happens at the end.
I was trying to describe its intent, not its action. Does anyone have any suggestions for a clearer comment?
================
Comment at: clang-tidy/cppcoreguidelines/UseRaiiLocksCheck.h:13-14
+#include "../ClangTidy.h"
+#include <iostream>
+namespace clang {
+namespace tidy {
----------------
lebedev.ri wrote:
> Separate with newline
it seems that most checks are this way. it was autogenerated by the ``add_new_check.py`` script.
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58818/new/
https://reviews.llvm.org/D58818
More information about the cfe-commits
mailing list