llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
27.8k stars 11.45k forks source link

incorrect info in clang-tidy documentation about "cppcoreguidelines-virtual-class-destructor" #88262

Open kiselik opened 4 months ago

kiselik commented 4 months ago

clang-tidy documentation(https://clang.llvm.org/extra/clang-tidy/checks/list.html) says that " cppcoreguidelines-virtual-class-destructor" offers fixes, but in fact no.

Could you please check fix documentation? image

llvmbot commented 4 months ago

@llvm/issue-subscribers-clang-tidy

Author: Olga Kiseleva (kiselik)

clang-tidy documentation(https://clang.llvm.org/extra/clang-tidy/checks/list.html) says that " cppcoreguidelines-virtual-class-destructor" offers fixes, but in fact no. Could you please check fix documentation? ![image](https://github.com/llvm/llvm-project/assets/16230320/215a1857-e592-47fc-beac-48ec66a67cf5)
SimplyDanny commented 4 months ago

The check actually offers fix-its, yet they are attached to notes. Not sure if this is the reason they are not offered (e.g. by the clangd extension in VS Code).

kiselik commented 2 months ago

my project migrated from clang-tidy-12 to clang-tidy-17 but there are still no autofixes proposed.

Is it possible that autofixes for this check were introduced in clang-tidy-18?

PiotrZSL commented 2 months ago

It offers fixes, you need to use --fix-notes