diff options
author | dim <dim@FreeBSD.org> | 2014-11-24 18:11:16 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2014-11-24 18:11:16 +0000 |
commit | 6148c19c738a92f344008aa3f88f4e008bada0ee (patch) | |
tree | d4426858455f04d0d8c25a2f9eb9ea5582ffe1b6 /contrib/llvm/tools/clang/lib/ARCMigrate/TransGCAttrs.cpp | |
parent | 2c8643c6396b0a3db33430cf9380e70bbb9efce0 (diff) | |
parent | 173a4f43a911175643bda81ee675e8d9269056ea (diff) | |
download | FreeBSD-src-6148c19c738a92f344008aa3f88f4e008bada0ee.zip FreeBSD-src-6148c19c738a92f344008aa3f88f4e008bada0ee.tar.gz |
Merge clang 3.5.0 release from ^/vendor/clang/dist, resolve conflicts,
and preserve our customizations, where necessary.
Diffstat (limited to 'contrib/llvm/tools/clang/lib/ARCMigrate/TransGCAttrs.cpp')
-rw-r--r-- | contrib/llvm/tools/clang/lib/ARCMigrate/TransGCAttrs.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/contrib/llvm/tools/clang/lib/ARCMigrate/TransGCAttrs.cpp b/contrib/llvm/tools/clang/lib/ARCMigrate/TransGCAttrs.cpp index d8be1ae..10fce19 100644 --- a/contrib/llvm/tools/clang/lib/ARCMigrate/TransGCAttrs.cpp +++ b/contrib/llvm/tools/clang/lib/ARCMigrate/TransGCAttrs.cpp @@ -80,7 +80,7 @@ public: } } - bool handleAttr(AttributedTypeLoc TL, Decl *D = 0) { + bool handleAttr(AttributedTypeLoc TL, Decl *D = nullptr) { if (TL.getAttrKind() != AttributedType::attr_objc_ownership) return false; @@ -134,8 +134,7 @@ public: return hasObjCImpl(ContD); if (CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(D)) { - for (CXXRecordDecl::method_iterator - MI = RD->method_begin(), ME = RD->method_end(); MI != ME; ++MI) { + for (const auto *MI : RD->methods()) { if (MI->isOutOfLine()) return true; } @@ -150,9 +149,9 @@ public: return false; if (ObjCContainerDecl *ContD = dyn_cast<ObjCContainerDecl>(D)) { if (ObjCInterfaceDecl *ID = dyn_cast<ObjCInterfaceDecl>(ContD)) - return ID->getImplementation() != 0; + return ID->getImplementation() != nullptr; if (ObjCCategoryDecl *CD = dyn_cast<ObjCCategoryDecl>(ContD)) - return CD->getImplementation() != 0; + return CD->getImplementation() != nullptr; if (isa<ObjCImplDecl>(ContD)) return true; return false; @@ -164,8 +163,7 @@ public: if (!D) return false; - for (Decl::redecl_iterator - I = D->redecls_begin(), E = D->redecls_end(); I != E; ++I) + for (auto I : D->redecls()) if (!isInMainFile(I->getLocation())) return false; |