Kaydet (Commit) d879d534 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Downgrade for old Clang

Change-Id: Ia4c241040c52631df86c5bb7a95bca6af234251f
üst 2186e3f8
...@@ -150,7 +150,9 @@ bool VCLWidgets::VisitCXXDestructorDecl(const CXXDestructorDecl* pCXXDestructorD ...@@ -150,7 +150,9 @@ bool VCLWidgets::VisitCXXDestructorDecl(const CXXDestructorDecl* pCXXDestructorD
return true; return true;
} }
bool foundVclPtrField = false; 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>(); const RecordType *pFieldRecordType = fieldDecl->getType()->getAs<RecordType>();
if (pFieldRecordType) { if (pFieldRecordType) {
const CXXRecordDecl *pFieldRecordTypeDecl = dyn_cast<CXXRecordDecl>(pFieldRecordType->getDecl()); const CXXRecordDecl *pFieldRecordTypeDecl = dyn_cast<CXXRecordDecl>(pFieldRecordType->getDecl());
...@@ -161,7 +163,9 @@ bool VCLWidgets::VisitCXXDestructorDecl(const CXXDestructorDecl* pCXXDestructorD ...@@ -161,7 +163,9 @@ bool VCLWidgets::VisitCXXDestructorDecl(const CXXDestructorDecl* pCXXDestructorD
} }
} }
bool foundDispose = false; 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") { if (methodDecl->isInstance() && methodDecl->param_size()==0 && methodDecl->getNameAsString() == "dispose") {
foundDispose = true; foundDispose = true;
break; break;
...@@ -303,7 +307,9 @@ bool VCLWidgets::VisitFieldDecl(const FieldDecl * fieldDecl) { ...@@ -303,7 +307,9 @@ bool VCLWidgets::VisitFieldDecl(const FieldDecl * fieldDecl) {
&& startsWith(recordDecl->getQualifiedNameAsString(), "VclPtr")) && startsWith(recordDecl->getQualifiedNameAsString(), "VclPtr"))
{ {
bool foundDispose = false; 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") { if (methodDecl->isInstance() && methodDecl->param_size()==0 && methodDecl->getNameAsString() == "dispose") {
foundDispose = true; foundDispose = true;
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment