[PATCH] D47122: [clang-tidy] SimplifyBoolenExpr doesn't add parens if unary negotiation is of ExprWithCleanups type

2018-05-23 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tools-extra/trunk/clang-tidy/readability/SimplifyBooleanExprCheck.cpp:198 E = E->ignoreParenBaseCasts(); + if (const auto *EC = dyn_cast(E)) +E = EC->getSubExpr(); zinovy.nis wrote: > zinovy.nis

[PATCH] D47122: [clang-tidy] SimplifyBoolenExpr doesn't add parens if unary negotiation is of ExprWithCleanups type

2018-05-22 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: clang-tools-extra/trunk/clang-tidy/readability/SimplifyBooleanExprCheck.cpp:198 E = E->ignoreParenBaseCasts(); + if (const auto *EC = dyn_cast(E)) +E = EC->getSubExpr(); zinovy.nis wrote: > malcolm.parsons

[PATCH] D47122: [clang-tidy] SimplifyBoolenExpr doesn't add parens if unary negotiation is of ExprWithCleanups type

2018-05-22 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: clang-tools-extra/trunk/clang-tidy/readability/SimplifyBooleanExprCheck.cpp:198 E = E->ignoreParenBaseCasts(); + if (const auto *EC = dyn_cast(E)) +E = EC->getSubExpr(); malcolm.parsons wrote: >

[PATCH] D47122: [clang-tidy] SimplifyBoolenExpr doesn't add parens if unary negotiation is of ExprWithCleanups type

2018-05-22 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tools-extra/trunk/clang-tidy/readability/SimplifyBooleanExprCheck.cpp:198 E = E->ignoreParenBaseCasts(); + if (const auto *EC = dyn_cast(E)) +E = EC->getSubExpr(); `E->IgnoreImplicit()` can be

[PATCH] D47122: [clang-tidy] SimplifyBoolenExpr doesn't add parens if unary negotiation is of ExprWithCleanups type

2018-05-22 Thread Zinovy Nis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL333003: [clang-tidy] SimplifyBoolenExpr doesnt add parens if unary negotiation is of… (authored by zinovy.nis, committed by ). Herald added subscribers: llvm-commits, klimek. Changed prior to commit:

[PATCH] D47122: [clang-tidy] SimplifyBoolenExpr doesn't add parens if unary negotiation is of ExprWithCleanups type

2018-05-21 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 147836. zinovy.nis edited the summary of this revision. zinovy.nis added a comment. - More accurate place to fix. https://reviews.llvm.org/D47122 Files: clang-tidy/readability/SimplifyBooleanExprCheck.cpp

[PATCH] D47122: [clang-tidy] SimplifyBoolenExpr doesn't add parens if unary negotiation is of ExprWithCleanups type

2018-05-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, with a small nit. Comment at: clang-tidy/readability/SimplifyBooleanExprCheck.cpp:78 E = E->IgnoreImpCasts(); + if (auto *EC = dyn_cast(E)) +E =

[PATCH] D47122: [clang-tidy] SimplifyBoolenExpr doesn't add parens if unary negotiation is of ExprWithCleanups type

2018-05-20 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis created this revision. zinovy.nis added reviewers: alexfh, aaron.ballman. zinovy.nis added a project: clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun. using A = std::string; bool foo(A ) { A S; if (GetValue(s) && S != (A)s) return false; return