[PATCH] D90944: [clang-tidy] implement misc-mt-unsafe

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 17 05:24:05 PST 2020


njames93 added a comment.

Also can this be ran through clang-tidy, feeling a few naming violations are in here. If you use arc to upload your patches you'll get lint warnings about clang-tidy and clang-format.



================
Comment at: clang-tools-extra/clang-tidy/misc/MtUnsafeCheck.cpp:279-282
+  llvm::DenseSet<StringRef> result;
+  result.insert(std::begin(posixFunctions), std::end(posixFunctions));
+  result.insert(std::begin(glibcFunctions), std::end(glibcFunctions));
+  return {result.begin(), result.end()};
----------------
Would it not be faster to get rid of the set. Instead insert all the items in to a vector, then sort and unique it


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90944/new/

https://reviews.llvm.org/D90944



More information about the cfe-commits mailing list