Skip to content

Commit 10b4931

Browse files
committed
[test] NFC, add missing declarations and include to test files to avoid 'implicit-function-declaration' diagnostics in the tests
1 parent d2a26ad commit 10b4931

File tree

4 files changed

+25
-16
lines changed

4 files changed

+25
-16
lines changed

clang-tools-extra/test/clang-tidy/checkers/darwin-avoid-spinlock.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
typedef int OSSpinLock;
44

5+
void OSSpinlockLock(OSSpinLock *l);
6+
void OSSpinlockTry(OSSpinLock *l);
7+
void OSSpinlockUnlock(OSSpinLock *l);
8+
59
@implementation Foo
610
- (void)f {
711
int i = 1;

compiler-rt/test/profile/Inputs/instrprof-gcov-__gcov_flush-multiple.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
extern void __gcov_flush();
2+
extern int remove(const char *);
13
int main(void) {
24
__gcov_flush();
35

compiler-rt/test/profile/Inputs/instrprof-gcov-__gcov_flush-multiple.c.gcov

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,21 @@
33
// CHECK-NEXT: -: 0:Data:instrprof-gcov-__gcov_flush-multiple.gcda
44
// CHECK-NEXT: -: 0:Runs:1
55
// CHECK-NEXT: -: 0:Programs:1
6-
// CHECK-NEXT: #####: 1:int main(void) {
7-
// CHECK-NEXT: #####: 2: __gcov_flush();
8-
// CHECK-NEXT: -: 3:
9-
// CHECK-NEXT: #####: 4: if (remove("instrprof-gcov-__gcov_flush-multiple.gcda") != 0) {
10-
// CHECK-NEXT: #####: 5: return 1;
11-
// CHECK-NEXT: -: 6: }
12-
// CHECK-NEXT: -: 7:
13-
// CHECK-NEXT: #####: 8: __gcov_flush();
14-
// CHECK-NEXT: #####: 9: __gcov_flush();
15-
// CHECK-NEXT: -: 10:
16-
// CHECK-NEXT: #####: 11: if (remove("instrprof-gcov-__gcov_flush-multiple.gcda") != 0) {
17-
// CHECK-NEXT: #####: 12: return 1;
18-
// CHECK-NEXT: -: 13: }
19-
// CHECK-NEXT: -: 14:
20-
// CHECK-NEXT: 1: 15: return 0;
21-
// CHECK-NEXT: 1: 16:}
6+
// CHECK-NEXT: -: 1:extern void __gcov_flush();
7+
// CHECK-NEXT: -: 2:extern int remove(const char *);
8+
// CHECK-NEXT: #####: 3:int main(void) {
9+
// CHECK-NEXT: #####: 4: __gcov_flush();
10+
// CHECK-NEXT: -: 5:
11+
// CHECK-NEXT: #####: 6: if (remove("instrprof-gcov-__gcov_flush-multiple.gcda") != 0) {
12+
// CHECK-NEXT: #####: 7: return 1;
13+
// CHECK-NEXT: -: 8: }
14+
// CHECK-NEXT: -: 9:
15+
// CHECK-NEXT: #####: 10: __gcov_flush();
16+
// CHECK-NEXT: #####: 11: __gcov_flush();
17+
// CHECK-NEXT: -: 12:
18+
// CHECK-NEXT: #####: 13: if (remove("instrprof-gcov-__gcov_flush-multiple.gcda") != 0) {
19+
// CHECK-NEXT: #####: 14: return 1;
20+
// CHECK-NEXT: -: 15: }
21+
// CHECK-NEXT: -: 16:
22+
// CHECK-NEXT: 1: 17: return 0;
23+
// CHECK-NEXT: 1: 18:}

compiler-rt/test/profile/instrprof-value-prof.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <stdint.h>
2828
#include <stdio.h>
2929
#include <stdlib.h>
30+
#include <string.h>
3031
typedef struct __llvm_profile_data __llvm_profile_data;
3132
const __llvm_profile_data *__llvm_profile_begin_data(void);
3233
const __llvm_profile_data *__llvm_profile_end_data(void);

0 commit comments

Comments
 (0)