From 897e09b883134d611b6d2993f2ab4c25db5f214d Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Fri, 10 Apr 2015 20:28:34 -0400 Subject: [PATCH] Bug 1153304 follow-up: Fix the build bustage --- build/clang-plugin/clang-plugin.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/build/clang-plugin/clang-plugin.cpp b/build/clang-plugin/clang-plugin.cpp index 201b9ba7bbc..0999789d44e 100644 --- a/build/clang-plugin/clang-plugin.cpp +++ b/build/clang-plugin/clang-plugin.cpp @@ -373,7 +373,8 @@ bool classHasAddRefRelease(const CXXRecordDecl *D) { bool seenAddRef = false; bool seenRelease = false; - for (const auto& method : D->methods()) { + for (CXXRecordDecl::method_iterator method = D->method_begin(); + method != D->method_end(); ++method) { std::string name = method->getNameAsString(); if (name == "AddRef") { seenAddRef = true; @@ -397,8 +398,9 @@ bool isClassRefCounted(const CXXRecordDecl *D) { return true; // Look through all base cases to figure out if the parent is a refcounted class. - for (const auto& base : D->bases()) { - bool super = isClassRefCounted(base.getType()); + for (CXXRecordDecl::base_class_const_iterator base = D->bases_begin(); + base != D->bases_end(); ++base) { + bool super = isClassRefCounted(base->getType()); if (super) { return true; }