Files
libreoffice/compilerplugins/clang/test
Stephan Bergmann 6f26a72464 Tweak loplugin:implicitboolconversion to allow some more bool -> sal_Bool
...in templated code, to cater for the needs of
<https://gerrit.libreoffice.org/c/core/+/124400> "Prepare for removal of
non-const operator[] from Sequence in testtools".

For one, by defining ImplicitBoolConversion::TraverseInitListExpr, make sure
that Clang versions before and after
<0a42fe70a5>
"[AST] Treat semantic form of InitListExpr as implicit code in traversals"
behave the same.  Old versions of Clang would have erroneously reported

  Sequence<Sequence<sal_Bool>> s2{ { false } };

(and reported

  Sequence<Sequence<sal_Int32>> s4{ { false } };

twice) in compilerplugins/clang/test/implicitboolconversion.cxx when one of the
four combinations of syntactic/semantic visit of the outer/inner InitListExpr
defeated the intended suppression logic in
ImplicitBoolConversion::TraverseCXXStdInitializerListExpr.

And for another, ImplicitBoolConversion::TraverseInitListExpr can subsume the
exising ImplicitBoolConversion::TraverseCXXStdInitializerListExpr.

But for a third, that would still make

  Sequence<Wrap2<sal_Bool>> s6{ { false } };

in compilerplugins/clang/test/implicitboolconversion.cxx emit a false warning,
so add a cheesy "TODO" chicken-out special case to
ImplicitBoolConversion::checkCXXConstructExpr for now.

Change-Id: Ib9a1b78a7812feb98c673b75a357af7737168342
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124583
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-02 20:10:46 +01:00
..
2021-09-13 15:05:56 +02:00
2021-04-27 22:11:58 +02:00
2021-01-22 17:46:01 +01:00
2020-10-21 15:02:42 +02:00
2021-08-10 07:39:00 +02:00
2021-07-14 14:39:39 +02:00
2020-11-12 18:55:32 +01:00