MaskRay marked an inline comment as done.
MaskRay added inline comments.

================
Comment at: clang-tidy/readability/SIMDIntrinsicsCheck.cpp:77
+void SIMDIntrinsicsCheck::registerMatchers(MatchFinder *Finder) {
+  Finder->addMatcher(
+      
callExpr(callee(functionDecl(matchesName("^::(_mm_|_mm256_|_mm512_|vec_)"))),
----------------
Eugene.Zelenko wrote:
> You should enable this check only when compiling in appropriate C++ version. 
> See getLangOpts() usage in other checks.
Thx, I didn't know getLangOpts() before.

I think even in `-x c` mode, `::` is still the prefix of an identifier.

      matchesName("^(_mm_|_mm256_|_mm512_|vec_)")

doesn't match anything but 

      matchesName("^::(_mm_|_mm256_|_mm512_|vec_)")

matches.

verified via `clang-tidy -checks='-*,readability-simd-intrinsics' a.c -- -xc`



Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D42983



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

Reply via email to