Fix a bug reported by Keith Bauer

llvm-svn: 41452
diff --git a/clang/Sema/SemaStmt.cpp b/clang/Sema/SemaStmt.cpp
index 1895724..da2d12b 100644
--- a/clang/Sema/SemaStmt.cpp
+++ b/clang/Sema/SemaStmt.cpp
@@ -27,7 +27,7 @@
   
   // 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;