From: Chris Lattner Date: Tue, 31 Mar 2009 08:58:42 +0000 (+0000) Subject: disable copying of Type objects. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=16ff705a594697f98b9473f9b7e7d378f331fe4b;p=clang disable copying of Type objects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68103 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h index 62cd2787ac..4d92f45391 100644 --- a/include/clang/AST/Type.h +++ b/include/clang/AST/Type.h @@ -287,6 +287,8 @@ private: /// subclasses can pack their bitfields into the same word. unsigned TC : 5; + Type(const Type&); // DO NOT IMPLEMENT. + void operator=(const Type&); // DO NOT IMPLEMENT. protected: // silence VC++ warning C4355: 'this' : used in base member initializer list Type *this_() { return this; } diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 25a9579258..1ab76e21be 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -631,7 +631,7 @@ const RecordDecl *ASTContext::addRecordToClass(const ObjCInterfaceDecl *D) { D->getIdentifier()); /// FIXME! Can do collection of ivars and adding to the record while /// doing it. - for (unsigned int i = 0; i != RecFields.size(); i++) { + for (unsigned i = 0, e = RecFields.size(); i != e; ++i) { NewRD->addDecl(FieldDecl::Create(*this, NewRD, RecFields[i]->getLocation(), RecFields[i]->getIdentifier(),