[PATCH] D42983: [clang-tidy] Add readability-simd-intrinsics check.

Tim Shen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 7 11:15:45 PST 2018


timshen added inline comments.


================
Comment at: clang-tidy/readability/SIMDIntrinsicsCheck.cpp:75
+  // libcxx implementation of std::experimental::simd requires at least C++11.
+  if (!Result.Context->getLangOpts().CPlusPlus11)
+    return;
----------------
MaskRay wrote:
> lebedev.ri wrote:
> > Is it reasonable to suggest to use `<experimental/*>`?
> > I would guess it should be `CPlusPlus2a`
> Added a check-specific option `readability-simd-intrinsics.Experiment`.
> 
> 
> Is it reasonable to suggest to use <experimental/*>?

I think there are two approaches to proceed:
1) We just warn the users, but don't suggest <experimental/simd> fixes.
2) We warn and suggest <experimental/simd> fixes, but only when a flag is turned on (off by default). The flag documentation should clearly include "suggest <experimental/simd> API".

I'm not sure which one fits better.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D42983





More information about the cfe-commits mailing list