Add a big test case for I-C-Es in C++, and a fix to make it work. The fix might not be the right way to do it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72490 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index c168e98..0db5f9b 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -360,6 +360,7 @@
case BuiltinType::NullPtr:
Width = Target.getPointerWidth(0); // C++ 3.9.1p11: sizeof(nullptr_t)
Align = Target.getPointerAlign(0); // == sizeof(void*)
+ break;
}
break;
case Type::FixedWidthInt:
@@ -768,7 +769,7 @@
// Finally, round the size of the total struct up to the alignment of the
// struct itself.
- NewEntry->FinalizeLayout();
+ NewEntry->FinalizeLayout(getLangOptions().CPlusPlus);
return *NewEntry;
}