diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-08-26 17:32:59 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-08-26 17:32:59 +0000 |
| commit | 9decfbabd34e7d272b77a86c77ec9b7d1a091b3d (patch) | |
| tree | 5fb6a0685aa08e1a9a687c31255f9e3bb14f1d69 /clang/Sema/SemaStmt.cpp | |
| parent | 2e928885b2aba9cb2ae2a3d24125bbf072231420 (diff) | |
| download | bcm5719-llvm-9decfbabd34e7d272b77a86c77ec9b7d1a091b3d.tar.gz bcm5719-llvm-9decfbabd34e7d272b77a86c77ec9b7d1a091b3d.zip | |
Fix a bug reported by Keith Bauer
llvm-svn: 41452
Diffstat (limited to 'clang/Sema/SemaStmt.cpp')
| -rw-r--r-- | clang/Sema/SemaStmt.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/Sema/SemaStmt.cpp b/clang/Sema/SemaStmt.cpp index 18957240974..da2d12bfaf1 100644 --- a/clang/Sema/SemaStmt.cpp +++ b/clang/Sema/SemaStmt.cpp @@ -27,7 +27,7 @@ Sema::StmtResult Sema::ParseExprStmt(ExprTy *expr) { // Exprs are statements, so there is no need to do a conversion here. However, // diagnose some potentially bad code. - if (!E->hasLocalSideEffect()) + if (!E->hasLocalSideEffect() && !E->getType()->isVoidType()) Diag(E->getExprLoc(), diag::warn_unused_expr, E->getSourceRange()); return E; |

