Skip to content

Commit 36719c8

Browse files
committed
Move to readability category
1 parent 8bad406 commit 36719c8

File tree

10 files changed

+62
-62
lines changed

10 files changed

+62
-62
lines changed

clang-tools-extra/clang-tidy/modernize/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ add_clang_library(clangTidyModernizeModule STATIC
3030
UnaryStaticAssertCheck.cpp
3131
UseAutoCheck.cpp
3232
UseBoolLiteralsCheck.cpp
33-
UseConcisePreprocessorDirectivesCheck.cpp
3433
UseConstraintsCheck.cpp
3534
UseDefaultMemberInitCheck.cpp
3635
UseDesignatedInitializersCheck.cpp

clang-tools-extra/clang-tidy/modernize/ModernizeTidyModule.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
#include "UnaryStaticAssertCheck.h"
3232
#include "UseAutoCheck.h"
3333
#include "UseBoolLiteralsCheck.h"
34-
#include "UseConcisePreprocessorDirectivesCheck.h"
3534
#include "UseConstraintsCheck.h"
3635
#include "UseDefaultMemberInitCheck.h"
3736
#include "UseDesignatedInitializersCheck.h"
@@ -77,8 +76,6 @@ class ModernizeModule : public ClangTidyModule {
7776
CheckFactories.registerCheck<MinMaxUseInitializerListCheck>(
7877
"modernize-min-max-use-initializer-list");
7978
CheckFactories.registerCheck<PassByValueCheck>("modernize-pass-by-value");
80-
CheckFactories.registerCheck<UseConcisePreprocessorDirectivesCheck>(
81-
"modernize-use-concise-preprocessor-directives");
8279
CheckFactories.registerCheck<UseDesignatedInitializersCheck>(
8380
"modernize-use-designated-initializers");
8481
CheckFactories.registerCheck<UseIntegerSignComparisonCheck>(

clang-tools-extra/clang-tidy/readability/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ add_clang_library(clangTidyReadabilityModule STATIC
5858
UniqueptrDeleteReleaseCheck.cpp
5959
UppercaseLiteralSuffixCheck.cpp
6060
UseAnyOfAllOfCheck.cpp
61+
UseConcisePreprocessorDirectivesCheck.cpp
6162
UseStdMinMaxCheck.cpp
6263

6364
LINK_LIBS

clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
#include "UniqueptrDeleteReleaseCheck.h"
6262
#include "UppercaseLiteralSuffixCheck.h"
6363
#include "UseAnyOfAllOfCheck.h"
64+
#include "UseConcisePreprocessorDirectivesCheck.h"
6465
#include "UseStdMinMaxCheck.h"
6566

6667
namespace clang::tidy {
@@ -173,6 +174,8 @@ class ReadabilityModule : public ClangTidyModule {
173174
"readability-uppercase-literal-suffix");
174175
CheckFactories.registerCheck<UseAnyOfAllOfCheck>(
175176
"readability-use-anyofallof");
177+
CheckFactories.registerCheck<UseConcisePreprocessorDirectivesCheck>(
178+
"readability-use-concise-preprocessor-directives");
176179
CheckFactories.registerCheck<UseStdMinMaxCheck>(
177180
"readability-use-std-min-max");
178181
}

clang-tools-extra/clang-tidy/modernize/UseConcisePreprocessorDirectivesCheck.cpp renamed to clang-tools-extra/clang-tidy/readability/UseConcisePreprocessorDirectivesCheck.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include "clang/Lex/PPCallbacks.h"
1313
#include "clang/Lex/Preprocessor.h"
1414

15-
namespace clang::tidy::modernize {
15+
namespace clang::tidy::readability {
1616

1717
namespace {
1818

@@ -105,4 +105,4 @@ void UseConcisePreprocessorDirectivesCheck::registerPPCallbacks(
105105
PP->addPPCallbacks(std::make_unique<IfPreprocessorCallbacks>(*this, *PP));
106106
}
107107

108-
} // namespace clang::tidy::modernize
108+
} // namespace clang::tidy::readability

clang-tools-extra/clang-tidy/modernize/UseConcisePreprocessorDirectivesCheck.h renamed to clang-tools-extra/clang-tidy/readability/UseConcisePreprocessorDirectivesCheck.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_USECONCISEPREPROCESSORDIRECTIVESCHECK_H
10-
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_USECONCISEPREPROCESSORDIRECTIVESCHECK_H
9+
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_USECONCISEPREPROCESSORDIRECTIVESCHECK_H
10+
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_USECONCISEPREPROCESSORDIRECTIVESCHECK_H
1111

1212
#include "../ClangTidyCheck.h"
1313

14-
namespace clang::tidy::modernize {
14+
namespace clang::tidy::readability {
1515

1616
/// Shortens `#if` preprocessor conditions:
1717
///
@@ -24,7 +24,7 @@ namespace clang::tidy::modernize {
2424
/// #elif !defined(MEOW) -> #elifndef MEOW
2525
///
2626
/// User-facing documentation:
27-
/// https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-concise-preprocessor-directives.html
27+
/// https://clang.llvm.org/extra/clang-tidy/checks/readability/use-concise-preprocessor-directives.html
2828
class UseConcisePreprocessorDirectivesCheck : public ClangTidyCheck {
2929
public:
3030
using ClangTidyCheck::ClangTidyCheck;
@@ -35,6 +35,6 @@ class UseConcisePreprocessorDirectivesCheck : public ClangTidyCheck {
3535
}
3636
};
3737

38-
} // namespace clang::tidy::modernize
38+
} // namespace clang::tidy::readability
3939

40-
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_USECONCISEPREPROCESSORDIRECTIVESCHECK_H
40+
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_USECONCISEPREPROCESSORDIRECTIVESCHECK_H

clang-tools-extra/docs/ReleaseNotes.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,6 @@ New checks
142142
Finds unscoped (non-class) ``enum`` declarations and suggests using
143143
``enum class`` instead.
144144

145-
- New :doc:`modernize-use-concise-preprocessor-directives
146-
<clang-tidy/checks/modernize/use-concise-preprocessor-directives>` check.
147-
148-
Finds uses of ``#if`` that be simplified to ``#ifdef`` or ``#ifndef`` and,
149-
since C23 and C++23, uses of ``#elif`` that can be simplified to ``#elifdef``
150-
or ``#elifndef``.
151-
152145
- New :doc:`modernize-use-scoped-lock
153146
<clang-tidy/checks/modernize/use-scoped-lock>` check.
154147

@@ -167,6 +160,13 @@ New checks
167160
Finds potentially erroneous calls to ``reset`` method on smart pointers when
168161
the pointee type also has a ``reset`` method.
169162

163+
- New :doc:`readability-use-concise-preprocessor-directives
164+
<clang-tidy/checks/readability/use-concise-preprocessor-directives>` check.
165+
166+
Finds uses of ``#if`` that can be simplified to ``#ifdef`` or ``#ifndef`` and,
167+
since C23 and C++23, uses of ``#elif`` that can be simplified to ``#elifdef``
168+
or ``#elifndef``.
169+
170170
New check aliases
171171
^^^^^^^^^^^^^^^^^
172172

clang-tools-extra/docs/clang-tidy/checks/list.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,6 @@ Clang-Tidy Checks
300300
:doc:`modernize-unary-static-assert <modernize/unary-static-assert>`, "Yes"
301301
:doc:`modernize-use-auto <modernize/use-auto>`, "Yes"
302302
:doc:`modernize-use-bool-literals <modernize/use-bool-literals>`, "Yes"
303-
:doc:`modernize-use-concise-preprocessor-directives <modernize/use-concise-preprocessor-directives>`, "Yes"
304303
:doc:`modernize-use-constraints <modernize/use-constraints>`, "Yes"
305304
:doc:`modernize-use-default-member-init <modernize/use-default-member-init>`, "Yes"
306305
:doc:`modernize-use-designated-initializers <modernize/use-designated-initializers>`, "Yes"
@@ -411,6 +410,7 @@ Clang-Tidy Checks
411410
:doc:`readability-uniqueptr-delete-release <readability/uniqueptr-delete-release>`, "Yes"
412411
:doc:`readability-uppercase-literal-suffix <readability/uppercase-literal-suffix>`, "Yes"
413412
:doc:`readability-use-anyofallof <readability/use-anyofallof>`,
413+
:doc:`readability-use-concise-preprocessor-directives <readability/use-concise-preprocessor-directives>`, "Yes"
414414
:doc:`readability-use-std-min-max <readability/use-std-min-max>`, "Yes"
415415
:doc:`zircon-temporary-objects <zircon/temporary-objects>`,
416416

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
.. title:: clang-tidy - modernize-use-concise-preprocessor-directives
1+
.. title:: clang-tidy - readability-use-concise-preprocessor-directives
22

3-
modernize-use-concise-preprocessor-directives
3+
readability-use-concise-preprocessor-directives
44
=============================================
55

6-
Finds uses of ``#if`` that be simplified to ``#ifdef`` or ``#ifndef`` and,
6+
Finds uses of ``#if`` that can be simplified to ``#ifdef`` or ``#ifndef`` and,
77
since C23 and C++23, uses of ``#elif`` that can be simplified to ``#elifdef``
88
or ``#elifndef``:
99

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,110 +1,110 @@
1-
// RUN: %check_clang_tidy -std=c++98 -check-suffixes=,CXX %s modernize-use-concise-preprocessor-directives %t
2-
// RUN: %check_clang_tidy -std=c++11 -check-suffixes=,CXX %s modernize-use-concise-preprocessor-directives %t
3-
// RUN: %check_clang_tidy -std=c++14 -check-suffixes=,CXX %s modernize-use-concise-preprocessor-directives %t
4-
// RUN: %check_clang_tidy -std=c++17 -check-suffixes=,CXX %s modernize-use-concise-preprocessor-directives %t
5-
// RUN: %check_clang_tidy -std=c++20 -check-suffixes=,CXX %s modernize-use-concise-preprocessor-directives %t
6-
// RUN: %check_clang_tidy -std=c++23-or-later -check-suffixes=,23,CXX,CXX23 %s modernize-use-concise-preprocessor-directives %t
7-
8-
// RUN: %check_clang_tidy -std=c99 %s modernize-use-concise-preprocessor-directives %t -- -- -x c
9-
// RUN: %check_clang_tidy -std=c11 %s modernize-use-concise-preprocessor-directives %t -- -- -x c
10-
// RUN: %check_clang_tidy -std=c23-or-later -check-suffixes=,23 %s modernize-use-concise-preprocessor-directives %t -- -- -x c
11-
12-
// CHECK-MESSAGES: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifdef [modernize-use-concise-preprocessor-directives]
1+
// RUN: %check_clang_tidy -std=c++98 -check-suffixes=,CXX %s readability-use-concise-preprocessor-directives %t
2+
// RUN: %check_clang_tidy -std=c++11 -check-suffixes=,CXX %s readability-use-concise-preprocessor-directives %t
3+
// RUN: %check_clang_tidy -std=c++14 -check-suffixes=,CXX %s readability-use-concise-preprocessor-directives %t
4+
// RUN: %check_clang_tidy -std=c++17 -check-suffixes=,CXX %s readability-use-concise-preprocessor-directives %t
5+
// RUN: %check_clang_tidy -std=c++20 -check-suffixes=,CXX %s readability-use-concise-preprocessor-directives %t
6+
// RUN: %check_clang_tidy -std=c++23-or-later -check-suffixes=,23,CXX,CXX23 %s readability-use-concise-preprocessor-directives %t
7+
8+
// RUN: %check_clang_tidy -std=c99 %s readability-use-concise-preprocessor-directives %t -- -- -x c
9+
// RUN: %check_clang_tidy -std=c11 %s readability-use-concise-preprocessor-directives %t -- -- -x c
10+
// RUN: %check_clang_tidy -std=c23-or-later -check-suffixes=,23 %s readability-use-concise-preprocessor-directives %t -- -- -x c
11+
12+
// CHECK-MESSAGES: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifdef [readability-use-concise-preprocessor-directives]
1313
// CHECK-FIXES: #ifdef FOO
1414
#if defined(FOO)
15-
// CHECK-MESSAGES-23: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #elifdef [modernize-use-concise-preprocessor-directives]
15+
// CHECK-MESSAGES-23: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #elifdef [readability-use-concise-preprocessor-directives]
1616
// CHECK-FIXES-23: #elifdef BAR
1717
#elif defined(BAR)
1818
#endif
1919

20-
// CHECK-MESSAGES: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifdef [modernize-use-concise-preprocessor-directives]
20+
// CHECK-MESSAGES: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifdef [readability-use-concise-preprocessor-directives]
2121
// CHECK-FIXES: #ifdef FOO
2222
#if defined FOO
23-
// CHECK-MESSAGES-23: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #elifdef [modernize-use-concise-preprocessor-directives]
23+
// CHECK-MESSAGES-23: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #elifdef [readability-use-concise-preprocessor-directives]
2424
// CHECK-FIXES-23: #elifdef BAR
2525
#elif defined BAR
2626
#endif
2727

28-
// CHECK-MESSAGES: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifdef [modernize-use-concise-preprocessor-directives]
28+
// CHECK-MESSAGES: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifdef [readability-use-concise-preprocessor-directives]
2929
// CHECK-FIXES: #ifdef FOO
3030
#if (defined(FOO))
31-
// CHECK-MESSAGES-23: :[[@LINE+2]]:4: warning: preprocessor condition can be written more concisely using #elifdef [modernize-use-concise-preprocessor-directives]
31+
// CHECK-MESSAGES-23: :[[@LINE+2]]:4: warning: preprocessor condition can be written more concisely using #elifdef [readability-use-concise-preprocessor-directives]
3232
// CHECK-FIXES-23: # elifdef BAR
3333
# elif (defined(BAR))
3434
#endif
3535

36-
// CHECK-MESSAGES: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifdef [modernize-use-concise-preprocessor-directives]
36+
// CHECK-MESSAGES: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifdef [readability-use-concise-preprocessor-directives]
3737
// CHECK-FIXES: #ifdef FOO
3838
#if (defined FOO)
39-
// CHECK-MESSAGES-23: :[[@LINE+2]]:4: warning: preprocessor condition can be written more concisely using #elifdef [modernize-use-concise-preprocessor-directives]
39+
// CHECK-MESSAGES-23: :[[@LINE+2]]:4: warning: preprocessor condition can be written more concisely using #elifdef [readability-use-concise-preprocessor-directives]
4040
// CHECK-FIXES-23: # elifdef BAR
4141
# elif (defined BAR)
4242
#endif
4343

44-
// CHECK-MESSAGES: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifndef [modernize-use-concise-preprocessor-directives]
44+
// CHECK-MESSAGES: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifndef [readability-use-concise-preprocessor-directives]
4545
// CHECK-FIXES: #ifndef FOO
4646
#if !defined(FOO)
47-
// CHECK-MESSAGES-23: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #elifndef [modernize-use-concise-preprocessor-directives]
47+
// CHECK-MESSAGES-23: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #elifndef [readability-use-concise-preprocessor-directives]
4848
// CHECK-FIXES-23: #elifndef BAR
4949
#elif !defined(BAR)
5050
#endif
5151

5252
#ifdef __cplusplus
53-
// CHECK-MESSAGES-CXX: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifndef [modernize-use-concise-preprocessor-directives]
53+
// CHECK-MESSAGES-CXX: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifndef [readability-use-concise-preprocessor-directives]
5454
// CHECK-FIXES-CXX: #ifndef FOO
5555
#if not defined(FOO)
56-
// CHECK-MESSAGES-CXX23: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #elifndef [modernize-use-concise-preprocessor-directives]
56+
// CHECK-MESSAGES-CXX23: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #elifndef [readability-use-concise-preprocessor-directives]
5757
// CHECK-FIXES-CXX23: #elifndef BAR
5858
#elif not defined(BAR)
5959
#endif
6060
#endif // __cplusplus
6161

62-
// CHECK-MESSAGES: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifndef [modernize-use-concise-preprocessor-directives]
62+
// CHECK-MESSAGES: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifndef [readability-use-concise-preprocessor-directives]
6363
// CHECK-FIXES: #ifndef FOO
6464
#if !defined FOO
65-
// CHECK-MESSAGES-23: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #elifndef [modernize-use-concise-preprocessor-directives]
65+
// CHECK-MESSAGES-23: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #elifndef [readability-use-concise-preprocessor-directives]
6666
// CHECK-FIXES-23: #elifndef BAR
6767
#elif !defined BAR
6868
#endif
6969

7070
#ifdef __cplusplus
71-
// CHECK-MESSAGES-CXX: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifndef [modernize-use-concise-preprocessor-directives]
71+
// CHECK-MESSAGES-CXX: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifndef [readability-use-concise-preprocessor-directives]
7272
// CHECK-FIXES-CXX: #ifndef FOO
7373
#if not defined FOO
74-
// CHECK-MESSAGES-CXX23: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #elifndef [modernize-use-concise-preprocessor-directives]
74+
// CHECK-MESSAGES-CXX23: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #elifndef [readability-use-concise-preprocessor-directives]
7575
// CHECK-FIXES-CXX23: #elifndef BAR
7676
#elif not defined BAR
7777
#endif
7878
#endif // __cplusplus
7979

80-
// CHECK-MESSAGES: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifndef [modernize-use-concise-preprocessor-directives]
80+
// CHECK-MESSAGES: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifndef [readability-use-concise-preprocessor-directives]
8181
// CHECK-FIXES: #ifndef FOO
8282
#if (!defined(FOO))
83-
// CHECK-MESSAGES-23: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #elifndef [modernize-use-concise-preprocessor-directives]
83+
// CHECK-MESSAGES-23: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #elifndef [readability-use-concise-preprocessor-directives]
8484
// CHECK-FIXES-23: #elifndef BAR
8585
#elif (!defined(BAR))
8686
#endif
8787

88-
// CHECK-MESSAGES: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifndef [modernize-use-concise-preprocessor-directives]
88+
// CHECK-MESSAGES: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifndef [readability-use-concise-preprocessor-directives]
8989
// CHECK-FIXES: #ifndef FOO
9090
#if (!defined FOO)
91-
// CHECK-MESSAGES-23: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #elifndef [modernize-use-concise-preprocessor-directives]
91+
// CHECK-MESSAGES-23: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #elifndef [readability-use-concise-preprocessor-directives]
9292
// CHECK-FIXES-23: #elifndef BAR
9393
#elif (!defined BAR)
9494
#endif
9595

96-
// CHECK-MESSAGES: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifndef [modernize-use-concise-preprocessor-directives]
96+
// CHECK-MESSAGES: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifndef [readability-use-concise-preprocessor-directives]
9797
// CHECK-FIXES: #ifndef FOO
9898
#if !(defined(FOO))
99-
// CHECK-MESSAGES-23: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #elifndef [modernize-use-concise-preprocessor-directives]
99+
// CHECK-MESSAGES-23: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #elifndef [readability-use-concise-preprocessor-directives]
100100
// CHECK-FIXES-23: #elifndef BAR
101101
#elif !(defined(BAR))
102102
#endif
103103

104-
// CHECK-MESSAGES: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifndef [modernize-use-concise-preprocessor-directives]
104+
// CHECK-MESSAGES: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifndef [readability-use-concise-preprocessor-directives]
105105
// CHECK-FIXES: #ifndef FOO
106106
#if !(defined FOO)
107-
// CHECK-MESSAGES-23: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #elifndef [modernize-use-concise-preprocessor-directives]
107+
// CHECK-MESSAGES-23: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #elifndef [readability-use-concise-preprocessor-directives]
108108
// CHECK-FIXES-23: #elifndef BAR
109109
#elif !(defined BAR)
110110
#endif
@@ -113,18 +113,18 @@
113113
// handling them doesn't really add any complexity to the implementation.
114114
// Test them for good measure.
115115

116-
// CHECK-MESSAGES: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifndef [modernize-use-concise-preprocessor-directives]
116+
// CHECK-MESSAGES: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifndef [readability-use-concise-preprocessor-directives]
117117
// CHECK-FIXES: #ifndef FOO
118118
#if !((!!(defined(FOO))))
119-
// CHECK-MESSAGES-23: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #elifdef [modernize-use-concise-preprocessor-directives]
119+
// CHECK-MESSAGES-23: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #elifdef [readability-use-concise-preprocessor-directives]
120120
// CHECK-FIXES-23: #elifdef BAR
121121
#elif ((!(!(defined(BAR)))))
122122
#endif
123123

124-
// CHECK-MESSAGES: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifndef [modernize-use-concise-preprocessor-directives]
124+
// CHECK-MESSAGES: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #ifndef [readability-use-concise-preprocessor-directives]
125125
// CHECK-FIXES: #ifndef FOO
126126
#if !((!!(defined FOO)))
127-
// CHECK-MESSAGES-23: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #elifdef [modernize-use-concise-preprocessor-directives]
127+
// CHECK-MESSAGES-23: :[[@LINE+2]]:2: warning: preprocessor condition can be written more concisely using #elifdef [readability-use-concise-preprocessor-directives]
128128
// CHECK-FIXES-23: #elifdef BAR
129129
#elif ((!(!(defined BAR))))
130130
#endif

0 commit comments

Comments
 (0)