[clang-tools-extra] b18f14d - [clang-tidy] Remove some test c++ mode restrictions.
Nathan James via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 26 11:09:40 PST 2021
Author: Nathan James
Date: 2021-02-26T19:09:28Z
New Revision: b18f14d6897b9e9f34ffd0d8ed46b8ac596fbf05
URL: https://github.com/llvm/llvm-project/commit/b18f14d6897b9e9f34ffd0d8ed46b8ac596fbf05
DIFF: https://github.com/llvm/llvm-project/commit/b18f14d6897b9e9f34ffd0d8ed46b8ac596fbf05.diff
LOG: [clang-tidy] Remove some test c++ mode restrictions.
Some comments are redundant, others just simple fixes.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D97544
Added:
Modified:
clang-tools-extra/test/clang-tidy/checkers/abseil-faster-strsplit-delimiter.cpp
clang-tools-extra/test/clang-tidy/checkers/abseil-time-subtraction.cpp
clang-tools-extra/test/clang-tidy/checkers/abseil-upgrade-duration-conversions.cpp
clang-tools-extra/test/clang-tidy/checkers/google-readability-casting.cpp
clang-tools-extra/test/clang-tidy/checkers/portability-simd-intrinsics-ppc.cpp
clang-tools-extra/test/clang-tidy/checkers/portability-simd-intrinsics-x86.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/test/clang-tidy/checkers/abseil-faster-strsplit-delimiter.cpp b/clang-tools-extra/test/clang-tidy/checkers/abseil-faster-strsplit-delimiter.cpp
index ff8c034d2b1f..b5035941c9ce 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/abseil-faster-strsplit-delimiter.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/abseil-faster-strsplit-delimiter.cpp
@@ -1,5 +1,4 @@
// RUN: %check_clang_tidy -std=c++11-or-later %s abseil-faster-strsplit-delimiter %t
-// FIXME: Fix the checker to work in C++17 mode.
namespace absl {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/abseil-time-subtraction.cpp b/clang-tools-extra/test/clang-tidy/checkers/abseil-time-subtraction.cpp
index 6fd239bb457c..43d1feea1ec1 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/abseil-time-subtraction.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/abseil-time-subtraction.cpp
@@ -1,5 +1,4 @@
// RUN: %check_clang_tidy -std=c++11-or-later %s abseil-time-subtraction %t -- -- -I %S/Inputs
-// FIXME: Fix the checker to work in C++17 mode.
#include "absl/time/time.h"
diff --git a/clang-tools-extra/test/clang-tidy/checkers/abseil-upgrade-duration-conversions.cpp b/clang-tools-extra/test/clang-tidy/checkers/abseil-upgrade-duration-conversions.cpp
index db393a96a50d..32e65a63eb1c 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/abseil-upgrade-duration-conversions.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/abseil-upgrade-duration-conversions.cpp
@@ -1,5 +1,4 @@
// RUN: %check_clang_tidy -std=c++11-or-later %s abseil-upgrade-duration-conversions %t -- -- -I%S/Inputs
-// FIXME: Fix the checker to work in C++17 mode.
using int64_t = long long;
diff --git a/clang-tools-extra/test/clang-tidy/checkers/google-readability-casting.cpp b/clang-tools-extra/test/clang-tidy/checkers/google-readability-casting.cpp
index 4655e27cd8bc..bddc28c2d81e 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/google-readability-casting.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/google-readability-casting.cpp
@@ -1,5 +1,4 @@
// RUN: %check_clang_tidy -std=c++11-or-later %s google-readability-casting %t
-// FIXME: Fix the checker to work in C++17 mode.
bool g() { return false; }
diff --git a/clang-tools-extra/test/clang-tidy/checkers/portability-simd-intrinsics-ppc.cpp b/clang-tools-extra/test/clang-tidy/checkers/portability-simd-intrinsics-ppc.cpp
index 963379141a13..5c03d39f736a 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/portability-simd-intrinsics-ppc.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/portability-simd-intrinsics-ppc.cpp
@@ -2,7 +2,10 @@
// RUN: -config='{CheckOptions: [ \
// RUN: {key: portability-simd-intrinsics.Suggest, value: 1} \
// RUN: ]}' -- -target ppc64le -maltivec
-// FIXME: Fix the checker to work in C++20 mode.
+// RUN: %check_clang_tidy -std=c++20-or-later %s portability-simd-intrinsics -check-suffix=CXX20 %t -- \
+// RUN: -config='{CheckOptions: [ \
+// RUN: {key: portability-simd-intrinsics.Suggest, value: 1} \
+// RUN: ]}' -- -target ppc64le -maltivec
vector int vec_add(vector int, vector int);
@@ -10,5 +13,6 @@ void PPC() {
vector int i0, i1;
vec_add(i0, i1);
-// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: 'vec_add' can be replaced by operator+ on std::experimental::simd objects [portability-simd-intrinsics]
+ // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: 'vec_add' can be replaced by operator+ on std::experimental::simd objects [portability-simd-intrinsics]
+ // CHECK-MESSAGES-CXX20: :[[@LINE-2]]:3: warning: 'vec_add' can be replaced by operator+ on std::simd objects [portability-simd-intrinsics]
}
diff --git a/clang-tools-extra/test/clang-tidy/checkers/portability-simd-intrinsics-x86.cpp b/clang-tools-extra/test/clang-tidy/checkers/portability-simd-intrinsics-x86.cpp
index 24c9a82c5c42..8d71593c8d04 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/portability-simd-intrinsics-x86.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/portability-simd-intrinsics-x86.cpp
@@ -2,7 +2,10 @@
// RUN: -config='{CheckOptions: [ \
// RUN: {key: portability-simd-intrinsics.Suggest, value: 1} \
// RUN: ]}' -- -target x86_64
-// FIXME: Fix the checker to work in C++20 mode.
+// RUN: %check_clang_tidy -std=c++20-or-later %s portability-simd-intrinsics -check-suffix=CXX20 %t -- \
+// RUN: -config='{CheckOptions: [ \
+// RUN: {key: portability-simd-intrinsics.Suggest, value: 1} \
+// RUN: ]}' -- -target x86_64
typedef long long __m128i __attribute__((vector_size(16)));
typedef double __m256 __attribute__((vector_size(32)));
@@ -18,7 +21,8 @@ void X86() {
__m256 d0;
_mm_add_epi32(i0, i1);
-// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: '_mm_add_epi32' can be replaced by operator+ on std::experimental::simd objects [portability-simd-intrinsics]
+ // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: '_mm_add_epi32' can be replaced by operator+ on std::experimental::simd objects [portability-simd-intrinsics]
+ // CHECK-MESSAGES-CXX20: :[[@LINE-2]]:3: warning: '_mm_add_epi32' can be replaced by operator+ on std::simd objects [portability-simd-intrinsics]
d0 = _mm256_load_pd(0);
_mm256_store_pd(0, d0);
More information about the cfe-commits
mailing list