summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-11-24 18:31:14 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-11-25 10:05:46 +0100
commitf82dc45bdb9e930878447015291c5b90c9325b57 (patch)
tree19a9d1bf915f3d0b880ddd20951879c651fab400 /compilerplugins
parent5bd633097b669f3e2153c4240b081ff8ac033574 (diff)
Use the canonical TemplateDecl
...in case there are multiple, as is the case at least with recent (towards GCC 8) libstdc++, where std::pair is forward-declared also in include/c++/8.0.0/bits/stl_iterator.h, so that in dbaccess/source/ui/dlg/DbAdminImpl.cxx std::pair< Reference<XConnection>,sal_Bool> aRet; aRet.second = false; failed to reconstruct the sal_Bool template argument and issued a loplugin:implicitboolconversion warning. Change-Id: I0054f2596d3f8837b857f1dca2f25952828b12cc Reviewed-on: https://gerrit.libreoffice.org/45254 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/implicitboolconversion.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/compilerplugins/clang/implicitboolconversion.cxx b/compilerplugins/clang/implicitboolconversion.cxx
index c695148b790e..5c658fd9c715 100644
--- a/compilerplugins/clang/implicitboolconversion.cxx
+++ b/compilerplugins/clang/implicitboolconversion.cxx
@@ -159,6 +159,7 @@ bool isBoolExpr(Expr const * expr) {
if (td == nullptr) {
break;
}
+ td = cast<TemplateDecl>(td->getCanonicalDecl());
TemplateParameterList const * ps = td->getTemplateParameters();
SubstTemplateTypeParmType const * t2
= getAsSubstTemplateTypeParmType(