• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: %clang_cc1 -emit-llvm -fblocks -debug-info-kind=limited \
2// RUN:   -fsanitize=nullability-return %s -o - | FileCheck %s
3
4// Check that santizer check calls have a !dbg location.
5// CHECK: call void {{.*}}@__ubsan_handle_nullability_return_v1_abort
6// CHECK-SAME: !dbg
7
8@protocol NSObject
9@end
10
11@interface NSObject<NSObject> {}
12@end
13
14#pragma clang assume_nonnull begin
15@interface NSString : NSObject
16+ (instancetype)stringWithFormat:(NSString *)format, ...;
17@end
18
19@interface NSIndexPath : NSObject {}
20@end
21#pragma clang assume_nonnull end
22
23@interface B : NSObject
24@end
25id foo(NSIndexPath *indexPath) {
26  return [B withBlock:^{
27    return [NSString stringWithFormat:@"%ld",
28                                      (long)[indexPath indexAtPosition:1]];
29  }];
30}
31