summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-03-27 15:50:48 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-03-27 15:50:48 +0200
commit4e808469d5a05bb70af76628702661d413b1b71e (patch)
tree70e3d9b19391e961f0d1d35cb45d4e66c7b0b534 /compilerplugins
parent32351d1bd34a0a0d3bb8fa41667a770c125de460 (diff)
Make loplugin:loopvartoosmall look past top-level ExprWithCleanups
Note the two "//TODO!" in the fix of the one newly found issue. Change-Id: I181691da4b74cd55611452e002b37bd6798ff1e6
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/loopvartoosmall.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/compilerplugins/clang/loopvartoosmall.cxx b/compilerplugins/clang/loopvartoosmall.cxx
index eb4cb96d592d..f9c25eb4d8a9 100644
--- a/compilerplugins/clang/loopvartoosmall.cxx
+++ b/compilerplugins/clang/loopvartoosmall.cxx
@@ -80,7 +80,7 @@ unsigned LoopVarTooSmall::getIntValueWidth(QualType type) const {
}
void LoopVarTooSmall::checkSubExpr(Expr const * expr, bool positive) {
- auto const e = expr->IgnoreParenImpCasts();
+ auto const e = expr->IgnoreImplicit()->IgnoreParenImpCasts();
if (auto const uo = dyn_cast<UnaryOperator>(e)) {
if (uo->getOpcode() == UO_LNot) {
checkSubExpr(uo->getSubExpr(), !positive);