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

2021-02-26 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb18f14d6897b: [clang-tidy] Remove some test c++ mode 
restrictions. (authored by njames93).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97544/new/

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: 

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

2021-02-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97544/new/

https://reviews.llvm.org/D97544

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2021-02-26 Thread Nathan James via Phabricator via cfe-commits
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
+++