Skip to content

Commit

Permalink
clang-tidy: respect '-Wno-builtin-macro-redefined' with c++20 (#37408)
Browse files Browse the repository at this point in the history
Previously, `redefining builtin macro
[clang-diagnostic-builtin-macro-redefined,-warnings-as-errors]` was
reported
despite the existence of the `-Wno-builtin-macro-redefined` in the
compiler argument.
This is a known issue for older version of clang as in
* llvm/llvm-project#56709
* erenon/bazel_clang_tidy#29

The workaround discussed was to explicitly add
`-clang-diagnostic-builtin-macro-redefined`
in the checks of clang-tidy, which can be removed after we upgrade to
LLVM 17.

part of #28566 

Signed-off-by: Takeshi Yoneda <[email protected]>
  • Loading branch information
mathetake authored Nov 28, 2024
1 parent 6ff7936 commit 6d8d0b0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Checks: >
-clang-analyzer-core.NonNullParamChecker,
-clang-analyzer-optin.cplusplus.UninitializedObject,
-clang-diagnostic-builtin-macro-redefined,
abseil-duration-*,
abseil-faster-strsplit-delimiter,
abseil-no-namespace,
Expand Down

0 comments on commit 6d8d0b0

Please sign in to comment.