Skip to content

Commit b4d9ac8

Browse files
committed
[C++20][ClangTidy] Update the ClangTidy tests to also test in C++20 mode
Differential Revision: https://reviews.llvm.org/D144480
1 parent 2ea6bb6 commit b4d9ac8

12 files changed

+12
-10
lines changed

clang-tools-extra/test/clang-tidy/checkers/bugprone/dangling-handle.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: -config="{CheckOptions: \
33
// RUN: [{key: bugprone-dangling-handle.HandleClasses, \
44
// RUN: value: 'std::basic_string_view; ::llvm::StringRef;'}]}"
5-
// FIXME: Fix the checker to work in C++17 mode.
5+
// FIXME: Fix the checker to work in C++17 or later mode.
66

77
namespace std {
88

clang-tools-extra/test/clang-tidy/checkers/bugprone/easily-swappable-parameters-implicits.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy -std=c++17 %s bugprone-easily-swappable-parameters %t \
1+
// RUN: %check_clang_tidy -std=c++17-or-later %s bugprone-easily-swappable-parameters %t \
22
// RUN: -config='{CheckOptions: [ \
33
// RUN: {key: bugprone-easily-swappable-parameters.MinimumLength, value: 2}, \
44
// RUN: {key: bugprone-easily-swappable-parameters.IgnoredParameterNames, value: ""}, \

clang-tools-extra/test/clang-tidy/checkers/bugprone/exception-escape.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// RUN: {key: bugprone-exception-escape.FunctionsThatShouldNotThrow, value: 'enabled1,enabled2,enabled3'} \
55
// RUN: ]}" \
66
// RUN: -- -fexceptions
7+
// FIXME: Fix the checker to work in C++17 or later mode.
78

89
struct throwing_destructor {
910
~throwing_destructor() {

clang-tools-extra/test/clang-tidy/checkers/bugprone/signal-handler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %check_clang_tidy -std=c++14 %s bugprone-signal-handler %t -- -- -isystem %clang_tidy_headers -isystem %S/Inputs/signal-handler -target x86_64-unknown-unknown
2-
2+
// FIXME: Fix the checker to work in C++17 or later mode.
33
#include "stdcpp.h"
44
#include "stdio.h"
55

clang-tools-extra/test/clang-tidy/checkers/bugprone/unhandled-exception-at-new.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %check_clang_tidy -std=c++14 %s bugprone-unhandled-exception-at-new %t -- -- -fexceptions
2-
2+
// FIXME: Fix the checker to work in C++17 or later mode.
33
namespace std {
44
typedef __typeof__(sizeof(0)) size_t;
55
enum class align_val_t : std::size_t {};

clang-tools-extra/test/clang-tidy/checkers/cert/throw-exception-type.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %check_clang_tidy -std=c++11,c++14 %s cert-err60-cpp %t -- -- -fcxx-exceptions
22
// FIXME: Split off parts of this test that rely on dynamic exception
33
// specifications, and run this test in all language modes.
4-
4+
// FIXME: Fix the checker to work in C++17 or later mode.
55
struct S {};
66
struct T : S {};
77
struct U {

clang-tools-extra/test/clang-tidy/checkers/misc/static-assert.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %check_clang_tidy -std=c++11 -check-suffixes=,CXX11 %s misc-static-assert %t
2-
// RUN: %check_clang_tidy -std=c++17 -check-suffixes=,CXX17 %s misc-static-assert %t
2+
// RUN: %check_clang_tidy -std=c++17-or-later -check-suffixes=,CXX17 %s misc-static-assert %t
33

44
void abort() {}
55
#ifdef NDEBUG

clang-tools-extra/test/clang-tidy/checkers/performance/unnecessary-copy-initialization.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy -std=c++17 %s performance-unnecessary-copy-initialization %t
1+
// RUN: %check_clang_tidy -std=c++17-or-later %s performance-unnecessary-copy-initialization %t
22

33
template <typename T>
44
struct Iterator {

clang-tools-extra/test/clang-tidy/checkers/readability/const-return-type-macros.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy -std=c++14 %s readability-const-return-type %t -- \
1+
// RUN: %check_clang_tidy -std=c++14-or-later %s readability-const-return-type %t -- \
22
// RUN: -config="{CheckOptions: [{key: readability-const-return-type.IgnoreMacros, value: false}]}"
33

44
// p# = positive test

clang-tools-extra/test/clang-tidy/checkers/readability/const-return-type.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy -std=c++14 %s readability-const-return-type %t
1+
// RUN: %check_clang_tidy -std=c++14-or-later %s readability-const-return-type %t
22

33
// p# = positive test
44
// n# = negative test

clang-tools-extra/test/clang-tidy/checkers/readability/isolate-declaration-cxx17.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy -std=c++17 %s readability-isolate-declaration %t
1+
// RUN: %check_clang_tidy -std=c++17-or-later %s readability-isolate-declaration %t
22

33
template <typename T1, typename T2>
44
struct pair {

clang-tools-extra/test/clang-tidy/checkers/readability/use-anyofallof.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %check_clang_tidy -std=c++14,c++17 %s readability-use-anyofallof %t -- -- -fexceptions
2+
// FIXME: Fix the checker to work in C++20 mode.
23

34
bool good_any_of() {
45
int v[] = {1, 2, 3};

0 commit comments

Comments
 (0)