Skip to content

Clang-Tidy reports wrong command line argument even though it is not specified at all #49639

@hubbergit

Description

@hubbergit
mannequin
Bugzilla Link 50295
Version unspecified
OS Windows NT
Attachments Configuration file
CC @EugeneZelenko,@zmodem

Extended Description

OS: Windows 10 (64-Bit)
LLVM Version: 12.0.0 (64-Bit)

I am calling clang-tidy on the regular windows command prompt like this:

"C:/Program Files/LLVM/bin/clang-tidy.exe" -quiet -fix -header-filter=MyFile.h -p=E:/MyProjekt.build ./MyFile.cpp

Please note that especially "-fsyntax-only" and "-resource-dir" are not specified on the command line.

The output of clang-tidy is:

./MyFile.cpp
8809 warnings and 2 errors generated.
Error while processing <..cut..>\MyFile.cpp.
error: no such file or directory: '-fsyntax-only'; did you mean '-fsyntax-only'? [clang-diagnostic-error]
error: no such file or directory: '-resource-dir=C:\Program Files\LLVM\lib\clang\12.0.0'; did you mean '-resource-dir=C:\Program Files\LLVM\lib\clang\12.0.0'? [clang-diagnostic-error]

This is obviously an error.

Attached you can also find my .clang-tidy configuration file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclang-tidyinvalidResolved as invalid, i.e. not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions