[clang-tidy] Do not trigger cppcoreguidelines-avoid-const-or-ref-data-members on...
authorCarlos Galvez <carlosgalvezp@gmail.com>
Fri, 12 Aug 2022 14:53:31 +0000 (14:53 +0000)
committerCarlos Galvez <carlosgalvezp@gmail.com>
Fri, 19 Aug 2022 08:26:34 +0000 (08:26 +0000)
commit3fd4213059a4ea9453809aeccd1bfc7d115d24b2
treeb062abe3f716a1bcb413508516cfe91e1d216534
parent04986dda00d78d145232e2f0e2d646665453080d
[clang-tidy] Do not trigger cppcoreguidelines-avoid-const-or-ref-data-members on lambda captures

Lambdas are implemented as regular classes internally,
and the captured variables end up as members there.
Do not diagnose those - the check should cover only
regular classes and structs.

Differential Revision: https://reviews.llvm.org/D131780
clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidConstOrRefDataMembersCheck.cpp
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/avoid-const-or-ref-data-members.cpp