brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 71c983b Raw
31 lines · plain
1@interface Foo2- (void) test;3- (void) test2;4@end5 6@implementation Foo7- (void) test {8  [_self test2];9}10- (void) test2 {}11@end12 13// RUN: rm -f %t14// RUN: not %clang -Wall -fsyntax-only %s --serialize-diagnostics %t.diag > /dev/null 2>&115// RUN: c-index-test -read-diagnostics %t.diag > %t 2>&116// RUN: FileCheck --input-file=%t %s17 18// This test checks that serialized diagnostics handle notes with no source location.19 20// CHECK: {{.*[/\\]}}serialized-diags.m:8:4: error: use of undeclared identifier '_self'; did you mean 'self'? [] [Semantic Issue]21// CHECK: Range: {{.*[/\\]}}serialized-diags.m:8:4 {{.*[/\\]}}serialized-diags.m:8:922// CHECK: Number FIXITs = 123// CHECK: FIXIT: ({{.*[/\\]}}serialized-diags.m:8:4 - {{.*[/\\]}}serialized-diags.m:8:9): "self"24// CHECK: +-(null):0:0: note: 'self' is an implicit parameter [] [Semantic Issue]25// CHECK: Number FIXITs = 026// CHECK: {{.*[/\\]}}serialized-diags.m:1:12: warning: class 'Foo' defined without specifying a base class [-Wobjc-root-class] [Semantic Issue]27// CHECK: Number FIXITs = 028// CHECK: +-{{.*[/\\]}}serialized-diags.m:1:15: note: add a super class to fix this problem [] [Semantic Issue]29// CHECK: Number FIXITs = 030// CHECK: Number of diagnostics: 231