Skip to content

Commit c6aeddd

Browse files
[BoundsSafety] Fix tests after b247698
b247698 makes `-Wincompatible-pointer-types` an error by default.
1 parent cabd0f3 commit c6aeddd

31 files changed

+112
-131
lines changed

clang/test/BoundsSafety-legacy-checks/AST/ended_by_returns.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %clang_cc1 -ast-dump -fbounds-safety %s 2> /dev/null | FileCheck %s
2-
// RUN: %clang_cc1 -ast-dump -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc %s 2> /dev/null | FileCheck %s
1+
// RUN: %clang_cc1 -ast-dump -fbounds-safety -Wno-error=incompatible-pointer-types %s 2> /dev/null | FileCheck %s
2+
// RUN: %clang_cc1 -ast-dump -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -Wno-error=incompatible-pointer-types %s 2> /dev/null | FileCheck %s
33

44
#include <ptrcheck.h>
55

clang/test/BoundsSafety-legacy-checks/CodeGen/ended_by_returns.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// REQUIRES: system-darwin
22
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --replace-value-regex "!annotation ![0-9]+" "!tbaa ![0-9]+" "!tbaa.struct ![0-9]+" "!nosanitize ![0-9]+" "!srcloc ![0-9]+" --prefix-filecheck-ir-name TMP_
33

4-
// RUN: %clang_cc1 -O0 -triple arm64-apple-iphoneos -fbounds-safety -emit-llvm %s -o - | FileCheck %s
5-
// RUN: %clang_cc1 -O0 -triple arm64-apple-iphoneos -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -emit-llvm %s -o - | FileCheck %s
4+
// RUN: %clang_cc1 -O0 -triple arm64-apple-iphoneos -fbounds-safety -Wno-error=incompatible-pointer-types -emit-llvm %s -o - | FileCheck %s
5+
// RUN: %clang_cc1 -O0 -triple arm64-apple-iphoneos -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -Wno-error=incompatible-pointer-types -emit-llvm %s -o - | FileCheck %s
66

77
#include <ptrcheck.h>
88

clang/test/BoundsSafety-legacy-checks/CodeGen/single-null-O2.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
22

3-
4-
// RUN: %clang_cc1 -O2 -triple x86_64 -fbounds-safety -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-O2
5-
// RUN: %clang_cc1 -O2 -triple x86_64 -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-O2
3+
// RUN: %clang_cc1 -O2 -triple x86_64 -fbounds-safety -Wno-error=incompatible-pointer-types -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-O2
4+
// RUN: %clang_cc1 -O2 -triple x86_64 -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -Wno-error=incompatible-pointer-types -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-O2
65

76
#include <ptrcheck.h>
87

clang/test/BoundsSafety/AST/bitcast-to-counted_by.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1+
// RUN: %clang_cc1 -fbounds-safety -ast-dump -Wno-bounds-safety-init-list -Wno-error=incompatible-pointer-types %s | FileCheck %s
2+
// RUN: %clang_cc1 -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -ast-dump -Wno-bounds-safety-init-list -Wno-error=incompatible-pointer-types %s | FileCheck %s
13

2-
3-
// RUN: %clang_cc1 -fbounds-safety -ast-dump -Wno-bounds-safety-init-list %s | FileCheck %s
4-
// RUN: %clang_cc1 -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -ast-dump -Wno-bounds-safety-init-list %s | FileCheck %s
54
#include <ptrcheck.h>
65

