================ @@ -0,0 +1,144 @@ +// RUN: %check_clang_tidy -std=c++11-or-later %s bugprone-capturing-this-by-field %t -- -config="{CheckOptions: {bugprone-capturing-this-by-field.FunctionWrapperTypes: '::std::function;::Fn'}}" -- + +namespace std { + +template<class Fn> +class function; + +template<class R, class ...Args> +class function<R(Args...)> { +public: + function() noexcept; + template<class F> function(F &&); +}; + +} // namespace std + +struct Fn { + template<class F> Fn(F &&); +}; + +struct Basic { + Basic() : Captured([this]() { static_cast<void>(this); }) {} ---------------- HerrCai0907 wrote:
add test https://github.com/llvm/llvm-project/pull/130297 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits