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

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 13 01:56:16 PST 2018


hokein added inline comments.


================
Comment at: clang-tidy/readability/SIMDIntrinsicsCheck.cpp:46
+
+  static const llvm::StringMap<StringRef> Mapping{
+    // [simd.alg]
----------------
consider using `llvm::StringSwitch`?


================
Comment at: clang-tidy/readability/SIMDIntrinsicsCheck.cpp:102
+  } else {
+    return;
+  }
----------------
nit: use early return for readability.


================
Comment at: docs/clang-tidy/checks/readability-simd-intrinsics.rst:38
+
+   If set to non-zero, the check will be enabled and it will suggest ``std::experimental`` alternatives. Default is ``0``.
+
----------------
We don't use check's option to enable the check in clang-tidy, if users want to enable the check, they need to pass the check explicitly to clang-tidy (e.g. -checks="<your-check>"). I'd suggest to remove this option.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D42983





More information about the cfe-commits mailing list