This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] Add "portability" module and rename readability-simd-intrinsics to portability-simd-intrinsics
ClosedPublic

Authored by MaskRay on Mar 6 2018, 1:23 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

MaskRay created this revision.Mar 6 2018, 1:23 PM
Eugene.Zelenko added a project: Restricted Project.
MaskRay updated this revision to Diff 137259.Mar 6 2018, 1:30 PM

index.rst

MaskRay retitled this revision from [clang-tidy] Add "portability" module and move readability-simd-intrinsics to portability-simd-intrinsics to [clang-tidy] Add "portability" module and rename readability-simd-intrinsics to portability-simd-intrinsics.Mar 6 2018, 1:34 PM

I should have seen in during the initial review, but better now than never, right? :)

clang-tidy/portability/SIMDIntrinsicsCheck.cpp
141 ↗(On Diff #137262)

Here too, surely some sane static size can be picked?

clang-tidy/portability/SIMDIntrinsicsCheck.h
32 ↗(On Diff #137262)

This could be llvm::SmallString<32> Std;, actually. (or strlen("std::experimental"))

MaskRay updated this revision to Diff 137275.Mar 6 2018, 2:30 PM

std::string -> llvm::SmallString

MaskRay marked 2 inline comments as done.Mar 6 2018, 2:37 PM
MaskRay added inline comments.
clang-tidy/portability/SIMDIntrinsicsCheck.cpp
141 ↗(On Diff #137262)

Changed to llvm::SmallString<32> Std;

The choices can be:

"std::experimental"
"std"
"dimsum" (https://github.com/google/dimsum)

strlen("std::experimental") = 17 is the longest. Raise to 32 because the <32u> template instantiation has been used elsewhere.

clang-tidy/portability/SIMDIntrinsicsCheck.h
32 ↗(On Diff #137262)

Answered above.

Please mention new module in Release Notes. I think new modules should be before new checks there.

MaskRay updated this revision to Diff 137293.Mar 6 2018, 4:29 PM
MaskRay marked 2 inline comments as done.

Mention new module portability in docs/ReleaseNotes.rst

Eugene.Zelenko added inline comments.Mar 6 2018, 4:31 PM
docs/ReleaseNotes.rst
60 ↗(On Diff #137293)

Module and check from it should be mentioned separately. See Release Notes for previous release.

alexfh accepted this revision.Mar 7 2018, 6:53 AM

Thank you!
LGTM

This revision is now accepted and ready to land.Mar 7 2018, 6:53 AM
MaskRay updated this revision to Diff 137406.Mar 7 2018, 8:58 AM

ReleaseNotes.rst

MaskRay marked 3 inline comments as done.Mar 7 2018, 8:58 AM
This revision was automatically updated to reflect the committed changes.
clang-tools-extra/trunk/test/clang-tidy/portability-simd-intrinsics-x86.cpp