workaround clang-3.5 issue in unusedmethods loplugin

Change-Id: Ie67518536932e24e9cff7a8b75b42e90e9f67673
This commit is contained in:
Noel Grandin 2015-07-21 14:39:05 +02:00
parent 0aff4109b5
commit 07645b443a

View File

@ -268,9 +268,11 @@ bool UnusedMethods::VisitVarDecl( const VarDecl* varDecl )
const CXXRecordDecl* recordDecl = varDecl->getType()->getAsCXXRecordDecl();
if (!recordDecl)
return true;
// workaround clang-3.5 issue
#if __clang_major__ < 3 || __clang_major__ == 3 && __clang_minor__ < 6
if (!recordDecl->getTemplateInstantiationPattern())
return true;
#endif
for( CXXRecordDecl::ctor_iterator it = recordDecl->ctor_begin(); it != recordDecl->ctor_end(); ++it)
TraverseCXXConstructorDecl(*it);
for( CXXRecordDecl::method_iterator it = recordDecl->method_begin(); it != recordDecl->method_end(); ++it)