[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 #73105
This commit is contained in:
Piotr Zegar 2023-11-29 22:53:59 +00:00
parent fae233c63f
commit fc19424d1d
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
// RUN: %check_clang_tidy %s bugprone-suspicious-enum-usage %t -- -config="{CheckOptions: {bugprone-suspicious-enum-usage.StrictMode: true}}" --
// RUN: %check_clang_tidy -std=c++17 %s bugprone-suspicious-enum-usage %t -- -config="{CheckOptions: {bugprone-suspicious-enum-usage.StrictMode: true}}" --
enum A {
A = 1,
@ -71,7 +71,7 @@ int trigger() {
unsigned p = R;
PP pp = Q;
p |= pp;
enum X x = Z;
p = x | Z;
return 0;

View File

@ -1,4 +1,4 @@
// RUN: %check_clang_tidy %s bugprone-suspicious-enum-usage %t -- -config="{CheckOptions: {bugprone-suspicious-enum-usage.StrictMode: false}}" --
// RUN: %check_clang_tidy -std=c++17 %s bugprone-suspicious-enum-usage %t -- -config="{CheckOptions: {bugprone-suspicious-enum-usage.StrictMode: false}}"
enum Empty {
};
@ -79,7 +79,7 @@ int dont_trigger() {
int d = c | H, e = b * a;
a = B | C;
b = X | Z;
if (Tuesday != Monday + 1 ||
Friday - Thursday != 1 ||
Sunday + Wednesday == (Sunday | Wednesday))