Skip to content

clang-tidy not respecting -Wno-builtin-macro-redefined with gnu++20 #56709

Closed
@barci2

Description

@barci2

If clang-tidy is set to use the gnu++20 language standard (does not work with regular c++ or lower versions of gnu++) then the -Wno-builtin-macro-redefined CDB flag is not respected, even if the macro is redefined as a compilation flag itself. Note that this is not an issue with the regular compiler as it does not throw that error. Minimal reproducer:
touch test.cc && llvm-project/build/bin/clang-tidy test.cc -- -std=gnu++20 -D__TIME__ -Wno-builtin-macro-redefined

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions