[clang-tidy] Add option to ignore capture default by reference in...
[clang-tidy] Add option to ignore capture default by reference in cppcoreguidelines-avoid-capture-default-when-capturing-this The rule exists primarily for when using capture default by copy "[=]", since member variables will be captured by reference, which is against developer expectations. However when the capture default is by reference, then there is no doubt: everything will be captured by reference. Add an option to allow just that. Note: Release Notes do not need update since this check has been introduced in the current WIP release. A ticket has been opened at the C++ Core Guidelines repo to consider updating the rule such that this behavior is the default one: https://github.com/isocpp/CppCoreGuidelines/issues/2060 Differential Revision: https://reviews.llvm.org/D147062
Loading
Please sign in to comment