Skip to content

Commit fc19424

Browse files
committed
[clang-tidy][NFC] Fix bugprone-suspicious-enum-usage tests
Fixes failure in tests from a bugprone-suspicious-enum-usage check by limiting those test to C++17 only to make CI green. Tests were broken by change introduced in pull request llvm#73105
1 parent fae233c commit fc19424

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-enum-usage-strict.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy %s bugprone-suspicious-enum-usage %t -- -config="{CheckOptions: {bugprone-suspicious-enum-usage.StrictMode: true}}" --
1+
// RUN: %check_clang_tidy -std=c++17 %s bugprone-suspicious-enum-usage %t -- -config="{CheckOptions: {bugprone-suspicious-enum-usage.StrictMode: true}}" --
22

33
enum A {
44
A = 1,
@@ -71,7 +71,7 @@ int trigger() {
7171
unsigned p = R;
7272
PP pp = Q;
7373
p |= pp;
74-
74+
7575
enum X x = Z;
7676
p = x | Z;
7777
return 0;

clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-enum-usage.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy %s bugprone-suspicious-enum-usage %t -- -config="{CheckOptions: {bugprone-suspicious-enum-usage.StrictMode: false}}" --
1+
// RUN: %check_clang_tidy -std=c++17 %s bugprone-suspicious-enum-usage %t -- -config="{CheckOptions: {bugprone-suspicious-enum-usage.StrictMode: false}}"
22

33
enum Empty {
44
};
@@ -79,7 +79,7 @@ int dont_trigger() {
7979
int d = c | H, e = b * a;
8080
a = B | C;
8181
b = X | Z;
82-
82+
8383
if (Tuesday != Monday + 1 ||
8484
Friday - Thursday != 1 ||
8585
Sunday + Wednesday == (Sunday | Wednesday))

0 commit comments

Comments
 (0)