[PATCH] D45401: Fix 31480 - warn more aggressively when assignments get used as a boolean values

2018-04-06 Thread Will Song via Phabricator via cfe-commits
incertia created this revision. incertia added reviewers: rjmccall, rsmith. incertia added a project: clang. Herald added a subscriber: cfe-commits. To my understanding, the contents of a condition will always be implicitly casted to an rvalue before evaluation. Thus, moving the check to Perform

[PATCH] D45401: Fix 31480 - warn more aggressively when assignments get used as a boolean values

2018-04-06 Thread Will Song via Phabricator via cfe-commits
incertia updated this revision to Diff 141477. incertia added a comment. Pulled the check outside of the case statement. https://reviews.llvm.org/D45401 Files: lib/Sema/SemaExpr.cpp lib/Sema/SemaExprCXX.cpp Index: lib/Sema/SemaExprCXX.cpp ==