This is an archive of the discontinued LLVM Phabricator instance.

Don't warn about selectany on implicitly inline variables
ClosedPublic

Authored by rnk on Sep 10 2019, 5:47 PM.

Details

Summary

This avoids a -Wignored-attribute warning on the code pattern Microsoft
recommends for integral const static data members defined in headers
here:
https://docs.microsoft.com/en-us/cpp/build/reference/microsoft-extensions-to-c-and-cpp?view=vs-2019

The attribute is redundant, but it is necessary when compiling in C++14
modes with /Za, which disables MSVC's extension that treats such
variables as implicitly inline.

Fixes PR43270

Diff Detail

Event Timeline

rnk created this revision.Sep 10 2019, 5:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 10 2019, 5:47 PM
epastor accepted this revision.Sep 12 2019, 7:09 AM
This revision is now accepted and ready to land.Sep 12 2019, 7:09 AM
This revision was automatically updated to reflect the committed changes.