juliehockett planned changes to this revision.
juliehockett marked 5 inline comments as done.
juliehockett added a comment.

In https://reviews.llvm.org/D53882#1282219, @aaron.ballman wrote:

> I am a bit confused by what this check is trying to accomplish. It seems like 
> this is intended to catch use of anything declared within the standard 
> library, but that includes library support things that are needed to write 
> useful code. For instance, it seems this means users cannot use initializer 
> lists or type traits. I'm not even certain users can overload `operator 
> new()` because that uses `std::size_t` as an argument.
>
> Can you expound on the requirements in a bit more detail? Is it truly "no 
> standard library functionality at all, including things required to be 
> supported in freestanding implementations"?


Yes. We're in the process of enabling the C++ standard library in the Zircon 
userspace code, and there is a firm requirement that no kernel code use 
anything in the std namespace (which declares its own implementations of things 
like type traits).

That said, the policy rollout has shifted a bit since I implemented this and so 
I'll be reworking it a bit (and also likely renaming it to 
zircon-kernel-no-std-namespace, so we can disable it for userspace code). 
Thanks all for your comments!


https://reviews.llvm.org/D53882



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D53882: [clang-tidy... Eugene Zelenko via Phabricator via cfe-commits
    • [PATCH] D53882: [clang... Julie Hockett via Phabricator via cfe-commits

Reply via email to