summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-04-09 05:45:56 +0000
committerTed Kremenek <kremenek@apple.com>2009-04-09 05:45:56 +0000
commitf9f9420303eb55683fb21e2d70155d06615f7496 (patch)
treec1614e3ed13b925214308d7d6cba08589c3dfc49 /clang/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m
parent042befd6d6980d6a7a5248ace6dbea99212d4ca5 (diff)
downloadbcm5719-llvm-f9f9420303eb55683fb21e2d70155d06615f7496.tar.gz
bcm5719-llvm-f9f9420303eb55683fb21e2d70155d06615f7496.zip
GRExprEngine: Don't try to reason about the size of 'void' for the return type
of messages sent to nil. llvm-svn: 68683
Diffstat (limited to 'clang/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m')
-rw-r--r--clang/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m b/clang/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m
index 574b0385d1a..b83be2c2fa0 100644
--- a/clang/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m
+++ b/clang/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m
@@ -6,6 +6,7 @@
- (long long)longlongM;
- (double)doubleM;
- (long double)longDoubleM;
+- (void)voidM;
@end
@implementation MyClass
- (void *)voidPtrM { return (void *)0; }
@@ -13,6 +14,7 @@
- (long long)longlongM { return 0; }
- (double)doubleM { return 0.0; }
- (long double)longDoubleM { return 0.0; }
+- (void)voidM {}
@end
void createFoo() {
@@ -57,3 +59,8 @@ void handleNilPruneLoop(MyClass *obj) {
long long j = [obj longlongM]; // expected-warning{{The receiver in the message expression is 'nil' and results in the returned value}}
}
+
+int handleVoidInComma() {
+ MyClass *obj = 0;
+ return [obj voidM], 0;
+}
OpenPOWER on IntegriCloud