unused expression warnings. <rdar://problem/
12359208>.
llvm-svn: 164569
R1 = getSourceRange();
return true;
}
+ case CXXFunctionalCastExprClass:
case CStyleCastExprClass: {
// Ignore an explicit cast to void unless the operand is a non-trivial
// volatile lvalue.
(void)y; // don't warn here, because it's a common pattern.
}
}
+
+// <rdar://problem/12359208>
+namespace AnonObject {
+ struct Foo {
+ Foo(const char* const message);
+ ~Foo();
+ };
+ void f() {
+ Foo("Hello World!"); // don't warn
+ int(1); // expected-warning {{expression result unused}}
+ }
+}