summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/diagnostics/no-store-func-path-notes.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis/diagnostics/no-store-func-path-notes.m')
-rw-r--r--clang/test/Analysis/diagnostics/no-store-func-path-notes.m35
1 files changed, 2 insertions, 33 deletions
diff --git a/clang/test/Analysis/diagnostics/no-store-func-path-notes.m b/clang/test/Analysis/diagnostics/no-store-func-path-notes.m
index 51d1515e860..3ae97ef5649 100644
--- a/clang/test/Analysis/diagnostics/no-store-func-path-notes.m
+++ b/clang/test/Analysis/diagnostics/no-store-func-path-notes.m
@@ -1,10 +1,6 @@
-// RUN: %clang_analyze_cc1 -x objective-c -analyzer-checker=core,nullability -analyzer-output=text -Wno-objc-root-class -fblocks -verify %s
+// RUN: %clang_analyze_cc1 -x objective-c -analyzer-checker=core -analyzer-output=text -Wno-objc-root-class -fblocks -verify %s
-#include "../Inputs/system-header-simulator-for-nullability.h"
-
-extern int coin();
-
-@interface I : NSObject
+@interface I
- (int)initVar:(int *)var param:(int)param;
@end
@@ -48,30 +44,3 @@ int initFromBlock() {
}();
return z;
}
-
-extern void expectNonNull(NSString * _Nonnull a);
-
-@interface A : NSObject
-- (void) func;
-- (void) initAMaybe;
-@end
-
-@implementation A {
- NSString * a;
-}
-
-- (void) initAMaybe {
- if (coin()) // expected-note{{Assuming the condition is false}}
- // expected-note@-1{{Taking false branch}}
- a = @"string";
-} // expected-note{{Returning without writing to 'self->a'}}
-
-- (void) func {
- a = nil; // expected-note{{nil object reference stored to 'a'}}
- [self initAMaybe]; // expected-note{{Calling 'initAMaybe'}}
- // expected-note@-1{{Returning from 'initAMaybe'}}
- expectNonNull(a); // expected-warning{{nil passed to a callee that requires a non-null 1st parameter}}
- // expected-note@-1{{nil passed to a callee that requires a non-null 1st parameter}}
-}
-
-@end
OpenPOWER on IntegriCloud