[PATCH] D44173: [clang-tidy] Add "portability" module and rename readability-simd-intrinsics to portability-simd-intrinsics

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 6 14:38:22 PST 2018


MaskRay marked 2 inline comments as done.
MaskRay added inline comments.


================
Comment at: clang-tidy/portability/SIMDIntrinsicsCheck.cpp:141
   if (!New.empty()) {
     std::string Message;
     // If Suggest is true, give a P0214 alternative, otherwise point it out it
----------------
lebedev.ri wrote:
> Here too, surely some sane static size can be picked?
Changed to   `llvm::SmallString<32> Std;`

The choices can be:

"std::experimental"
"std"
"dimsum" (https://github.com/google/dimsum)

strlen("std::experimental") = 17 is the longest. Raise to 32 because the <32u> template instantiation has been used elsewhere.


================
Comment at: clang-tidy/portability/SIMDIntrinsicsCheck.h:32
  private:
+  std::string Std;
   const bool Suggest;
----------------
lebedev.ri wrote:
> This could be `llvm::SmallString<32> Std;`, actually. (or `strlen("std::experimental")`)
Answered above.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D44173





More information about the cfe-commits mailing list