summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-02-05 01:33:36 +0000
committerJohn McCall <rjmccall@apple.com>2010-02-05 01:33:36 +0000
commitae580fede3b45b3777607e6961a8704b67eabe85 (patch)
treead2c36885b9417a71f780a9e444865b581948103 /clang/lib/AST/ASTContext.cpp
parent3b245876c0dae31939065497ac7b245fb725bb73 (diff)
downloadbcm5719-llvm-ae580fede3b45b3777607e6961a8704b67eabe85.tar.gz
bcm5719-llvm-ae580fede3b45b3777607e6961a8704b67eabe85.zip
Always start tag definitions before completing them. Assert same.
Fixes latent and not-so-latent objc++ and blocks++ bugs. llvm-svn: 95340
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index b61ce8e529f..4c935139568 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -2902,6 +2902,7 @@ QualType ASTContext::getCFConstantStringType() {
CFConstantStringTypeDecl =
CreateRecordDecl(*this, TagDecl::TK_struct, TUDecl, SourceLocation(),
&Idents.get("NSConstantString"));
+ CFConstantStringTypeDecl->startDefinition();
QualType FieldTypes[4];
@@ -2941,6 +2942,7 @@ QualType ASTContext::getObjCFastEnumerationStateType() {
ObjCFastEnumerationStateTypeDecl =
CreateRecordDecl(*this, TagDecl::TK_struct, TUDecl, SourceLocation(),
&Idents.get("__objcFastEnumerationState"));
+ ObjCFastEnumerationStateTypeDecl->startDefinition();
QualType FieldTypes[] = {
UnsignedLongTy,
@@ -2974,6 +2976,7 @@ QualType ASTContext::getBlockDescriptorType() {
// FIXME: Needs the FlagAppleBlock bit.
T = CreateRecordDecl(*this, TagDecl::TK_struct, TUDecl, SourceLocation(),
&Idents.get("__block_descriptor"));
+ T->startDefinition();
QualType FieldTypes[] = {
UnsignedLongTy,
@@ -3017,6 +3020,7 @@ QualType ASTContext::getBlockDescriptorExtendedType() {
// FIXME: Needs the FlagAppleBlock bit.
T = CreateRecordDecl(*this, TagDecl::TK_struct, TUDecl, SourceLocation(),
&Idents.get("__block_descriptor_withcopydispose"));
+ T->startDefinition();
QualType FieldTypes[] = {
UnsignedLongTy,
@@ -3137,6 +3141,7 @@ QualType ASTContext::getBlockParmType(
RecordDecl *T;
T = CreateRecordDecl(*this, TagDecl::TK_struct, TUDecl, SourceLocation(),
&Idents.get(Name.str()));
+ T->startDefinition();
QualType FieldTypes[] = {
getPointerType(VoidPtrTy),
IntTy,
OpenPOWER on IntegriCloud