[all-commits] [llvm/llvm-project] 3fd421: [clang-tidy] Do not trigger cppcoreguidelines-avoi...

Carlos Galvez via All-commits all-commits at lists.llvm.org
Fri Aug 19 01:27:10 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3fd4213059a4ea9453809aeccd1bfc7d115d24b2
      https://github.com/llvm/llvm-project/commit/3fd4213059a4ea9453809aeccd1bfc7d115d24b2
  Author: Carlos Galvez <carlosgalvezp at gmail.com>
  Date:   2022-08-19 (Fri, 19 Aug 2022)

  Changed paths:
    M clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidConstOrRefDataMembersCheck.cpp
    M clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/avoid-const-or-ref-data-members.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list