Skip to content

Commit 1e43ba3

Browse files
committed
fix: add more bind functions
1 parent c91ad61 commit 1e43ba3

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

clang-tools-extra/clang-tidy/bugprone/CapturingThisInMemberVariableCheck.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ AST_MATCHER(CXXRecordDecl, correctHandleCaptureThisLambda) {
6464

6565
constexpr const char *DefaultFunctionWrapperTypes =
6666
"::std::function;::std::move_only_function;::boost::function";
67-
constexpr const char *DefaultBindFunctions = "::std::bind;::boost::bind";
67+
constexpr const char *DefaultBindFunctions =
68+
"::std::bind;::boost::bind;::std::bind_front;::std::bind_back;"
69+
"::boost::compat::bind_front;::boost::compat::bind_back";
6870

6971
CapturingThisInMemberVariableCheck::CapturingThisInMemberVariableCheck(
7072
StringRef Name, ClangTidyContext *Context)

clang-tools-extra/docs/clang-tidy/checks/bugprone/capturing-this-in-member-variable.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,6 @@ Options
4444
.. option:: BindFunctions
4545

4646
A semicolon-separated list of fully qualified names of functions that can
47-
capture ``this`` pointer. Default is `::std::bind;::boost::bind`.
47+
capture ``this`` pointer.
48+
Default is `::std::bind;::boost::bind;::std::bind_front;::std::bind_back;
49+
::boost::compat::bind_front;::boost::compat::bind_back`.

0 commit comments

Comments
 (0)