[clang-tools-extra] [clang-tidy] Add new check: `readability-use-concise-preprocessor-directives` (PR #146830)
Baranov Victor via cfe-commits
cfe-commits at lists.llvm.org
Sat Jul 5 09:34:14 PDT 2025
================
@@ -0,0 +1,138 @@
+// RUN: %check_clang_tidy -std=c++98 -check-suffixes=,CXX %s readability-use-concise-preprocessor-directives %t
+// RUN: %check_clang_tidy -std=c++11 -check-suffixes=,CXX %s readability-use-concise-preprocessor-directives %t
+// RUN: %check_clang_tidy -std=c++14 -check-suffixes=,CXX %s readability-use-concise-preprocessor-directives %t
+// RUN: %check_clang_tidy -std=c++17 -check-suffixes=,CXX %s readability-use-concise-preprocessor-directives %t
+// RUN: %check_clang_tidy -std=c++20 -check-suffixes=,CXX %s readability-use-concise-preprocessor-directives %t
----------------
vbvictor wrote:
You can have multiple language standards in one line: `-std=c++98,c++11,c++14,c++17,c++20`
The same applied to C-mode.
https://github.com/llvm/llvm-project/pull/146830
More information about the cfe-commits
mailing list