objc messages have side effects, return true from hasLocalSideEffect,
fixing:
VoidMethod.m:14:5: warning: expression result unused
[Greeter hello];
^~~~~~~~~~~~~~~
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42380 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/Expr.cpp b/AST/Expr.cpp
index ffd2d3e..0b1c799 100644
--- a/AST/Expr.cpp
+++ b/AST/Expr.cpp
@@ -259,6 +259,8 @@
// TODO: check attributes for pure/const. "void foo() { strlen("bar"); }"
// should warn.
return true;
+ case ObjCMessageExprClass:
+ return true;
case CastExprClass:
// If this is a cast to void, check the operand. Otherwise, the result of