unused expression warnings. <rdar://problem/
12359208>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164569
91177308-0d34-0410-b5e6-
96231b3b80d8
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}}
+ }
+}