From 6d8d0b0ee2cc267b2cd9f57eb952863ddc8e49c3 Mon Sep 17 00:00:00 2001 From: Takeshi Yoneda Date: Thu, 28 Nov 2024 12:03:18 -0800 Subject: [PATCH] clang-tidy: respect '-Wno-builtin-macro-redefined' with c++20 (#37408) 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 * https://github.com/llvm/llvm-project/issues/56709 * https://github.com/erenon/bazel_clang_tidy/issues/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 --- .clang-tidy | 1 + 1 file changed, 1 insertion(+) diff --git a/.clang-tidy b/.clang-tidy index 9ea3ef6c75b8..fba82af03640 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -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,