[clang-tools-extra] [clang-tidy] add option to `readability-use-concise-preprocessor-directives` to take consistency into account (PR #156220)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 11 08:15:04 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- clang-tools-extra/test/clang-tidy/checkers/readability/use-concise-preprocessor-directives-preserve-consistency.cpp clang-tools-extra/clang-tidy/readability/UseConcisePreprocessorDirectivesCheck.cpp clang-tools-extra/clang-tidy/readability/UseConcisePreprocessorDirectivesCheck.h
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang-tools-extra/clang-tidy/readability/UseConcisePreprocessorDirectivesCheck.cpp b/clang-tools-extra/clang-tidy/readability/UseConcisePreprocessorDirectivesCheck.cpp
index ed39af94e..94accab05 100644
--- a/clang-tools-extra/clang-tidy/readability/UseConcisePreprocessorDirectivesCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/UseConcisePreprocessorDirectivesCheck.cpp
@@ -36,8 +36,8 @@ struct StackEntry {
} // namespace
-class UseConcisePreprocessorDirectivesCheck::UseConciseDirectivesPPCallbacks
- final : public PPCallbacks {
+class UseConcisePreprocessorDirectivesCheck::
+ UseConciseDirectivesPPCallbacks final : public PPCallbacks {
public:
UseConciseDirectivesPPCallbacks(UseConcisePreprocessorDirectivesCheck &Check,
const Preprocessor &PP)
``````````
</details>
https://github.com/llvm/llvm-project/pull/156220
More information about the cfe-commits
mailing list