76
void Test(void) {

clang/test/BoundsSafety/AST/const-cast.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
2-
31
// RUN: %clang_cc1 -ast-dump -fbounds-safety -Wno-incompatible-pointer-types %s 2>&1 | FileCheck %s
4-
// RUN: %clang_cc1 -emit-llvm -fbounds-safety %s -o /dev/null
5-
// RUN: %clang_cc1 -emit-llvm -fbounds-safety -O2 %s -o /dev/null
2+
// RUN: %clang_cc1 -emit-llvm -fbounds-safety -Wno-error=incompatible-pointer-types %s -o /dev/null
3+
// RUN: %clang_cc1 -emit-llvm -fbounds-safety -Wno-error=incompatible-pointer-types -O2 %s -o /dev/null
64

75
// RUN: %clang_cc1 -ast-dump -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -Wno-incompatible-pointer-types %s 2>&1 | FileCheck %s
8-
// RUN: %clang_cc1 -emit-llvm -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc %s -o /dev/null
9-
// RUN: %clang_cc1 -emit-llvm -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -O2 %s -o /dev/null
6+
// RUN: %clang_cc1 -emit-llvm -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -Wno-error=incompatible-pointer-types %s -o /dev/null
7+
// RUN: %clang_cc1 -emit-llvm -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -Wno-error=incompatible-pointer-types -O2 %s -o /dev/null
108

119
#include <ptrcheck.h>
1210

clang/test/BoundsSafety/AST/ended_by_assign_checks.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
2-
// RUN: %clang_cc1 -ast-dump -fbounds-safety %s 2> /dev/null | FileCheck %s
1+
// RUN: %clang_cc1 -ast-dump -fbounds-safety -Wno-error=incompatible-pointer-types %s 2> /dev/null | FileCheck %s
32

43
#include <ptrcheck.h>
54

clang/test/BoundsSafety/AST/ended_by_returns.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
2-
// RUN: %clang_cc1 -ast-dump -fbounds-safety %s 2> /dev/null | FileCheck %s
3-
// RUN: %clang_cc1 -ast-dump -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc %s 2> /dev/null | FileCheck %s
1+
// RUN: %clang_cc1 -ast-dump -fbounds-safety -Wno-error=incompatible-pointer-types %s 2> /dev/null | FileCheck %s
2+
// RUN: %clang_cc1 -ast-dump -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -Wno-error=incompatible-pointer-types %s 2> /dev/null | FileCheck %s
43

54
#include <ptrcheck.h>
65

clang/test/BoundsSafety/AST/forward-declared-type.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
2-
3-
// RUN: %clang_cc1 -ast-dump -verify -fbounds-safety %s 2>&1 | FileCheck %s
4-
// RUN: %clang_cc1 -x objective-c -ast-dump -verify -fbounds-safety -fexperimental-bounds-safety-objc %s 2>&1 | FileCheck %s
1+
// RUN: %clang_cc1 -ast-dump -verify -fbounds-safety -Wno-error=incompatible-pointer-types %s 2>&1 | FileCheck %s
2+
// RUN: %clang_cc1 -x objective-c -ast-dump -verify -fbounds-safety -fexperimental-bounds-safety-objc -Wno-error=incompatible-pointer-types %s 2>&1 | FileCheck %s
53

64
#include <ptrcheck.h>
75

clang/test/BoundsSafety/CodeGen/addr-of-struct-field.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
// RUN: %clang_cc1 -O0 -fbounds-safety -Wno-error=incompatible-pointer-types -emit-llvm %s -o /dev/null
2+
// RUN: %clang_cc1 -O2 -fbounds-safety -Wno-error=incompatible-pointer-types -emit-llvm %s -o - | FileCheck %s
3+
// RUN: %clang_cc1 -O0 -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -Wno-error=incompatible-pointer-types -emit-llvm %s -o /dev/null
4+
// RUN: %clang_cc1 -O2 -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -Wno-error=incompatible-pointer-types -emit-llvm %s -o - | FileCheck %s
15

2-
// RUN: %clang_cc1 -O0 -fbounds-safety -emit-llvm %s -o /dev/null
3-
// RUN: %clang_cc1 -O2 -fbounds-safety -emit-llvm %s -o - | FileCheck %s
4-
// RUN: %clang_cc1 -O0 -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -emit-llvm %s -o /dev/null
5-
// RUN: %clang_cc1 -O2 -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -emit-llvm %s -o - | FileCheck %s
66
struct S {
77
int i;
88
char *p;

clang/test/BoundsSafety/CodeGen/auto-init/global-bidi-indexable-init-scalar.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
2-
// RUN: %clang_cc1 -S -fbounds-safety -triple arm64-apple-darwin -O0 %s -o - | FileCheck %s
3-
// RUN: %clang_cc1 -S -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -triple arm64-apple-darwin -O0 %s -o - | FileCheck %s
1+
// RUN: %clang_cc1 -S -fbounds-safety -Wno-error=incompatible-pointer-types -triple arm64-apple-darwin -O0 %s -o - | FileCheck %s
2+
// RUN: %clang_cc1 -S -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -Wno-error=incompatible-pointer-types -triple arm64-apple-darwin -O0 %s -o - | FileCheck %s
43

54
#include <ptrcheck.h>
65

0 commit comments

Comments
 (0)