[Libreoffice-commits] core.git: compilerplugins/clang
Stephan Bergmann
sbergman at redhat.com
Tue Jan 5 00:51:57 PST 2016
compilerplugins/clang/implicitboolconversion.cxx | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
New commits:
commit f44bd6b0547c99b324e1a3f196c2296294e27b3c
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 5 09:51:29 2016 +0100
Adapt loplugin:implicitboolconversion to changes in Clang trunk towards 3.8
Change-Id: I7841eee5b66a118c52258c0226d73a1139a0df9a
diff --git a/compilerplugins/clang/implicitboolconversion.cxx b/compilerplugins/clang/implicitboolconversion.cxx
index 091c8f2..bd1874e 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;
+ }
}
}
}
More information about the Libreoffice-commits
mailing list