summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/warn-msvc-enum-bitfield.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add warning when assigning enums to bitfields without an explicit unsigned ↵Reid Kleckner2016-11-161-0/+40
underlying type Summary: Add a warning when assigning enums to bitfields without an explicit unsigned underlying type. This is to prevent problems with MSVC compatibility, since the Microsoft ABI defaults to storing enums with a signed type, causing inconsistencies with saving to/reading from bitfields. Also disabled the warning in the dr0xx.cpp test which throws the error, and added a test for the warning. The warning can be disabled with -Wno-signed-enum-bitfield. Patch by Sasha Bermeister! Reviewers: rnk, aaron.ballman Subscribers: mehdi_amini, aaron.ballman, cfe-commits, thakis, dcheng Differential Revision: https://reviews.llvm.org/D24289 llvm-svn: 287177
OpenPOWER on IntegriCloud