// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-store=region -analyzer-output=text -fblocks -verify -Wno-objc-root-class %s
// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-store=region -analyzer-output=plist-multi-file -fblocks -Wno-objc-root-class %s -o %t
// RUN: FileCheck --input-file=%t %s
@interface Root {
@public
int uniqueID;
}
- (id)initWithID:(int)newID;
- (void)refreshID;
@end
int testNull(Root *obj) {
if (obj) return 0;
// expected-note@-1 {{Assuming 'obj' is nil}}
// expected-note@-2 {{Taking false branch}}
int *x = &obj->uniqueID; // expected-note{{'x' initialized to a null pointer value}}
return *x; // expected-warning{{Dereference of null pointer (loaded from variable 'x')}} expected-note{{Dereference of null pointer (loaded from variable 'x')}}
}
@interface Subclass : Root
@end
@implementation Subclass
- (id)initWithID:(int)newID {
self = [super initWithID:newID]; // expected-note{{Value assigned to 'self'}}
if (self) return self;
// expected-note@-1 {{Assuming 'self' is nil}}
// expected-note@-2 {{Taking false branch}}
uniqueID = newID; // expected-warning{{Access to instance variable 'uniqueID' results in a dereference of a null pointer (loaded from variable 'self')}} expected-note{{Access to instance variable 'uniqueID' results in a dereference of a null pointer (loaded from variable 'self')}}
return self;
}
@end
void repeatedStores(int coin) {
int *p = 0;
if (coin) {
// expected-note@-1 {{Assuming 'coin' is 0}}
// expected-note@-2 {{Taking false branch}}
extern int *getPointer();
p = getPointer();
} else {
p = 0; // expected-note {{Null pointer value stored to 'p'}}
}
*p = 1; // expected-warning{{Dereference of null pointer}} expected-note{{Dereference of null pointer}}
}
@interface WithArrayPtr
- (void) useArray;
@end
@implementation WithArrayPtr {
@public int *p;
}
- (void)useArray {
p[1] = 2; // expected-warning{{Array access (via ivar 'p') results in a null pointer dereference}}
// expected-note@-1{{Array access (via ivar 'p') results in a null pointer dereference}}
}
@end
void testWithArrayPtr(WithArrayPtr *w) {
w->p = 0; // expected-note{{Null pointer value stored to 'p'}}
[w useArray]; // expected-note{{Calling 'useArray'}}
}
// CHECK: diagnostics
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: path
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindcontrol
// CHECK-NEXT: edges
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: start
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line14
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line14
// CHECK-NEXT: col4
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: end
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line14
// CHECK-NEXT: col7
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line14
// CHECK-NEXT: col9
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindevent
// CHECK-NEXT: location
// CHECK-NEXT:
// CHECK-NEXT: line14
// CHECK-NEXT: col7
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT: ranges
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line14
// CHECK-NEXT: col7
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line14
// CHECK-NEXT: col9
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: depth0
// CHECK-NEXT: extended_message
// CHECK-NEXT: Assuming 'obj' is nil
// CHECK-NEXT: message
// CHECK-NEXT: Assuming 'obj' is nil
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindcontrol
// CHECK-NEXT: edges
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: start
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line14
// CHECK-NEXT: col7
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line14
// CHECK-NEXT: col9
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: end
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line18
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line18
// CHECK-NEXT: col5
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindevent
// CHECK-NEXT: location
// CHECK-NEXT:
// CHECK-NEXT: line18
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT: ranges
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line18
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line18
// CHECK-NEXT: col8
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: depth0
// CHECK-NEXT: extended_message
// CHECK-NEXT: 'x' initialized to a null pointer value
// CHECK-NEXT: message
// CHECK-NEXT: 'x' initialized to a null pointer value
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindcontrol
// CHECK-NEXT: edges
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: start
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line18
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line18
// CHECK-NEXT: col5
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: end
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line19
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line19
// CHECK-NEXT: col8
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindcontrol
// CHECK-NEXT: edges
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: start
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line19
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line19
// CHECK-NEXT: col8
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: end
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line19
// CHECK-NEXT: col10
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line19
// CHECK-NEXT: col10
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindevent
// CHECK-NEXT: location
// CHECK-NEXT:
// CHECK-NEXT: line19
// CHECK-NEXT: col10
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT: ranges
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line19
// CHECK-NEXT: col11
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line19
// CHECK-NEXT: col11
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: depth0
// CHECK-NEXT: extended_message
// CHECK-NEXT: Dereference of null pointer (loaded from variable 'x')
// CHECK-NEXT: message
// CHECK-NEXT: Dereference of null pointer (loaded from variable 'x')
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: descriptionDereference of null pointer (loaded from variable 'x')
// CHECK-NEXT: categoryLogic error
// CHECK-NEXT: typeDereference of null pointer
// CHECK-NEXT: check_namecore.NullDereference
// CHECK-NEXT:
// CHECK-NEXT: issue_hash_content_of_line_in_context3ff6dd9f2084f4a0dac8c3688c02fd0f
// CHECK-NEXT: issue_context_kindfunction
// CHECK-NEXT: issue_contexttestNull
// CHECK-NEXT: issue_hash_function_offset6
// CHECK-NEXT: location
// CHECK-NEXT:
// CHECK-NEXT: line19
// CHECK-NEXT: col10
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: path
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindevent
// CHECK-NEXT: location
// CHECK-NEXT:
// CHECK-NEXT: line28
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT: ranges
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line28
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line28
// CHECK-NEXT: col33
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: depth0
// CHECK-NEXT: extended_message
// CHECK-NEXT: Value assigned to 'self'
// CHECK-NEXT: message
// CHECK-NEXT: Value assigned to 'self'
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindcontrol
// CHECK-NEXT: edges
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: start
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line28
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line28
// CHECK-NEXT: col6
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: end
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line29
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line29
// CHECK-NEXT: col4
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindcontrol
// CHECK-NEXT: edges
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: start
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line29
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line29
// CHECK-NEXT: col4
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: end
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line29
// CHECK-NEXT: col7
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line29
// CHECK-NEXT: col10
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindevent
// CHECK-NEXT: location
// CHECK-NEXT:
// CHECK-NEXT: line29
// CHECK-NEXT: col7
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT: ranges
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line29
// CHECK-NEXT: col7
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line29
// CHECK-NEXT: col10
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: depth0
// CHECK-NEXT: extended_message
// CHECK-NEXT: Assuming 'self' is nil
// CHECK-NEXT: message
// CHECK-NEXT: Assuming 'self' is nil
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindcontrol
// CHECK-NEXT: edges
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: start
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line29
// CHECK-NEXT: col7
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line29
// CHECK-NEXT: col10
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: end
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line33
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line33
// CHECK-NEXT: col10
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindcontrol
// CHECK-NEXT: edges
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: start
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line33
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line33
// CHECK-NEXT: col10
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: end
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line33
// CHECK-NEXT: col12
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line33
// CHECK-NEXT: col12
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindevent
// CHECK-NEXT: location
// CHECK-NEXT:
// CHECK-NEXT: line33
// CHECK-NEXT: col12
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT: depth0
// CHECK-NEXT: extended_message
// CHECK-NEXT: Access to instance variable 'uniqueID' results in a dereference of a null pointer (loaded from variable 'self')
// CHECK-NEXT: message
// CHECK-NEXT: Access to instance variable 'uniqueID' results in a dereference of a null pointer (loaded from variable 'self')
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: descriptionAccess to instance variable 'uniqueID' results in a dereference of a null pointer (loaded from variable 'self')
// CHECK-NEXT: categoryLogic error
// CHECK-NEXT: typeDereference of null pointer
// CHECK-NEXT: check_namecore.NullDereference
// CHECK-NEXT:
// CHECK-NEXT: issue_hash_content_of_line_in_context208c1267ca2da821fcc1b9183e1d624b
// CHECK-NEXT: issue_context_kindObjective-C method
// CHECK-NEXT: issue_contextinitWithID:
// CHECK-NEXT: issue_hash_function_offset6
// CHECK-NEXT: location
// CHECK-NEXT:
// CHECK-NEXT: line33
// CHECK-NEXT: col12
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: path
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindcontrol
// CHECK-NEXT: edges
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: start
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line40
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line40
// CHECK-NEXT: col5
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: end
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line41
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line41
// CHECK-NEXT: col4
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindcontrol
// CHECK-NEXT: edges
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: start
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line41
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line41
// CHECK-NEXT: col4
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: end
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line41
// CHECK-NEXT: col7
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line41
// CHECK-NEXT: col10
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindevent
// CHECK-NEXT: location
// CHECK-NEXT:
// CHECK-NEXT: line41
// CHECK-NEXT: col7
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT: ranges
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line41
// CHECK-NEXT: col7
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line41
// CHECK-NEXT: col10
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: depth0
// CHECK-NEXT: extended_message
// CHECK-NEXT: Assuming 'coin' is 0
// CHECK-NEXT: message
// CHECK-NEXT: Assuming 'coin' is 0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindcontrol
// CHECK-NEXT: edges
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: start
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line41
// CHECK-NEXT: col7
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line41
// CHECK-NEXT: col10
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: end
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line47
// CHECK-NEXT: col5
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line47
// CHECK-NEXT: col5
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindevent
// CHECK-NEXT: location
// CHECK-NEXT:
// CHECK-NEXT: line47
// CHECK-NEXT: col5
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT: ranges
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line47
// CHECK-NEXT: col5
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line47
// CHECK-NEXT: col9
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: depth0
// CHECK-NEXT: extended_message
// CHECK-NEXT: Null pointer value stored to 'p'
// CHECK-NEXT: message
// CHECK-NEXT: Null pointer value stored to 'p'
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindcontrol
// CHECK-NEXT: edges
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: start
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line47
// CHECK-NEXT: col5
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line47
// CHECK-NEXT: col5
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: end
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line50
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line50
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindcontrol
// CHECK-NEXT: edges
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: start
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line50
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line50
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: end
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line50
// CHECK-NEXT: col6
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line50
// CHECK-NEXT: col6
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindevent
// CHECK-NEXT: location
// CHECK-NEXT:
// CHECK-NEXT: line50
// CHECK-NEXT: col6
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT: ranges
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line50
// CHECK-NEXT: col4
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line50
// CHECK-NEXT: col4
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: depth0
// CHECK-NEXT: extended_message
// CHECK-NEXT: Dereference of null pointer (loaded from variable 'p')
// CHECK-NEXT: message
// CHECK-NEXT: Dereference of null pointer (loaded from variable 'p')
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: descriptionDereference of null pointer (loaded from variable 'p')
// CHECK-NEXT: categoryLogic error
// CHECK-NEXT: typeDereference of null pointer
// CHECK-NEXT: check_namecore.NullDereference
// CHECK-NEXT:
// CHECK-NEXT: issue_hash_content_of_line_in_context9e1f67627fbbfb46b4e3a618246e6b0a
// CHECK-NEXT: issue_context_kindfunction
// CHECK-NEXT: issue_contextrepeatedStores
// CHECK-NEXT: issue_hash_function_offset11
// CHECK-NEXT: location
// CHECK-NEXT:
// CHECK-NEXT: line50
// CHECK-NEXT: col6
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: path
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindevent
// CHECK-NEXT: location
// CHECK-NEXT:
// CHECK-NEXT: line67
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT: ranges
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line67
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line67
// CHECK-NEXT: col10
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: depth0
// CHECK-NEXT: extended_message
// CHECK-NEXT: Null pointer value stored to 'p'
// CHECK-NEXT: message
// CHECK-NEXT: Null pointer value stored to 'p'
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindcontrol
// CHECK-NEXT: edges
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: start
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line67
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line67
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: end
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line68
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line68
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindevent
// CHECK-NEXT: location
// CHECK-NEXT:
// CHECK-NEXT: line68
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT: ranges
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line68
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line68
// CHECK-NEXT: col14
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: depth0
// CHECK-NEXT: extended_message
// CHECK-NEXT: Calling 'useArray'
// CHECK-NEXT: message
// CHECK-NEXT: Calling 'useArray'
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindevent
// CHECK-NEXT: location
// CHECK-NEXT:
// CHECK-NEXT: line60
// CHECK-NEXT: col1
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT: depth1
// CHECK-NEXT: extended_message
// CHECK-NEXT: Entered call from 'testWithArrayPtr'
// CHECK-NEXT: message
// CHECK-NEXT: Entered call from 'testWithArrayPtr'
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindcontrol
// CHECK-NEXT: edges
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: start
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line60
// CHECK-NEXT: col1
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line60
// CHECK-NEXT: col1
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: end
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line61
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line61
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindcontrol
// CHECK-NEXT: edges
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: start
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line61
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line61
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: end
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line61
// CHECK-NEXT: col8
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line61
// CHECK-NEXT: col8
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: kindevent
// CHECK-NEXT: location
// CHECK-NEXT:
// CHECK-NEXT: line61
// CHECK-NEXT: col8
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT: ranges
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line61
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: line61
// CHECK-NEXT: col3
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: depth1
// CHECK-NEXT: extended_message
// CHECK-NEXT: Array access (via ivar 'p') results in a null pointer dereference
// CHECK-NEXT: message
// CHECK-NEXT: Array access (via ivar 'p') results in a null pointer dereference
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: descriptionArray access (via ivar 'p') results in a null pointer dereference
// CHECK-NEXT: categoryLogic error
// CHECK-NEXT: typeDereference of null pointer
// CHECK-NEXT: check_namecore.NullDereference
// CHECK-NEXT:
// CHECK-NEXT: issue_hash_content_of_line_in_contextfb0ad1e4e3090d9834d542eb54bc9d2e
// CHECK-NEXT: issue_context_kindObjective-C method
// CHECK-NEXT: issue_contextuseArray
// CHECK-NEXT: issue_hash_function_offset1
// CHECK-NEXT: location
// CHECK-NEXT:
// CHECK-NEXT: line61
// CHECK-NEXT: col8
// CHECK-NEXT: file0
// CHECK-NEXT:
// CHECK-NEXT:
// CHECK-NEXT: