]> granicus.if.org Git - clang/commit
Properly compute the alignment of typedefs that make use of the
authorDouglas Gregor <dgregor@apple.com>
Thu, 30 Apr 2009 17:32:17 +0000 (17:32 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 30 Apr 2009 17:32:17 +0000 (17:32 +0000)
commit18857644059c45da6776f1a288eec7b4cf3a844a
tree92c2a1d55ece4e06a43deb571d1d9a99d392c672
parent5b2bad017b5f86c83aeb80d186696a4c8d59f68f
Properly compute the alignment of typedefs that make use of the
"aligned" attribute. Previously, we were skipping over these
attributes when we jumped directly to the canonical type. Now,
ASTContext::getTypeInfo walks through typedefs and other
"non-canonical" types manually, looking for "aligned" attributes on
typedefs.

As part of this change, I moved the GNU-specific logic (such as
determining the alignment of void or of a function pointer) out of the
expression evaluator and into ASTContext::getTypeInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70497 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/ASTContext.cpp
lib/AST/ExprConstant.cpp
test/Sema/attr-aligned.c