workaround clang-3.5 issue in unusedmethods loplugin
Change-Id: Ie67518536932e24e9cff7a8b75b42e90e9f67673
This commit is contained in:
parent
0aff4109b5
commit
07645b443a
@ -268,9 +268,11 @@ bool UnusedMethods::VisitVarDecl( const VarDecl* varDecl )
|
|||||||
const CXXRecordDecl* recordDecl = varDecl->getType()->getAsCXXRecordDecl();
|
const CXXRecordDecl* recordDecl = varDecl->getType()->getAsCXXRecordDecl();
|
||||||
if (!recordDecl)
|
if (!recordDecl)
|
||||||
return true;
|
return true;
|
||||||
|
// workaround clang-3.5 issue
|
||||||
|
#if __clang_major__ < 3 || __clang_major__ == 3 && __clang_minor__ < 6
|
||||||
if (!recordDecl->getTemplateInstantiationPattern())
|
if (!recordDecl->getTemplateInstantiationPattern())
|
||||||
return true;
|
return true;
|
||||||
|
#endif
|
||||||
for( CXXRecordDecl::ctor_iterator it = recordDecl->ctor_begin(); it != recordDecl->ctor_end(); ++it)
|
for( CXXRecordDecl::ctor_iterator it = recordDecl->ctor_begin(); it != recordDecl->ctor_end(); ++it)
|
||||||
TraverseCXXConstructorDecl(*it);
|
TraverseCXXConstructorDecl(*it);
|
||||||
for( CXXRecordDecl::method_iterator it = recordDecl->method_begin(); it != recordDecl->method_end(); ++it)
|
for( CXXRecordDecl::method_iterator it = recordDecl->method_begin(); it != recordDecl->method_end(); ++it)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user