gribozavr accepted this revision.
gribozavr added a comment.
This revision is now accepted and ready to land.

FWIW, I like this approach better than the one in Static Analyzer because it 
warns on the variable declaration -- that's where the root of the issue is, not 
at the call to `dispatch_once()`. Like, what can you in principle do with a 
local `dispatch_once_t`? not much -- therefore produce a warning right there.



================
Comment at: 
clang-tools-extra/docs/clang-tidy/checks/darwin-dispatch-once-nonstatic.rst:10
+
+It is a common paradigm to have functions initialize internal static or global
+data once when the function runs, but programmers have been known to miss the
----------------
s/paradigm/pattern/


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

https://reviews.llvm.org/D67567



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to