[PATCH] D67567: [clang-tidy] New check to warn when storing dispatch_once_t in non-static, non-global storage

Stephane Moore via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 26 14:59:25 PDT 2019


stephanemoore added a comment.

> Does the check allow variables in anonymous namespaces?
> 
>   namespace {
>   dispatch_once_t onceToken;
>   }
> 
> 
> I //think// such variables should satisfy initialization requirements.
> 
> If not, can we update the check to not trigger on variables? Either way, can we add a test to verify behavior for variables in anonymous namespaces?

Nevermind, I overlooked that there is already a variable in an anonymous namespace in the test 😅 Thanks for that!


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

https://reviews.llvm.org/D67567





More information about the cfe-commits mailing list