HomePhabricator

Don't warn about selectany on implicitly inline variables

Description

Don't warn about selectany on implicitly inline variables

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

Reviewers: epastor, thakis, hans

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D67426

Details

Committed
rnkSep 12 2019, 10:55 AM
Differential Revision
D67426: Don't warn about selectany on implicitly inline variables
Parents
rL371748: [MemorySSA] Pass (for update) MSSAU when hoisting instructions.
Branches
Unknown
Tags
Unknown