diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-03-31 08:58:42 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-03-31 08:58:42 +0000 |
| commit | 6d35cc945f6a73563069f772536015e8696b335c (patch) | |
| tree | 817833dc54e48a5a3685d1cbc06e2d06acbe2eff | |
| parent | 3e2f36e905c8e9f0d81700f09af1b61131043bd4 (diff) | |
| download | bcm5719-llvm-6d35cc945f6a73563069f772536015e8696b335c.tar.gz bcm5719-llvm-6d35cc945f6a73563069f772536015e8696b335c.zip | |
disable copying of Type objects.
llvm-svn: 68103
| -rw-r--r-- | clang/include/clang/AST/Type.h | 2 | ||||
| -rw-r--r-- | clang/lib/AST/ASTContext.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/clang/include/clang/AST/Type.h b/clang/include/clang/AST/Type.h index 62cd2787ac0..4d92f45391e 100644 --- a/clang/include/clang/AST/Type.h +++ b/clang/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/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 25a95792583..1ab76e21be0 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/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(), |

