diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-05-05 14:16:08 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-05-05 14:16:08 +0200 |
commit | d879d5346b525c478e93363b7ec06e797ce01461 (patch) | |
tree | 22273c3876e7e39881925b03617d8b586ee207b9 /compilerplugins | |
parent | 2186e3f8d667b5af9042dcb2c3f21509ec800d2a (diff) |
Downgrade for old Clang
Change-Id: Ia4c241040c52631df86c5bb7a95bca6af234251f
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/vclwidgets.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
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<RecordType>(); if (pFieldRecordType) { const CXXRecordDecl *pFieldRecordTypeDecl = dyn_cast<CXXRecordDecl>(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; |