]> granicus.if.org Git - clang/commitdiff
Give invalid tag types 8-bit size and alignment, rather than 1-bit
authorDouglas Gregor <dgregor@apple.com>
Wed, 20 Apr 2011 17:29:44 +0000 (17:29 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 20 Apr 2011 17:29:44 +0000 (17:29 +0000)
alignment, which causes traps further down the line. Fixes
<rdar://problem/9109755>, which contains a test case far too large to
commit :(

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129861 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ASTContext.cpp

index 524a7563e64fb09ac3c358bcbd8da045dcfc38dd..3d74d3a9380af93f6278333e36e49472d2548443 100644 (file)
@@ -878,8 +878,8 @@ ASTContext::getTypeInfo(const Type *T) const {
     const TagType *TT = cast<TagType>(T);
 
     if (TT->getDecl()->isInvalidDecl()) {
-      Width = 1;
-      Align = 1;
+      Width = 8;
+      Align = 8;
       break;
     }