[PATCH] D63369: [AST] Fixed extraneous warnings for binary conditional operator

2019-06-19 Thread Nathan Huckleberry via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363857: [AST] Fixed extraneous warnings for binary conditional operator (authored by Nathan-Huckleberry, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prio

[PATCH] D63369: [AST] Fixed extraneous warnings for binary conditional operator

2019-06-18 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 205473. Nathan-Huckleberry added a comment. Mistakenly updated revision. Attempting to revert. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63369/new/ https://reviews.llvm.org/D63369 Files: clang

[PATCH] D63369: [AST] Fixed extraneous warnings for binary conditional operator

2019-06-18 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 205470. Nathan-Huckleberry added a comment. - [analyzer] Fix clang-tidy crash on GCCAsmStmt Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63369/new/ https://reviews.llvm.org/D63369 Files: clang-to

[PATCH] D63369: [AST] Fixed extraneous warnings for binary conditional operator

2019-06-17 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. Thanks for the patch and following up on the review comments. Let's work on getting you commit access now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63369/new/ https://r

[PATCH] D63369: [AST] Fixed extraneous warnings for binary conditional operator

2019-06-17 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 205129. Nathan-Huckleberry added a comment. - [AST] Formatting changes to ConditionalOperator unused detection Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63369/new/ https://reviews.llvm.org/D63369

[PATCH] D63369: [AST] Fixed extraneous warnings for binary conditional operator

2019-06-17 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/AST/Expr.cpp:2348 // RHS are warnings. const ConditionalOperator *Exp = cast(this); +return Exp->getLHS()->isUnusedResultAWarning(WarnE, Loc, R1, R2, Ctx) && `const auto *Exp` ==

[PATCH] D63369: [AST] Fixed extraneous warnings for binary conditional operator

2019-06-17 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 205117. Nathan-Huckleberry added a comment. - [AST] Cleanup of conditional operator unused warning detection Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63369/new/ https://reviews.llvm.org/D63369

[PATCH] D63369: [AST] Fixed extraneous warnings for binary conditional operator

2019-06-17 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/AST/Expr.cpp:2351-2352 return false; if (!Exp->getLHS()) return true; return Exp->getLHS()->isUnusedResultAWarning(WarnE, Loc, R1, R2, Ctx); rsmith wrote: > Looks like whoever wr

[PATCH] D63369: [AST] Fixed extraneous warnings for binary conditional operator

2019-06-14 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/AST/Expr.cpp:2351-2352 return false; if (!Exp->getLHS()) return true; return Exp->getLHS()->isUnusedResultAWarning(WarnE, Lo

[PATCH] D63369: [AST] Fixed extraneous warnings for binary conditional operator

2019-06-14 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/test/Sema/warn-binary-conditional-expression-unused.c:8 +a ? : ++b; +a ? a : ++b; +++a ? : b; //expected-warning{{expression result unused}} Note to other reviewers: Whether or not we should wa

[PATCH] D63369: [AST] Fixed extraneous warnings for binary conditional operator

2019-06-14 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Binary conditional operator gave warnings where ternary operators did not. They have been fixed to warn similarly to ternary operators. Link: https://bugs.llvm.org/show_bug.cgi?id=4223