This is exactly same patch as http://reviews.llvm.org/D19654 (already reviewed and LGTMed by majnemer), with a couple of changes to fix PR27666:
- __unaligned is not considered when checking type compatibility in CompareReferenceRelationship and TryReferenceInit, as MS compiler does the same (and qos2.h header relies on this)
- Test from PR27666 added to SemaCXX/MicrosoftExtensions.cpp
I verified the patch on a huge selection of Windows headers (including qos2.h), so hopefully there will be no more reverts! :-)
Yours,
Andrey
Software Engineer
Intel Compiler Team