llvm-project/clang/lib/Sema
David Majnemer 34b5749989 MS ABI: Consider alignment attributes on typedefs for layout
The MS ABI has a notion of 'required alignment' for fields; this
alignment supercedes pragma pack directives.

MSVC takes into account alignment attributes on typedefs when
determining whether or not a field has a certain required alignment.

Do the same in clang by tracking whether or not we saw such an attribute
when calculating the type's bitwidth and alignment.

This fixes PR20418.

Reviewers: rnk

Differential Revision: http://reviews.llvm.org/D4714

llvm-svn: 214274
2014-07-30 01:30:47 +00:00
..
AnalysisBasedWarnings.cpp Thread Safety Analysis: Replace the old and broken SExpr with the new 2014-07-28 15:57:27 +00:00
AttributeList.cpp Remove uses of SmallString::equals in favor of SmallVectorImpl<char>'s operator== 2014-03-09 05:18:27 +00:00
CMakeLists.txt [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
CodeCompleteConsumer.cpp [C++11] Use 'nullptr'. Sema edition. 2014-05-26 06:22:03 +00:00
DeclSpec.cpp [C++11] Use 'nullptr'. 2014-06-09 02:04:02 +00:00
DelayedDiagnostic.cpp Objective-C. Diagnose when property access is using declared 2014-06-16 17:25:41 +00:00
IdentifierResolver.cpp [C++11] Use 'nullptr'. Sema edition. 2014-05-26 06:22:03 +00:00
JumpDiagnostics.cpp PR20356: Fix all Sema warnings with mismatched ext_/warn_ versus 2014-07-19 01:39:17 +00:00
Makefile
MultiplexExternalSemaSource.cpp [C++11] Use 'nullptr'. Sema edition. 2014-05-26 06:22:03 +00:00
Scope.cpp Revert r213437 2014-07-25 20:52:51 +00:00
ScopeInfo.cpp Objective-C ARC. Do not warn about properties with both 2014-06-17 23:35:13 +00:00
Sema.cpp Wrap to 80 columns. No behavior change. 2014-07-26 23:20:08 +00:00
SemaAccess.cpp Consolidate some note diagnostics 2014-05-28 12:20:14 +00:00
SemaAttr.cpp -fms-extensions: Implement half of #pragma init_seg 2014-07-22 00:53:05 +00:00
SemaCXXScopeSpec.cpp Consolidate some note diagnostics 2014-05-28 12:20:14 +00:00
SemaCast.cpp PR20227: materialize a temporary when dynamic_casting a class prvalue to a 2014-07-08 17:25:14 +00:00
SemaChecking.cpp AArch64: update Clang for merged arm64/aarch64 triples. 2014-07-23 12:32:58 +00:00
SemaCodeComplete.cpp Switch over a few uses of param_begin() to parameters() 2014-07-07 09:02:20 +00:00
SemaConsumer.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:48:34 +00:00
SemaDecl.cpp Add stopgap option -fmodule-implementation-of <name> 2014-07-23 15:30:23 +00:00
SemaDeclAttr.cpp Improving the "integer constant too large" diagnostics based on post-commit feedback from Richard Smith. Amends r213657. 2014-07-24 14:51:23 +00:00
SemaDeclCXX.cpp Avoid crash if default argument parsed with errors. 2014-07-22 01:54:49 +00:00
SemaDeclObjC.cpp MS ABI: Consider alignment attributes on typedefs for layout 2014-07-30 01:30:47 +00:00
SemaExceptionSpec.cpp PR20356: Fix all Sema warnings with mismatched ext_/warn_ versus 2014-07-19 01:39:17 +00:00
SemaExpr.cpp Not all instantiated variable is odr-used. Do not mark non-odr-used variable template specializations as such. 2014-07-30 00:49:55 +00:00
SemaExprCXX.cpp PR20445: Properly transform the initializer in a CXXNewExpr rather than running 2014-07-25 01:12:44 +00:00
SemaExprMember.cpp Hide the concept of diagnostic levels from lex, parse and sema 2014-06-15 23:30:39 +00:00
SemaExprObjC.cpp Objective-C. Warn if protocol used in an @protocol 2014-07-25 19:45:01 +00:00
SemaFixItUtils.cpp PR17290: Use 'false' macro in fix-it hint for initializing a variable of type 2013-09-20 00:27:40 +00:00
SemaInit.cpp Improve diagnostic on default-initializing const variables (PR20208). 2014-07-23 05:16:10 +00:00
SemaLambda.cpp Refactoring. Remove release and take methods from ActionResult. Rename takeAs to getAs. 2014-05-29 10:55:11 +00:00
SemaLookup.cpp Add another keyword-selection flag to CorrectionCandidateCallback. 2014-07-28 18:14:02 +00:00
SemaObjCProperty.cpp Objective-C. Issue more warning diagnostic when certain 2014-07-26 20:52:26 +00:00
SemaOpenMP.cpp [OPENMP] Improved DSA processing of the loop control variables for loop directives. 2014-07-25 06:27:47 +00:00
SemaOverload.cpp Use the correct from type in a SCS 2014-07-22 20:20:14 +00:00
SemaPseudoObject.cpp Switch over a few uses of param_begin() to parameters() 2014-07-07 09:02:20 +00:00
SemaStmt.cpp Revert r213437 2014-07-25 20:52:51 +00:00
SemaStmtAsm.cpp CodeGen: Let arrays be inputs to inline asm 2014-07-14 16:27:53 +00:00
SemaStmtAttr.cpp Modify how the loop hint attribute is printed as a lead-up to supporting constant expression values. 2014-07-29 17:21:32 +00:00
SemaTemplate.cpp Take the canonical type when forming a canonical template argument with 2014-07-24 02:27:39 +00:00
SemaTemplateDeduction.cpp Wrap to 80 columns. No behavior change. 2014-07-28 00:02:09 +00:00
SemaTemplateInstantiate.cpp Wrap to 80 columns. No behavior change. 2014-07-28 00:02:09 +00:00
SemaTemplateInstantiateDecl.cpp PR20256: don't accidentally instantiate non-dependent default-initialization as 2014-07-10 20:53:43 +00:00
SemaTemplateVariadic.cpp Refactoring. Remove Owned method from Sema. 2014-05-29 14:05:12 +00:00
SemaType.cpp AArch64: update Clang for merged arm64/aarch64 triples. 2014-07-23 12:32:58 +00:00
TreeTransform.h Wrap to 80 columns. No behavior change. 2014-07-28 00:02:09 +00:00
TypeLocBuilder.cpp [C++11] Use 'nullptr'. Sema edition. 2014-05-26 06:22:03 +00:00
TypeLocBuilder.h [C++11] Use 'nullptr'. Sema edition. 2014-05-26 06:22:03 +00:00