question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Help request: clang-tidy does not work

See original GitHub issue

I use two folder workspace in vscode with the following settings:

    "settings": {
        "C_Cpp.autocomplete": "Disabled",
        "C_Cpp.errorSquiggles": "Disabled",
        "C_Cpp.intelliSenseEngine": "Disabled",
        "clangd.arguments": [
            "--log=verbose",
            "--pretty",
            "--background-index",
            "--compile-commands-dir=/tmp/build-dir/build",
            "--clang-tidy",
            "-j=2"
        ],
        "clangd.path": "/usr/local/bin/clangd",
        "editor.tabSize": 2,
        "terminal.integrated.tabs.enabled": false
    }

[dot]clang-tidy file is located only in one of the folders. My operating system is

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.6 LTS
Release:        18.04
Codename:       bionic

I downloaded pre-built clangd binary from here, this is the version:

clangd --version
clangd version 13.0.0 (https://github.com/llvm/llvm-project d7b669b3a30345cfcdb2fde2af6f48aa4b94845d)
Features: linux+grpc
Platform: x86_64-unknown-linux-gnu

Could you please help me out why clang-tidy seem to be not used completely? I don’t know how I can diagnose this on my own…

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
HighCommander4commented, Nov 24, 2021

I get the user-after-move warning on the provided example code.

1reaction
sam-mccallcommented, Nov 24, 2021

I think the warning you’re looking for is from the use-after-move check. This check is disabled in clangd because it relies on clang’s CFG infrastructure, which is believed/known to be crash-happy on broken code.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Clang-Tidy: Not clear when it's running or not #9352 - GitHub
A clang-diagnostic-error means there was a problem compiling with clang. That error isn't currently disable-able. Do you get the same error when ...
Read more >
Clang-Tidy — Extra Clang Tools 16.0.0git documentation
clang -tidy is a clang-based C++ “linter” tool. Its purpose is to provide an extensible framework for diagnosing and fixing typical programming errors, ......
Read more >
Proper clang tidy fix support (#21362) - CMake - GitLab
The problem is that CMake has clang-tidy support, but it doesn't have direct support for delayed refactoring, so the CMake integration is ...
Read more >
Enabling clang-tidy on a CMake project is unable to find std
Open a Cmake project. Change the configuration to Windows Clang (e.g. x64-Clang-Debug). Open the CMakeSettings.json and add command " “clangTidyChecks”: ...
Read more >
Clang-Tidy can't find my header files - Stack Overflow
This answer will only help you if you use CMake to manage your project. ... The problem in my case was that Clang-Tidy...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found