Bug 1153304 follow-up: Fix the build bustage

This commit is contained in:
Ehsan Akhgari 2015-04-10 20:28:34 -04:00
parent ee87bda2a2
commit 897e09b883

View File

@ -373,7 +373,8 @@ bool classHasAddRefRelease(const CXXRecordDecl *D) {
bool seenAddRef = false; bool seenAddRef = false;
bool seenRelease = 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(); std::string name = method->getNameAsString();
if (name == "AddRef") { if (name == "AddRef") {
seenAddRef = true; seenAddRef = true;
@ -397,8 +398,9 @@ bool isClassRefCounted(const CXXRecordDecl *D) {
return true; return true;
// Look through all base cases to figure out if the parent is a refcounted class. // Look through all base cases to figure out if the parent is a refcounted class.
for (const auto& base : D->bases()) { for (CXXRecordDecl::base_class_const_iterator base = D->bases_begin();
bool super = isClassRefCounted(base.getType()); base != D->bases_end(); ++base) {
bool super = isClassRefCounted(base->getType());
if (super) { if (super) {
return true; return true;
} }