llvm-project/clang/test/CXX/stmt.stmt
Aaron Ballman fb6deeb984 Refactor the way we handle diagnosing unused expression results.
Rather than sprinkle calls to DiagnoseUnusedExprResult() around in places where we want diagnostics, we now diagnose unused expression statements and full expressions in a more generic way when acting on the final expression statement. This results in more appropriate diagnostics for [[nodiscard]] where we were previously lacking them, such as when the body of a for loop is not a compound statement.

This patch fixes PR39837.

llvm-svn: 350404
2019-01-04 16:58:14 +00:00
..
stmt.ambig
stmt.dcl
stmt.iter/stmt.ranged P0962R1: only use the member form of 'begin' and 'end' in a range-based 2018-09-24 23:17:44 +00:00
stmt.label
stmt.select Refactor the way we handle diagnosing unused expression results. 2019-01-04 16:58:14 +00:00