diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2011-08-18 02:04:29 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2011-08-18 02:04:29 +0000 |
commit | 5440bfaff6aec058b60bc6da75bb4f13b7a76491 (patch) | |
tree | 21a233b0383ca792b4f2d364c0bd3e9b3b66a69d /lib/Sema/SemaStmt.cpp | |
parent | f01f8474e2ae14bba4855f20dcc59f3a8e23d730 (diff) |
Remove the last FIXMEs on -Wunused-comparison since it got moved to
entirely use the existing -Wunused-value infrastructure. This also fixes
a few missed cases for -Wunused in general.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137916 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r-- | lib/Sema/SemaStmt.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index 9c87a3f323..e17188757b 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/lib/Sema/SemaStmt.cpp @@ -291,6 +291,8 @@ Sema::ActOnCaseStmt(SourceLocation CaseLoc, Expr *LHSVal, /// ActOnCaseStmtBody - This installs a statement as the body of a case. void Sema::ActOnCaseStmtBody(Stmt *caseStmt, Stmt *SubStmt) { + DiagnoseUnusedExprResult(SubStmt); + CaseStmt *CS = static_cast<CaseStmt*>(caseStmt); CS->setSubStmt(SubStmt); } @@ -298,6 +300,8 @@ void Sema::ActOnCaseStmtBody(Stmt *caseStmt, Stmt *SubStmt) { StmtResult Sema::ActOnDefaultStmt(SourceLocation DefaultLoc, SourceLocation ColonLoc, Stmt *SubStmt, Scope *CurScope) { + DiagnoseUnusedExprResult(SubStmt); + if (getCurFunction()->SwitchStack.empty()) { Diag(DefaultLoc, diag::err_default_not_in_switch); return Owned(SubStmt); |