llvm-project/clang/test/FixIt/fixit-nsstring-compare.m
Aaron Ballman 7de7161304 Use functions with prototypes when appropriate; NFC
A significant number of our tests in C accidentally use functions
without prototypes. This patch converts the function signatures to have
a prototype for the situations where the test is not specific to K&R C
declarations. e.g.,

  void func();

becomes

  void func(void);

This is the sixth batch of tests being updated (there are a significant
number of other tests left to be updated).
2022-02-09 17:16:10 -05:00

23 lines
446 B
Objective-C

// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fdiagnostics-parseable-fixits -x objective-c %s 2>&1 | FileCheck %s
// rdar://12716301
typedef unsigned char BOOL;
@protocol NSObject
- (BOOL)isEqual:(id)object;
@end
@interface NSString<NSObject>
@end
int main(void) {
NSString *stringA = @"stringA";
BOOL comparison = stringA==@"stringB";
}
// CHECK: {16:21-16:21}:"["
// CHECK: {16:28-16:30}:" isEqual:"
// CHECK: {16:40-16:40}:"]"