This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] Adding Fuchsia checker for thread local storage.
AbandonedPublic

Authored by juliehockett on Jan 11 2018, 1:29 PM.

Details

Summary

Adds a check to the Fuchsia module to warn if thread-local storage is used.

See https://fuchsia.googlesource.com/zircon/+/master/docs/cxx.md for reference.

Diff Detail

Event Timeline

juliehockett created this revision.Jan 11 2018, 1:29 PM
Eugene.Zelenko added inline comments.
clang-tidy/fuchsia/ThreadLocalCheck.cpp
23

Please run Clang-format over file. This line seems to be formatted incorrectly.

docs/ReleaseNotes.rst
70

Thread storage duration seems to be proper terminology. Same for first sentence in documentation.

test/clang-tidy/fuchsia-thread-local.cpp
12

Please separate with empty line.

juliehockett marked 3 inline comments as done.

Fixing comments

aaron.ballman added inline comments.Jan 13 2018, 8:27 AM
clang-tidy/fuchsia/CMakeLists.txt
6

Please keep this list in alphabetical order.

clang-tidy/fuchsia/ThreadLocalCheck.cpp
27

The docs say it's only disallowed in kernel mode. Can you remind me again -- are the fuchsia checks *only* for kernel mode, or is that the "zircon" part? I'm wondering if this check is overly broad for the guidelines, basically.

juliehockett abandoned this revision.Jan 17 2018, 1:52 PM

After some discussion, we decided that the false positive risk for non-kernel code isn't worth the check.