]> granicus.if.org Git - clang/commitdiff
disable copying of Type objects.
authorChris Lattner <sabre@nondot.org>
Tue, 31 Mar 2009 08:58:42 +0000 (08:58 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 31 Mar 2009 08:58:42 +0000 (08:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68103 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Type.h
lib/AST/ASTContext.cpp

index 62cd2787ac04548afb2d056ec62bc36b9fe7ec1e..4d92f45391e07c26205101b0d134392878a439b2 100644 (file)
@@ -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; }
index 25a957925838a4c201c7a4c07ef2defbddb0c8fe..1ab76e21be0996449ed4d78e10922a75b7d0ceb0 100644 (file)
@@ -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(),