clangd / vscode-clangd

Visual Studio Code extension for clangd
https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd
MIT License
594 stars 97 forks source link

Tidy modernize checks no longer show up on problems panel #579

Open marzojr opened 6 months ago

marzojr commented 6 months ago

In the past, clang-tidy checks run by clangd appeared as problems in the "Problems" panel. Recently, I noticed that they no longer do. Other issues found by clangd (compiler warnings or errors, for example) show up normally.

See attached screenshot, where a clang-tidy check is clearly detected (as shown by the floating tip) but it is not listed at the panel in the bottom.

This is inconvenient because there is no longer a way to search/filter for specific diagnostics, or see them without going through the whole file looking for them.

I am not sure if this is

Minimal reproducer:

struct A {
    A() {}
};

Enable modernize-use-equals-default in the config file for clang-tidy and the constructor should be shown in strikethrough, and produce a tooltip when hovered over (see screenshot at bottom). The disgnostic should be missing at the panel at the bottom.

Verbose logs for the above minimal reproducer.

Clang and clangd are the versions from msys2. Currently, this is:

$ clangd --version
clangd version 17.0.6
Features: windows
Platform: x86_64-w64-windows-gnu

clangd extension version: v0.1.26 (but I tried reverting as far back as v0.1.20 to see if it would fix the issue). VSCode version: 1.85.1 Operating system: Windows 11 Home 23H2

Screenshot of the issue: image

marzojr commented 6 months ago

Some additional information: some clang-tidy warnings do not show up on the problems panel; others do. The ones that appear on said panel appear underlined with yellow squiggly lines on the code editor, while the ones that do not appear in strike-through.

HighCommander4 commented 6 months ago

It's specifically modernize-* checks which get assigned a lower diagnostic severity (resulting in not being listed in the Problems panel) and the Deprecated diagnostic tag (resulting in the strike-through style).

Please see https://github.com/llvm/llvm-project/pull/75706 for some ongoing discussion about this and feel free to weigh in there.