mirror of
https://github.com/clang-retro/llvm.git
synced 2026-12-05 00:29:35 -08:00
Clang supports the `-Wglobal-constructors` flag which will indicate if a global constructor is being used. The current goal in `libc` is to make the constructors `constexpr` to prevent this from happening with straight construction. However, there are many other cases where we can emit a constructor that this won't catch. This should give warning if someone accidentally introduces a global constructor. Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D155721