[PATCH] D41963: [clang-tidy] Adding Fuchsia checker for thread local storage.

Eugene Zelenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 11 16:12:07 PST 2018


Eugene.Zelenko added inline comments.


================
Comment at: clang-tidy/fuchsia/ThreadLocalCheck.cpp:22
+  // Using thread-local storage is disallowed.
+    Finder->addMatcher(varDecl(hasThreadStorageDuration()).bind("decl"), this);
+}
----------------
Please run Clang-format over file. This line seems to be formatted incorrectly.


================
Comment at: docs/ReleaseNotes.rst:70
+
+  Warns if thread-local storage is used.
+
----------------
Thread storage duration seems to be [[http://en.cppreference.com/w/cpp/language/storage_duration|proper terminology]]. Same for first sentence  in documentation.


================
Comment at: test/clang-tidy/fuchsia-thread-local.cpp:11
+  // CHECK-NEXT:  extern thread_local int bar;
+  int baz;
+  return 0;
----------------
Please separate with empty line.


https://reviews.llvm.org/D41963





More information about the cfe-commits mailing list