forked from OSchip/llvm-project
Warn on use of property dot syntax when unused.
llvm-svn: 78760
This commit is contained in:
parent
117c9e8497
commit
853d21a18a
|
@ -540,7 +540,6 @@ bool Expr::isUnusedResultAWarning(SourceLocation &Loc, SourceRange &R1,
|
|||
return false;
|
||||
}
|
||||
case ObjCMessageExprClass:
|
||||
case ObjCKVCRefExprClass: // Dot syntax for message send.
|
||||
return false;
|
||||
case StmtExprClass: {
|
||||
// Statement exprs don't logically have side effects themselves, but are
|
||||
|
|
|
@ -25,8 +25,7 @@ int test1(void) {
|
|||
@end
|
||||
|
||||
void test2() {
|
||||
// No unused warning: rdar://7126285
|
||||
@"pointless example call for test purposes".length;
|
||||
@"pointless example call for test purposes".length; // expected-warning {{expression result unused}}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue