diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-24 15:01:20 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-24 15:01:20 +0200 |
commit | 5beac3c0b76c5c74798c197d926564bae60ea7f2 (patch) | |
tree | 5635370116d65314bf4605f241276a6cc8f9ee2e /compilerplugins/clang | |
parent | 2d855ab9d09d09c26aa68b854a79be2a13faa8d5 (diff) |
Add clarifying comment
Change-Id: Ie891404a4d21e1917e5e653737e35257df3dfcae
Diffstat (limited to 'compilerplugins/clang')
-rw-r--r-- | compilerplugins/clang/simplifybool.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compilerplugins/clang/simplifybool.cxx b/compilerplugins/clang/simplifybool.cxx index 5bdb4cf574ba..e30d408e9faf 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) { |