diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-01-05 09:51:29 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-01-05 09:51:29 +0100 |
commit | f44bd6b0547c99b324e1a3f196c2296294e27b3c (patch) | |
tree | 46f62a16a592a4c75a06316ba4a099402211bb7a | |
parent | 92e60e1b80a391864314c2270d2d9fcd9da3d9ee (diff) |
Adapt loplugin:implicitboolconversion to changes in Clang trunk towards 3.8
Change-Id: I7841eee5b66a118c52258c0226d73a1139a0df9a
-rw-r--r-- | compilerplugins/clang/implicitboolconversion.cxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/compilerplugins/clang/implicitboolconversion.cxx b/compilerplugins/clang/implicitboolconversion.cxx index 091c8f280b09..bd1874ec3345 100644 --- a/compilerplugins/clang/implicitboolconversion.cxx +++ b/compilerplugins/clang/implicitboolconversion.cxx @@ -368,14 +368,15 @@ bool ImplicitBoolConversion::TraverseCallExpr(CallExpr * expr) { .getNonReferenceType()); if (t2 != nullptr) { //TODO: fix this superficial nonsense check: - ASTTemplateArgumentListInfo const & ai - = dr->getExplicitTemplateArgs(); - if (ai.NumTemplateArgs == 1 - && (ai[0].getArgument().getKind() - == TemplateArgument::Type) - && isBool(ai[0].getTypeSourceInfo()->getType())) - { - continue; + if (dr->getNumTemplateArgs() == 1) { + auto const ta = dr->getTemplateArgs(); + if ((ta[0].getArgument().getKind() + == TemplateArgument::Type) + && isBool( + ta[0].getTypeSourceInfo()->getType())) + { + continue; + } } } } |