This patch liberalizes -Wglobal-constructors to not emit warning if constructor is likely to be optimized away. This covers important LinkerInitialized idiom used e.g. in libsanitizer and Chromium:
enum LinkerInitialized { LINKER_INITIALIZED }; class Mutex { public: inline Mutex(base::LinkerInitialized) {} }; Mutex mu(LINKER_INITIALIZED); // Will be optimized away
No regressions in check-all.