Skip to content

Clang-tidy should not guess compile commands #148814

Open
@t-a-james

Description

@t-a-james

If clang-tidy fails to find an entry in the compile commands database it guesses at some flags. For my project (and, I suspect, for any non-trivial project) these flags are always catastrophically wrong. clang-tidy then gives back garbage results.

I would like clang-tidy to simply error out if it's given a compile commands database and a file, but fails to find an entry for the file.

That would be a change in default behaviour. I think the new behaviour would be simpler and less unexpected than the current behaviour, but if that's considered too big a change we could introduce a flag to re-instate the old behaviour, or keep the old default and hide the new behaviour behind a flag.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions