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

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 9 10:45:31 PST 2018


lebedev.ri added inline comments.


================
Comment at: clang-tidy/readability/SIMDIntrinsicsCheck.cpp:46
+
+  static const llvm::StringMap<std::string> Mapping{
+    // [simd.alg]
----------------
I think you can use `llvm::StringRef` here instead of `std::string`


================
Comment at: clang-tidy/readability/SIMDIntrinsicsCheck.cpp:88
+    : ClangTidyCheck(Name, Context),
+      Enabled(Options.getLocalOrGlobal("Enabled", 0) != 0) {}
+
----------------
`Enabled` seems too broad to me.
How about `UseStdExperimental`? (still defaults to `false`) 


================
Comment at: clang-tidy/readability/SIMDIntrinsicsCheck.cpp:98
+  if (getLangOpts().CPlusPlus2a) {
+    Std = "std";
+  } else if (getLangOpts().CPlusPlus11) {
----------------
So sorry for beating the same stuff again, but i believe as of right now, it's still only in `std::experimental` namespace, not in `std`?



Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D42983





More information about the cfe-commits mailing list