Author: Piotr Zegar Date: 2023-11-29T22:53:59Z New Revision: fc19424d1d6d0df20e1734610a8e80a8e5158009
URL: https://github.com/llvm/llvm-project/commit/fc19424d1d6d0df20e1734610a8e80a8e5158009 DIFF: https://github.com/llvm/llvm-project/commit/fc19424d1d6d0df20e1734610a8e80a8e5158009.diff LOG: [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 Added: Modified: clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-enum-usage-strict.cpp clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-enum-usage.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-enum-usage-strict.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-enum-usage-strict.cpp index 405dec22eea77c8..ec214945539ebf9 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-enum-usage-strict.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-enum-usage-strict.cpp @@ -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; diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-enum-usage.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-enum-usage.cpp index 257c82e88f9a3dd..de7eb989bd2d4ef 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-enum-usage.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-enum-usage.cpp @@ -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)) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits