Force semicolons or remove them in experimental/simd
Details
- Reviewers
• Quuxplusone ldionne Mordante - Group Reviewers
Restricted Project - Commits
- rGbdd5b9483712: [libc++][NFC] Remove clang-diagnostic-c++98-compat-extra-semi warnings in…
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM mod important alteration. Let's not introduce _LIBCPP_FORCE_SEMICOLON since it's trivial to avoid.
libcxx/include/experimental/simd | ||
---|---|---|
773 |
libcxx/include/experimental/simd | ||
---|---|---|
773 | These semicolons aren't actually required either, so this won't work. |
libcxx/include/experimental/simd | ||
---|---|---|
773 | Based on the definition of the macro on line 734, either your solution or mine should work to suppress unnecessary-semicolon diagnostics. #define _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, _NUM_ELEMENT) \ template <> \ struct __vec_ext_traits<_TYPE, sizeof(_TYPE) * _NUM_ELEMENT> { \ using type = \ _TYPE __attribute__((vector_size(sizeof(_TYPE) * _NUM_ELEMENT))); \ }; and then #define _LIBCPP_SPECIALIZE_VEC_EXT_32(_TYPE) \ _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 1) \ _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 2) \ _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 3) \ ~~~ _LIBCPP_SPECIALIZE_VEC_EXT_32(char) _LIBCPP_SPECIALIZE_VEC_EXT_32(char16_t) _LIBCPP_SPECIALIZE_VEC_EXT_32(char32_t) ~~~ That should definitely satisfy whatever semicolon-checker is complaining. |
- Remove _LIBCPP_FORCE_SEMICOLON
libcxx/include/experimental/simd | ||
---|---|---|
773 | Sorry, I missed that it's a struct and not a template function. |
This is a clang-tidy check which is already enabled. We just don't run clang-tidy yet.