[clang-tidy] Remove some test c++ mode restrictions.
authorNathan James <n.james93@hotmail.co.uk>
Fri, 26 Feb 2021 19:09:27 +0000 (19:09 +0000)
committerNathan James <n.james93@hotmail.co.uk>
Fri, 26 Feb 2021 19:09:28 +0000 (19:09 +0000)
Some comments are redundant, others just simple fixes.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D97544

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

index ff8c034..b503594 100644 (file)
@@ -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 {
 
index 6fd239b..43d1fee 100644 (file)
@@ -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"
 
index db393a9..32e65a6 100644 (file)
@@ -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;
 
index 4655e27..bddc28c 100644 (file)
@@ -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; }
 
index 9633791..5c03d39 100644 (file)
@@ -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]
 }
index 24c9a82..8d71593 100644 (file)
@@ -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);