[Libreoffice-commits] core.git: compilerplugins/clang
Stephan Bergmann
sbergman at redhat.com
Fri Apr 24 06:02:26 PDT 2015
compilerplugins/clang/simplifybool.cxx | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit 5beac3c0b76c5c74798c197d926564bae60ea7f2
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Apr 24 15:01:20 2015 +0200
Add clarifying comment
Change-Id: Ie891404a4d21e1917e5e653737e35257df3dfcae
diff --git a/compilerplugins/clang/simplifybool.cxx b/compilerplugins/clang/simplifybool.cxx
index 5bdb4cf..e30d408 100644
--- a/compilerplugins/clang/simplifybool.cxx
+++ b/compilerplugins/clang/simplifybool.cxx
@@ -32,6 +32,15 @@ enum class Value { Unknown, False, True };
Value getValue(Expr const * expr) {
if (expr->getType()->isBooleanType()) {
+ // Instead going via Expr::isCXX11ConstantExpr would turn up excatly one
+ // additional place in svx/source/dialog/framelinkarray.cxx
+ //
+ // const bool DIAG_DBL_CLIP_DEFAULT = false;
+ // ...
+ // ... = mxImpl.get() ? mxImpl->mbDiagDblClip : DIAG_DBL_CLIP_DEFAULT;
+ //
+ // where it is unclear whether it is not actually better to consider
+ // DIAG_DBL_CLIP_DEFAULT a tunable parameter (and thus not to simplify):
auto lit
= dyn_cast<CXXBoolLiteralExpr>(ignoreParenImpCastAndComma(expr));
if (lit != nullptr) {
More information about the Libreoffice-commits
mailing list