Skip to content

clang-tidy 14 flags a constructor with an initializer list as replaceable with = default #56447

Closed as not planned
@gnawme

Description

@gnawme

When running run-clang-tidy-14 on the Point Cloud Library, clang-tidy flags this constructor with the message:

/__w/pcl/pcl/common/include/pcl/common/time.h:62:7: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
      StopWatch () : start_time_ (std::chrono::steady_clock::now())

Setup from Github Action clang-tidy.yml:

          cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_CXX_COMPILER=/usr/bin/clang-14 -DCMAKE_C_COMPILER=/usr/bin/clang-14 . \
            -DBUILD_apps=ON \
            -DBUILD_apps_3d_rec_framework=ON \
            -DBUILD_apps_in_hand_scanner=ON \
            -DBUILD_apps_point_cloud_editor=ON \
            -DBUILD_benchmarks=ON \
            -DBUILD_examples=ON \
            -DBUILD_simulation=ON \
            -DBUILD_global_tests=ON
          run-clang-tidy -header-filter='.*'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions