llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang-tidy Author: Victor Chernyakin (localspook) <details> <summary>Changes</summary> --- Patch is 58.01 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/184741.diff 70 Files Affected: - (modified) clang-tools-extra/test/clang-tidy/checkers/abseil/cleanup-ctad.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/boost/use-ranges-pipe.cpp (+2-2) - (modified) clang-tools-extra/test/clang-tidy/checkers/boost/use-ranges.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/bugprone/assignment-in-if-condition-cxx20.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/bugprone/bitwise-pointer-cast-cxx20.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/bugprone/branch-clone-fallthrough.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/bugprone/branch-clone-if-constexpr-template.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/bugprone/default-operator-new-on-overaligned-type-cpp17.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/bugprone/default-operator-new-on-overaligned-type.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/bugprone/exception-escape-consteval.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/bugprone/fold-init-type.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/bugprone/incorrect-enable-if.cpp (+2-2) - (modified) clang-tools-extra/test/clang-tidy/checkers/bugprone/multiple-new-in-one-expression.cpp (+2-2) - (modified) clang-tools-extra/test/clang-tidy/checkers/bugprone/narrowing-conversions-bitfields.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/bugprone/nondeterministic-pointer-iteration-order.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/bugprone/not-null-terminated-result-memcpy-safe-cxx.cpp (+2-2) - (modified) clang-tools-extra/test/clang-tidy/checkers/bugprone/not-null-terminated-result-memcpy-safe-other.c (+2-2) - (modified) clang-tools-extra/test/clang-tidy/checkers/bugprone/not-null-terminated-result-value-dependent-crash.cpp (+2-2) - (modified) clang-tools-extra/test/clang-tidy/checkers/bugprone/not-null-terminated-result-wmemcpy-safe-cxx.cpp (+2-2) - (modified) clang-tools-extra/test/clang-tidy/checkers/bugprone/signal-handler.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/bugprone/stringview-nullptr.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-memory-comparison.c (+2-2) - (modified) clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-string-compare.c (+2-3) - (modified) clang-tools-extra/test/clang-tidy/checkers/bugprone/unhandled-exception-at-new.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/bugprone/use-after-move.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/avoid-reference-coroutine-parameters.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/missing-std-forward-custom-function.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/no-suspend-with-lock.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/rvalue-reference-param-not-moved-custom-function.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/rvalue-reference-param-not-moved.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/google/readability-namespace-comments-missing-nested-namespaces.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/hicpp/signed-bitwise-integer-literals.cpp (+2-3) - (modified) clang-tools-extra/test/clang-tidy/checkers/misc/coroutine-hostile-raii.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/misc/misplaced-const-cxx17.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/misc/static-assert.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/misc/unconventional-assign-operator-cxx23.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/misc/use-internal-linkage-consteval.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/misc/use-internal-linkage-module.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/modernize/avoid-c-arrays-c++20.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/modernize/concat-nested-namespaces.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/modernize/loop-convert-reverse.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/modernize/loop-convert-rewritten-binop.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/modernize/make-unique-inaccessible-ctors.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/modernize/type-traits-GH153649.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/modernize/use-constraints-first-greatergreater.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/modernize/use-designated-initializers.cpp (+4-4) - (modified) clang-tools-extra/test/clang-tidy/checkers/modernize/use-nullptr-cxx20.cpp (+2-2) - (modified) clang-tools-extra/test/clang-tidy/checkers/modernize/use-ranges-pipe.cpp (+2-2) - (modified) clang-tools-extra/test/clang-tidy/checkers/modernize/use-ranges.cpp (+1-2) - (modified) clang-tools-extra/test/clang-tidy/checkers/modernize/use-starts-ends-with.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-format-custom.cpp (+2-2) - (modified) clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-numbers.cpp (+2-2) - (modified) clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-print-absl.cpp (+2-2) - (modified) clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-print-custom.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/performance/noexcept-move-constructor.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/readability/braces-around-statements-consteval-if.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/readability/braces-around-statements-constexpr-if-templates.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/readability/container-size-empty-cxx20.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/readability/else-after-return-if-consteval.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/readability/else-after-return-if-constexpr.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/readability/else-after-return.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/readability/function-cognitive-complexity.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/readability/function-size-variables-c++17.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming-anon-record-fields.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming-case-match.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming-outofline.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/readability/implicit-bool-conversion-cxx20.cpp (+1-1) - (modified) clang-tools-extra/test/clang-tidy/checkers/readability/redundant-casting.cpp (+3-3) - (modified) clang-tools-extra/test/clang-tidy/checkers/readability/redundant-inline-specifier.cpp (+2-2) - (modified) clang-tools-extra/test/clang-tidy/checkers/readability/simplify-boolean-expr-cxx23.cpp (+1-1) ``````````diff diff --git a/clang-tools-extra/test/clang-tidy/checkers/abseil/cleanup-ctad.cpp b/clang-tools-extra/test/clang-tidy/checkers/abseil/cleanup-ctad.cpp index 53400ac04d3b5..e4eb968950297 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/abseil/cleanup-ctad.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/abseil/cleanup-ctad.cpp @@ -1,4 +1,4 @@ -// RUN: %check_clang_tidy %s abseil-cleanup-ctad -std=c++17 %t +// RUN: %check_clang_tidy %s abseil-cleanup-ctad -std=c++17-or-later %t namespace std { diff --git a/clang-tools-extra/test/clang-tidy/checkers/boost/use-ranges-pipe.cpp b/clang-tools-extra/test/clang-tidy/checkers/boost/use-ranges-pipe.cpp index 2b32429a77a60..9254c461e8188 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/boost/use-ranges-pipe.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/boost/use-ranges-pipe.cpp @@ -1,7 +1,7 @@ -// RUN: %check_clang_tidy -std=c++14 %s boost-use-ranges %t -check-suffixes=,PIPE \ +// RUN: %check_clang_tidy -std=c++14-or-later %s boost-use-ranges %t -check-suffixes=,PIPE \ // RUN: -config="{CheckOptions: { \ // RUN: boost-use-ranges.UseReversePipe: true }}" -- -isystem %clang_tidy_headers -I %S/Inputs/use-ranges/ -// RUN: %check_clang_tidy -std=c++14 %s boost-use-ranges %t -check-suffixes=,NOPIPE -- -isystem %clang_tidy_headers -I %S/Inputs/use-ranges/ +// RUN: %check_clang_tidy -std=c++14-or-later %s boost-use-ranges %t -check-suffixes=,NOPIPE -- -isystem %clang_tidy_headers -I %S/Inputs/use-ranges/ // CHECK-FIXES: #include <boost/algorithm/cxx11/is_sorted.hpp> // CHECK-FIXES: #include <boost/range/adaptor/reversed.hpp> diff --git a/clang-tools-extra/test/clang-tidy/checkers/boost/use-ranges.cpp b/clang-tools-extra/test/clang-tidy/checkers/boost/use-ranges.cpp index a11915e26269f..0e52607099801 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/boost/use-ranges.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/boost/use-ranges.cpp @@ -1,5 +1,5 @@ // RUN: %check_clang_tidy -std=c++14 %s boost-use-ranges %t -- -- -isystem %clang_tidy_headers -I %S/Inputs/use-ranges/ -// RUN: %check_clang_tidy -std=c++17 %s boost-use-ranges %t -check-suffixes=,CPP17 -- -isystem %clang_tidy_headers -I %S/Inputs/use-ranges/ +// RUN: %check_clang_tidy -std=c++17-or-later %s boost-use-ranges %t -check-suffixes=,CPP17 -- -isystem %clang_tidy_headers -I %S/Inputs/use-ranges/ // CHECK-FIXES: #include <boost/range/algorithm/find.hpp> // CHECK-FIXES: #include <boost/range/algorithm/reverse.hpp> diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/assignment-in-if-condition-cxx20.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/assignment-in-if-condition-cxx20.cpp index b332b2e49ec7f..20a63c7337131 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/assignment-in-if-condition-cxx20.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/assignment-in-if-condition-cxx20.cpp @@ -1,4 +1,4 @@ -// RUN: %check_clang_tidy -std=c++20 %s bugprone-assignment-in-if-condition %t +// RUN: %check_clang_tidy -std=c++20-or-later %s bugprone-assignment-in-if-condition %t void testRequires() { if constexpr (requires(int &a) { a = 0; }) { diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/bitwise-pointer-cast-cxx20.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/bitwise-pointer-cast-cxx20.cpp index 6f7b827a980ae..da739db322a32 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/bitwise-pointer-cast-cxx20.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/bitwise-pointer-cast-cxx20.cpp @@ -1,4 +1,4 @@ -// RUN: %check_clang_tidy -std=c++20 %s bugprone-bitwise-pointer-cast %t +// RUN: %check_clang_tidy -std=c++20-or-later %s bugprone-bitwise-pointer-cast %t void memcpy(void* to, void* dst, unsigned long long size) { diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/branch-clone-fallthrough.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/branch-clone-fallthrough.cpp index fb1bebb78b6ce..3ee668ed97f73 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/branch-clone-fallthrough.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/branch-clone-fallthrough.cpp @@ -1,4 +1,4 @@ -// RUN: %check_clang_tidy %s bugprone-branch-clone %t -- -- -std=c++17 +// RUN: %check_clang_tidy -std=c++17-or-later %s bugprone-branch-clone %t -- void handle(int); diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/branch-clone-if-constexpr-template.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/branch-clone-if-constexpr-template.cpp index 10cf06e8d9cc8..e3bfe6d0a397f 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/branch-clone-if-constexpr-template.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/branch-clone-if-constexpr-template.cpp @@ -1,4 +1,4 @@ -// RUN: %check_clang_tidy %s bugprone-branch-clone %t -- -- -std=c++17 +// RUN: %check_clang_tidy -std=c++17-or-later %s bugprone-branch-clone %t void handle(int); diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/default-operator-new-on-overaligned-type-cpp17.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/default-operator-new-on-overaligned-type-cpp17.cpp index b05108c1e9775..d11b1221984d9 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/default-operator-new-on-overaligned-type-cpp17.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/default-operator-new-on-overaligned-type-cpp17.cpp @@ -1,4 +1,4 @@ -// RUN: %check_clang_tidy %s -std=c++14 bugprone-default-operator-new-on-overaligned-type %t +// RUN: %check_clang_tidy %s -std=c++11,c++14 bugprone-default-operator-new-on-overaligned-type %t // RUN: clang-tidy -checks='-*,bugprone-default-operator-new-on-overaligned-type' --extra-arg=-Wno-unused-variable --warnings-as-errors='*' %s -- -std=c++17 -faligned-allocation // RUN: clang-tidy -checks='-*,bugprone-default-operator-new-on-overaligned-type' --extra-arg=-Wno-unused-variable --warnings-as-errors='*' %s -- -std=c++17 -faligned-allocation diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/default-operator-new-on-overaligned-type.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/default-operator-new-on-overaligned-type.cpp index 379d8a2ff0f3c..d5cd5b7fefe19 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/default-operator-new-on-overaligned-type.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/default-operator-new-on-overaligned-type.cpp @@ -1,4 +1,4 @@ -// RUN: %check_clang_tidy %s -std=c++14 bugprone-default-operator-new-on-overaligned-type %t +// RUN: %check_clang_tidy %s -std=c++11,c++14 bugprone-default-operator-new-on-overaligned-type %t namespace std { typedef __typeof(sizeof(int)) size_t; diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/exception-escape-consteval.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/exception-escape-consteval.cpp index 6e4298bba8bf1..d058cbeb5a20d 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/exception-escape-consteval.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/exception-escape-consteval.cpp @@ -1,4 +1,4 @@ -// RUN: %check_clang_tidy -std=c++20 %s bugprone-exception-escape %t -- \ +// RUN: %check_clang_tidy -std=c++20-or-later %s bugprone-exception-escape %t -- \ // RUN: -- -fexceptions -Wno-everything namespace GH104457 { diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/fold-init-type.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/fold-init-type.cpp index b343028b9a6dc..52f1f8508e1ee 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/fold-init-type.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/fold-init-type.cpp @@ -1,4 +1,4 @@ -// RUN: %check_clang_tidy %s bugprone-fold-init-type -std=c++17 %t +// RUN: %check_clang_tidy %s bugprone-fold-init-type -std=c++17-or-later %t namespace std { template <class InputIt, class T> diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/incorrect-enable-if.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/incorrect-enable-if.cpp index 6ebd97fabd524..7882156f19a44 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/incorrect-enable-if.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/incorrect-enable-if.cpp @@ -1,5 +1,5 @@ -// RUN: %check_clang_tidy -std=c++11 %s bugprone-incorrect-enable-if %t -// RUN: %check_clang_tidy -check-suffix=CXX20 -std=c++20 %s bugprone-incorrect-enable-if %t +// RUN: %check_clang_tidy -std=c++11,c++14,c++17 %s bugprone-incorrect-enable-if %t +// RUN: %check_clang_tidy -std=c++20-or-later -check-suffix=CXX20 %s bugprone-incorrect-enable-if %t // NOLINTBEGIN namespace std { diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/multiple-new-in-one-expression.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/multiple-new-in-one-expression.cpp index 3bf8544d599f3..713e88457493b 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/multiple-new-in-one-expression.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/multiple-new-in-one-expression.cpp @@ -1,5 +1,5 @@ -// RUN: %check_clang_tidy -std=c++11 -check-suffixes=ALL,CPP11 %s bugprone-multiple-new-in-one-expression %t -- -- -target x86_64-unknown-unknown -// RUN: %check_clang_tidy -std=c++17 -check-suffixes=ALL,CPP17 %s bugprone-multiple-new-in-one-expression %t -- -- -target x86_64-unknown-unknown +// RUN: %check_clang_tidy -std=c++11,c++14 -check-suffixes=ALL,CPP11 %s bugprone-multiple-new-in-one-expression %t -- -- -target x86_64-unknown-unknown +// RUN: %check_clang_tidy -std=c++17-or-later -check-suffixes=ALL,CPP17 %s bugprone-multiple-new-in-one-expression %t -- -- -target x86_64-unknown-unknown namespace std { typedef __typeof__(sizeof(0)) size_t; diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/narrowing-conversions-bitfields.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/narrowing-conversions-bitfields.cpp index a7bb3c8d0c0c7..9770f44749267 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/narrowing-conversions-bitfields.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/narrowing-conversions-bitfields.cpp @@ -1,5 +1,5 @@ // RUN: %check_clang_tidy %s bugprone-narrowing-conversions %t \ -// RUN: -std=c++17 -- -target x86_64-unknown-linux +// RUN: -std=c++17-or-later -- -target x86_64-unknown-linux #define CHAR_BITS 8 static_assert(sizeof(unsigned int) == 32 / CHAR_BITS); diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/nondeterministic-pointer-iteration-order.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/nondeterministic-pointer-iteration-order.cpp index 91853874d0afc..ab65a5491d6d5 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/nondeterministic-pointer-iteration-order.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/nondeterministic-pointer-iteration-order.cpp @@ -1,4 +1,4 @@ -// RUN: %check_clang_tidy %s bugprone-nondeterministic-pointer-iteration-order %t -- -- -I%S -std=c++!4 +// RUN: %check_clang_tidy -std=c++14-or-later %s bugprone-nondeterministic-pointer-iteration-order %t -- -- -I%S #include "Inputs/system-header-simulator/sim_set" #include "Inputs/system-header-simulator/sim_unordered_set" diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/not-null-terminated-result-memcpy-safe-cxx.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/not-null-terminated-result-memcpy-safe-cxx.cpp index 8465b2bb81afd..e938780d06366 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/not-null-terminated-result-memcpy-safe-cxx.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/not-null-terminated-result-memcpy-safe-cxx.cpp @@ -1,5 +1,5 @@ -// RUN: %check_clang_tidy %s bugprone-not-null-terminated-result %t -- \ -// RUN: -- -std=c++11 -I %S/Inputs/not-null-terminated-result +// RUN: %check_clang_tidy -std=c++11-or-later %s bugprone-not-null-terminated-result %t -- \ +// RUN: -- -I %S/Inputs/not-null-terminated-result #include "not-null-terminated-result-cxx.h" diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/not-null-terminated-result-memcpy-safe-other.c b/clang-tools-extra/test/clang-tidy/checkers/bugprone/not-null-terminated-result-memcpy-safe-other.c index 606e0d8906fd7..117be44978da8 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/not-null-terminated-result-memcpy-safe-other.c +++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/not-null-terminated-result-memcpy-safe-other.c @@ -1,5 +1,5 @@ -// RUN: %check_clang_tidy %s bugprone-not-null-terminated-result %t -- \ -// RUN: -- -std=c11 -I %S/Inputs/not-null-terminated-result +// RUN: %check_clang_tidy -std=c11-or-later %s bugprone-not-null-terminated-result %t -- \ +// RUN: -- -I %S/Inputs/not-null-terminated-result #include "not-null-terminated-result-c.h" diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/not-null-terminated-result-value-dependent-crash.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/not-null-terminated-result-value-dependent-crash.cpp index 5f361c35e448c..b3cf685b05603 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/not-null-terminated-result-value-dependent-crash.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/not-null-terminated-result-value-dependent-crash.cpp @@ -1,5 +1,5 @@ -// RUN: %check_clang_tidy %s bugprone-not-null-terminated-result %t -- \ -// RUN: -- -std=c++17 -I %S/Inputs/not-null-terminated-result +// RUN: %check_clang_tidy -std=c++17-or-later %s bugprone-not-null-terminated-result %t -- \ +// RUN: -- -I %S/Inputs/not-null-terminated-result // This test case reproduces the crash when the check tries to evaluate // a value-dependent expression using EvaluateAsInt() in diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/not-null-terminated-result-wmemcpy-safe-cxx.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/not-null-terminated-result-wmemcpy-safe-cxx.cpp index 948d483f539b5..4d485afe1adeb 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/not-null-terminated-result-wmemcpy-safe-cxx.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/not-null-terminated-result-wmemcpy-safe-cxx.cpp @@ -1,5 +1,5 @@ -// RUN: %check_clang_tidy %s bugprone-not-null-terminated-result %t -- \ -// RUN: -- -std=c++11 -I %S/Inputs/not-null-terminated-result +// RUN: %check_clang_tidy -std=c++11-or-later %s bugprone-not-null-terminated-result %t -- \ +// RUN: -- -I %S/Inputs/not-null-terminated-result #include "not-null-terminated-result-cxx.h" diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/signal-handler.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/signal-handler.cpp index f1dc5ede35f29..8dcfb3330befe 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/signal-handler.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/signal-handler.cpp @@ -1,4 +1,4 @@ -// 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 +// RUN: %check_clang_tidy -std=c++11,c++14 %s bugprone-signal-handler %t -- -- -isystem %clang_tidy_headers -isystem %S/Inputs/signal-handler -target x86_64-unknown-unknown // FIXME: Fix the checker to work in C++17 or later mode. #include "stdcpp.h" #include "stdio.h" diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/stringview-nullptr.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/stringview-nullptr.cpp index b85ba02e7e41b..422d32207e211 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/stringview-nullptr.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/stringview-nullptr.cpp @@ -1,4 +1,4 @@ -// RUN: %check_clang_tidy %s bugprone-stringview-nullptr -std=c++17 %t +// RUN: %check_clang_tidy %s bugprone-stringview-nullptr -std=c++17-or-later %t namespace std { diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-memory-comparison.c b/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-memory-comparison.c index e0abba013d65a..d3ecffec9a781 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-memory-comparison.c +++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-memory-comparison.c @@ -1,5 +1,5 @@ -// RUN: %check_clang_tidy %s bugprone-suspicious-memory-comparison %t \ -// RUN: -- -- -target x86_64-unknown-unknown -std=c99 +// RUN: %check_clang_tidy -std=c99-or-later %s bugprone-suspicious-memory-comparison %t \ +// RUN: -- -- -target x86_64-unknown-unknown typedef __SIZE_TYPE__ size_t; int memcmp(const void *lhs, const void *rhs, size_t count); diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-string-compare.c b/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-string-compare.c index 99068476d6a78..a72f7a3785677 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-string-compare.c +++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-string-compare.c @@ -1,8 +1,7 @@ -// RUN: %check_clang_tidy %s bugprone-suspicious-string-compare %t -- \ +// RUN: %check_clang_tidy -std=c99-or-later %s bugprone-suspicious-string-compare %t -- \ // RUN: -config='{CheckOptions: \ // RUN: {bugprone-suspicious-string-compare.WarnOnImplicitComparison: true, \ -// RUN: bugprone-suspicious-string-compare.WarnOnLogicalNotComparison: true}}' \ -// RUN: -- -std=c99 +// RUN: bugprone-suspicious-string-compare.WarnOnLogicalNotComparison: true}}' static const char A[] = "abc"; diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/unhandled-exception-at-new.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/unhandled-exception-at-new.cpp index 297db099f0667..1f1a093726e4e 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/unhandled-exception-at-new.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/unhandled-exception-at-new.cpp @@ -1,4 +1,4 @@ -// RUN: %check_clang_tidy -std=c++14 %s bugprone-unhandled-exception-at-new %t -- -- -fexceptions +// RUN: %check_clang_tidy -std=c++11,c++14 %s bugprone-unhandled-exception-at-new %t -- -- -fexceptions // FIXME: Fix the checker to work in C++17 or later mode. namespace std { typedef __typeof__(sizeof(0)) size_t; diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/use-after-move.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/use-after-move.cpp index 0f1678cff35a7..fd6a3961ba43b 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/use-after-move.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/use-after-move.cpp @@ -1,4 +1,4 @@ -// RUN: %check_clang_tidy -std=c++11 -check-suffixes=,CXX11 %s bugprone-use-after-move %t -- \ +// RUN: %check_clang_tidy -std=c++11,c++14 -check-suffixes=,CXX11 %s bugprone-use-after-move %t -- \ // RUN: -config='{CheckOptions: { \ // RUN: bugprone-use-after-move.InvalidationFunctions: "::Database<>::StaticCloseConnection;Database<>::CloseConnection;FriendCloseConnection;FreeCloseConnection", \ // RUN: bugprone-use-after-move.ReinitializationFunctions: "::Database<>::Reset;::Database<>::StaticReset;::FriendReset;::RegularReset" \ diff --git a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/avoid-reference-coroutine-parameters.cpp b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/avoid-reference-coroutine-parameters.cpp index 4df872ee15c6f..2ad93e22fc884 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/avoid-reference-coroutine-parameters.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/avoid-reference-coroutine-parameters.cpp @@ -1,4 +1,4 @@ -// RUN: %check_clang_tidy -std=c++20 %s cppcoreguidelines-avoid-reference-coroutine-parameters %t -- +// RUN: %check_clang_tidy -std=c++20-or-later %s cppcoreguidelines-avoid-reference-coroutine-parameters %t // NOLINTBEGIN namespace std { diff --git a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/missing-std-forward-custom-function.cpp b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/missing-std-forward-custom-function.cpp index 7ccac1a10015f..deab545eb39a3 100644 --- a/clang-tools-extra/tes... [truncated] `````````` </details> https://github.com/llvm/llvm-project/pull/184741 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
