summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/ms_struct.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename -Wmsvc-include to -Wmicrosoft-include, now that -Wmicrosoft is split up.Nico Weber2015-07-281-4/+4
| | | | | | | | | (Keep -Wmsvc-include around as an alias.) While here, also replace the one other mention of "MSVC" in diagnostics with "Microsoft", for consistency. llvm-svn: 243444
* Diagnose attempts to apply ms_struct to records with base classesJohn McCall2014-02-271-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | or virtual functions, but permit that error to be downgraded to a warning (with -Wno-error=incompatible-ms-struct), and officially support this kind of dual, ABI-mixing layout. The basic problem here is that projects which use ms_struct are often not very circumspect about what types they annotate; for example, some projects enable the pragma in a prefix header and then only selectively disable it around system header inclusions. They may only care about binary compatibility with MSVC for a subset of those structs, but that doesn't mean they have no binary compatibility concerns at all for the rest; thus we are essentially forced into supporting this hybrid ABI. But it's reasonable for us to at least point out the places where we're not making any guarantees. The original diagnostic was for dynamic classes, i.e. those with virtual functions or virtual bases; I've extended it to include all classes with bases, because we are not actually making any attempt to duplicate MSVC's base subobject layout in ms_struct (and it is indeed quite different from Itanium, even for non-virtual bases). rdar://16178895 llvm-svn: 202427
* Adds Microsoft compatiable C++ record layout code to clang.Warren Hunt2013-10-111-1/+0
| | | | llvm-svn: 192494
* Rewrite record layout for ms_struct structs.Eli Friedman2013-06-261-0/+19
The old implementation of ms_struct in RecordLayoutBuilder was a complete mess: it depended on complicated conditionals which didn't really reflect the underlying logic, and placed a burden on users of the resulting RecordLayout. This commit rips out almost all of the old code, and replaces it with simple checks in RecordLayoutBuilder::LayoutBitField. This commit also fixes <rdar://problem/14252115>, a bug where class inheritance would cause us to lay out bitfields incorrectly. llvm-svn: 185018
OpenPOWER on IntegriCloud