[PATCH] D97544: [clang-tidy] Remove some test c++ mode restrictions.

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 26 04:54:27 PST 2021


njames93 created this revision.
njames93 added reviewers: aaron.ballman, alexfh.
Herald added subscribers: kbarton, xazax.hun, nemanjai.
njames93 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Some comments are redundant, others just simple fixes.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D97544

Files:
  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: clang-tools-extra/test/clang-tidy/checkers/portability-simd-intrinsics-x86.cpp
===================================================================
--- clang-tools-extra/test/clang-tidy/checkers/portability-simd-intrinsics-x86.cpp
+++ 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 @@
   __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);
 
Index: clang-tools-extra/test/clang-tidy/checkers/portability-simd-intrinsics-ppc.cpp
===================================================================
--- clang-tools-extra/test/clang-tidy/checkers/portability-simd-intrinsics-ppc.cpp
+++ 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 @@
   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: clang-tools-extra/test/clang-tidy/checkers/google-readability-casting.cpp
===================================================================
--- clang-tools-extra/test/clang-tidy/checkers/google-readability-casting.cpp
+++ 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; }
 
Index: clang-tools-extra/test/clang-tidy/checkers/abseil-upgrade-duration-conversions.cpp
===================================================================
--- clang-tools-extra/test/clang-tidy/checkers/abseil-upgrade-duration-conversions.cpp
+++ 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;
 
Index: clang-tools-extra/test/clang-tidy/checkers/abseil-time-subtraction.cpp
===================================================================
--- clang-tools-extra/test/clang-tidy/checkers/abseil-time-subtraction.cpp
+++ 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"
 
Index: clang-tools-extra/test/clang-tidy/checkers/abseil-faster-strsplit-delimiter.cpp
===================================================================
--- clang-tools-extra/test/clang-tidy/checkers/abseil-faster-strsplit-delimiter.cpp
+++ 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 {
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97544.326658.patch
Type: text/x-patch
Size: 4818 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210226/2f18425f/attachment-0001.bin>


More information about the cfe-commits mailing list