summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-07-21 14:39:05 +0200
committerNoel Grandin <noel@peralex.com>2015-07-21 14:39:35 +0200
commit07645b443a276da2ee8853c84fbf61a59d59b4bd (patch)
tree08e45d223d6a06771e1085007e9d9df3d2df6500 /compilerplugins
parent0aff4109b5fd2f6c3893b14cc61c8962e2b47ea9 (diff)
workaround clang-3.5 issue in unusedmethods loplugin
Change-Id: Ie67518536932e24e9cff7a8b75b42e90e9f67673
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/unusedmethods.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/compilerplugins/clang/unusedmethods.cxx b/compilerplugins/clang/unusedmethods.cxx
index 848f0bfd302c..ad5582e3f36b 100644
--- a/compilerplugins/clang/unusedmethods.cxx
+++ b/compilerplugins/clang/unusedmethods.cxx
@@ -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)