[clang-tools-extra] [clang-tidy] add option to `readability-use-concise-preprocessor-directives` to take consistency into account (PR #156220)
Baranov Victor via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 10 12:59:19 PDT 2025
================
@@ -11,51 +11,124 @@
#include "clang/Lex/Lexer.h"
#include "clang/Lex/PPCallbacks.h"
#include "clang/Lex/Preprocessor.h"
+#include "llvm/ADT/STLForwardCompat.h"
#include <array>
namespace clang::tidy::readability {
namespace {
-class IfPreprocessorCallbacks final : public PPCallbacks {
+enum class DirectiveKind : bool { If, Elif };
----------------
vbvictor wrote:
If we use `enum class`, does it matter to specify a type if it wouldn't be converted-to anyway?
https://github.com/llvm/llvm-project/pull/156220
More information about the cfe-commits
mailing list