From d879d5346b525c478e93363b7ec06e797ce01461 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 5 May 2015 14:16:08 +0200 Subject: Downgrade for old Clang Change-Id: Ia4c241040c52631df86c5bb7a95bca6af234251f --- compilerplugins/clang/vclwidgets.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'compilerplugins') diff --git a/compilerplugins/clang/vclwidgets.cxx b/compilerplugins/clang/vclwidgets.cxx index d239c67c67e3..e7066c2f890a 100644 --- a/compilerplugins/clang/vclwidgets.cxx +++ b/compilerplugins/clang/vclwidgets.cxx @@ -150,7 +150,9 @@ bool VCLWidgets::VisitCXXDestructorDecl(const CXXDestructorDecl* pCXXDestructorD return true; } bool foundVclPtrField = false; - for(auto fieldDecl : pRecordDecl->fields()) { + for(auto fieldDecl = pRecordDecl->field_begin(); + fieldDecl != pRecordDecl->field_end(); ++fieldDecl) + { const RecordType *pFieldRecordType = fieldDecl->getType()->getAs(); if (pFieldRecordType) { const CXXRecordDecl *pFieldRecordTypeDecl = dyn_cast(pFieldRecordType->getDecl()); @@ -161,7 +163,9 @@ bool VCLWidgets::VisitCXXDestructorDecl(const CXXDestructorDecl* pCXXDestructorD } } bool foundDispose = false; - for(auto methodDecl : pRecordDecl->methods()) { + for(auto methodDecl = pRecordDecl->method_begin(); + methodDecl != pRecordDecl->method_end(); ++methodDecl) + { if (methodDecl->isInstance() && methodDecl->param_size()==0 && methodDecl->getNameAsString() == "dispose") { foundDispose = true; break; @@ -303,7 +307,9 @@ bool VCLWidgets::VisitFieldDecl(const FieldDecl * fieldDecl) { && startsWith(recordDecl->getQualifiedNameAsString(), "VclPtr")) { bool foundDispose = false; - for(auto methodDecl : pParentRecordDecl->methods()) { + for(auto methodDecl = pParentRecordDecl->method_begin(); + methodDecl != pParentRecordDecl->method_end(); ++methodDecl) + { if (methodDecl->isInstance() && methodDecl->param_size()==0 && methodDecl->getNameAsString() == "dispose") { foundDispose = true; break; -- cgit