Skip to content

Commit cf995c3

Browse files
committed
[BoundsSafety] Rename experimental C++ and Objective-C flags and make them CC1 only
The existing `-fbounds-attributes-cxx-experimental` and `-fbounds-attributes-objc-experimental` flags were previously exposed as driver and CC1 flags. However, given that these modes are highly experimental we don't want to encourage their use so these flags have no been made CC1 only flags. The functionality is still available from the driver by doing `-Xclang <flag name>`. This patch also does a rename of the flags to be prefixed with `experimental-` which upstream prefers. 1. `-fbounds-attributes-cxx-experimental` -> `-fexperimental-bounds-safety-cxx` 2. `-fbounds-attributes-objc-experimental` -> `-fexperimental-bounds-safety-objc`. This patch also renames "bounds attributes" to "bounds safety" for things associated with these flags (e.g. `LangOptions::BoundsSafetyCXXExperimental`). "bounds attributes" is the legacy name that we need to slowly purge from the codebase and this is one small step towards that goal. rdar://149423268
1 parent 12290a5 commit cf995c3

File tree

745 files changed

+944
-955
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

745 files changed

+944
-955
lines changed

clang/include/clang/Basic/DiagnosticFrontendKinds.td

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -383,15 +383,15 @@ def err_bounds_safety_attributes_cannot_be_disabled : Error<
383383
def err_bounds_safety_initializer_out_of_range : Error<
384384
"initializing value is out of valid range">;
385385

386-
def warn_bounds_attributes_cxx_experimental_ignored : Warning<
387-
"-fbounds-attributes-cxx-experimental without -fbounds-attributes is "
386+
def warn_bounds_safety_cxx_experimental_ignored : Warning<
387+
"-fexperimental-bounds-safety-cxx without -fbounds-safety is "
388388
"ignored">,
389-
InGroup<BoundsAttributesCXXExperimentalIgnored>;
389+
InGroup<BoundsSafetyCXXExperimentalIgnored>;
390390

391-
def warn_bounds_attributes_objc_experimental_ignored : Warning<
392-
"-fbounds-attributes-objc-experimental without -fbounds-attributes is "
391+
def warn_bounds_safety_objc_experimental_ignored : Warning<
392+
"-fexperimental-bounds-safety-objc without -fbounds-safety is "
393393
"ignored">,
394-
InGroup<BoundsAttributesObjCExperimentalIgnored>;
394+
InGroup<BoundsSafetyObjCExperimentalIgnored>;
395395

396396
def warn_bounds_safety_relaxed_system_headers_ignored : Warning<
397397
"-fno-bounds-safety-relaxed-system-headers without -fbounds-safety is "

clang/include/clang/Basic/DiagnosticGroups.td

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1585,10 +1585,10 @@ def BoundsSafetyInitList : DiagGroup<"bounds-safety-init-list">;
15851585
def BoundsAttributesExternArrayCount : DiagGroup<"bounds-attributes-extern-array-count">;
15861586
def BoundsAttributesInitSideEffect
15871587
: DiagGroup<"bounds-attributes-init-list-side-effect">;
1588-
def BoundsAttributesCXXExperimentalIgnored
1589-
: DiagGroup<"bounds-attributes-cxx-experimental-ignored">;
1590-
def BoundsAttributesObjCExperimentalIgnored
1591-
: DiagGroup<"bounds-attributes-objc-experimental-ignored">;
1588+
def BoundsSafetyCXXExperimentalIgnored
1589+
: DiagGroup<"experimental-bounds-safety-cxx-ignored">;
1590+
def BoundsSafetyObjCExperimentalIgnored
1591+
: DiagGroup<"experimental-bounds-safety-objc-ignored">;
15921592
def BoundsSafetyRelaxedSystemHeadersIgnored
15931593
: DiagGroup<"bounds-safety-relaxed-system-headers-ignore">;
15941594
def BoundsAttributesImplicitConvSingleToExplicitIndexable :

clang/include/clang/Basic/LangOptions.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,8 +543,8 @@ BENIGN_LANGOPT(CheckConstexprFunctionBodies, 1, 1,
543543
LANGOPT(BoundsSafety, 1, 0, "Bounds safety extension for C")
544544
/* TO_UPSTREAM(BoundsSafety) ON*/
545545
LANGOPT(BoundsSafetyAttributes, 1, 0, "Experimental bounds safety attributes")
546-
LANGOPT(BoundsAttributesCXXExperimental, 1, 0, "Experimental bounds attributes for C++")
547-
LANGOPT(BoundsAttributesObjCExperimental, 1, 0, "Experimental bounds attributes for Objective-C")
546+
LANGOPT(BoundsSafetyCXXExperimental, 1, 0, "Experimental bounds attributes for C++")
547+
LANGOPT(BoundsSafetyObjCExperimental, 1, 0, "Experimental bounds attributes for Objective-C")
548548
LANGOPT(BoundsSafetyRelaxedSystemHeaders, 1, 1,
549549
"Relax bounds safety assignment rules in system headers")
550550
LANGOPT(BoundsSafetyBringUpMissingChecks, 7, clang::LangOptions::getDefaultBoundsSafetyNewChecksMask(),

clang/include/clang/Driver/Options.td

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1945,20 +1945,20 @@ defm experimental_bounds_safety_attributes : BoolFOption<
19451945
PosFlag<SetTrue, [], [ClangOption], "Enable">,
19461946
NegFlag<SetFalse, [], [ClangOption], "Disable">,
19471947
BothFlags<[], [ClangOption, CC1Option], " experimental attributes">>;
1948-
defm bounds_attributes_cxx_experimental : BoolFOption<
1949-
"bounds-attributes-cxx-experimental",
1950-
LangOpts<"BoundsAttributesCXXExperimental">, DefaultFalse,
1951-
PosFlag<SetTrue, [], [ClangOption], "Enable">,
1952-
NegFlag<SetFalse, [], [ClangOption], "Disable">,
1953-
BothFlags<[], [ClangOption, CC1Option],
1954-
" experimental bounds attributes for C++">>;
1955-
defm bounds_attributes_objc_experimental : BoolFOption<
1956-
"bounds-attributes-objc-experimental",
1957-
LangOpts<"BoundsAttributesObjCExperimental">, DefaultFalse,
1958-
PosFlag<SetTrue, [], [ClangOption], "Enable">,
1959-
NegFlag<SetFalse, [], [ClangOption], "Disable">,
1960-
BothFlags<[], [ClangOption, CC1Option],
1961-
" experimental bounds attributes for ObjC">>;
1948+
defm bounds_safety_cxx_experimental : BoolFOption<
1949+
"experimental-bounds-safety-cxx",
1950+
LangOpts<"BoundsSafetyCXXExperimental">, DefaultFalse,
1951+
PosFlag<SetTrue, [], [CC1Option], "Enable">,
1952+
NegFlag<SetFalse, [], [CC1Option], "Disable">,
1953+
BothFlags<[], [CC1Option],
1954+
" experimental support for -fbounds-safety for C++">>;
1955+
defm bounds_safety_objc_experimental : BoolFOption<
1956+
"experimental-bounds-safety-objc",
1957+
LangOpts<"BoundsSafetyObjCExperimental">, DefaultFalse,
1958+
PosFlag<SetTrue, [], [CC1Option], "Enable">,
1959+
NegFlag<SetFalse, [], [CC1Option], "Disable">,
1960+
BothFlags<[], [CC1Option],
1961+
" experimental support for -fbounds-safety for ObjC">>;
19621962
defm bounds_safety_relaxed_system_headers : BoolFOption<
19631963
"bounds-safety-relaxed-system-headers",
19641964
LangOpts<"BoundsSafetyRelaxedSystemHeaders">, DefaultTrue,

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7751,18 +7751,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &Job,
77517751
CmdArgs.push_back("-fexperimental-bounds-safety-attributes");
77527752
}
77537753

7754-
if (Args.hasFlag(options::OPT_fbounds_attributes_cxx_experimental,
7755-
options::OPT_fno_bounds_attributes_cxx_experimental,
7756-
false)) {
7757-
CmdArgs.push_back("-fbounds-attributes-cxx-experimental");
7758-
}
7759-
7760-
if (Args.hasFlag(options::OPT_fbounds_attributes_objc_experimental,
7761-
options::OPT_fno_bounds_attributes_objc_experimental,
7762-
false)) {
7763-
CmdArgs.push_back("-fbounds-attributes-objc-experimental");
7764-
}
7765-
77667754
// -fbounds-safety-relaxed-system-headers is on by default
77677755
Args.addOptOutFlag(CmdArgs,
77687756
options::OPT_fbounds_safety_relaxed_system_headers,

clang/lib/Frontend/CompilerInvocation.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4599,10 +4599,10 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args,
45994599
SupportsBoundsSafety = true;
46004600
break;
46014601
case Language::ObjC:
4602-
SupportsBoundsSafety = Opts.BoundsAttributesObjCExperimental;
4602+
SupportsBoundsSafety = Opts.BoundsSafetyObjCExperimental;
46034603
break;
46044604
case Language::CXX:
4605-
SupportsBoundsSafety = Opts.BoundsAttributesCXXExperimental;
4605+
SupportsBoundsSafety = Opts.BoundsSafetyCXXExperimental;
46064606
break;
46074607
default:
46084608
break;
@@ -4629,11 +4629,11 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args,
46294629
Opts.ExperimentalLateParseAttributes = 1;
46304630
}
46314631

4632-
if (Opts.BoundsAttributesCXXExperimental && !Opts.BoundsSafety)
4633-
Diags.Report(diag::warn_bounds_attributes_cxx_experimental_ignored);
4632+
if (Opts.BoundsSafetyCXXExperimental && !Opts.BoundsSafety)
4633+
Diags.Report(diag::warn_bounds_safety_cxx_experimental_ignored);
46344634

4635-
if (Opts.BoundsAttributesObjCExperimental && !Opts.BoundsSafety)
4636-
Diags.Report(diag::warn_bounds_attributes_objc_experimental_ignored);
4635+
if (Opts.BoundsSafetyObjCExperimental && !Opts.BoundsSafety)
4636+
Diags.Report(diag::warn_bounds_safety_objc_experimental_ignored);
46374637

46384638
if (!Opts.BoundsSafetyRelaxedSystemHeaders && !Opts.BoundsSafety)
46394639
Diags.Report(diag::warn_bounds_safety_relaxed_system_headers_ignored);

clang/test/BoundsSafety-legacy-checks/AST/SystemHeaders/builtin-function-main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include <builtin-function-sys.h>
33

44
// RUN: %clang_cc1 -ast-dump -fbounds-safety %s -I %S/include | FileCheck %s --implicit-check-not "GetBoundExpr {{.+}} 'char *__single'" --implicit-check-not "GetBoundExpr {{.+}} 'char *'"
5-
// RUN: %clang_cc1 -ast-dump -fbounds-safety %s -I %S/include -x objective-c -fbounds-attributes-objc-experimental | FileCheck %s --implicit-check-not "GetBoundExpr {{.+}} 'char *__single'" --implicit-check-not "GetBoundExpr {{.+}} 'char *'"
5+
// RUN: %clang_cc1 -ast-dump -fbounds-safety %s -I %S/include -x objective-c -fexperimental-bounds-safety-objc | FileCheck %s --implicit-check-not "GetBoundExpr {{.+}} 'char *__single'" --implicit-check-not "GetBoundExpr {{.+}} 'char *'"
66

77
char * __counted_by(len) func(char * __counted_by(len) src_str, int len) {
88
int len2 = 0;

clang/test/BoundsSafety-legacy-checks/AST/bounds-attributed-in-return-disabled.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22

33
// RUN: %clang_cc1 -fbounds-safety -ast-dump %s 2>&1 | FileCheck %s
4-
// RUN: %clang_cc1 -fbounds-safety -x objective-c -fbounds-attributes-objc-experimental -ast-dump %s 2>&1 | FileCheck %s
4+
// RUN: %clang_cc1 -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -ast-dump %s 2>&1 | FileCheck %s
55

66
#include <ptrcheck.h>
77

clang/test/BoundsSafety-legacy-checks/AST/count-attrs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-mac -ast-dump -fbounds-safety %s | FileCheck %s
2-
// RUN: %clang_cc1 -triple x86_64-apple-mac -ast-dump -fbounds-safety -x objective-c -fbounds-attributes-objc-experimental %s | FileCheck %s
2+
// RUN: %clang_cc1 -triple x86_64-apple-mac -ast-dump -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc %s | FileCheck %s
33
#include <ptrcheck.h>
44

55
int *__counted_by(len) frob(int len);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -ast-dump -fbounds-safety -Wno-bounds-safety-init-list %s | FileCheck %s
2-
// RUN: %clang_cc1 -ast-dump -fbounds-safety -x objective-c -fbounds-attributes-objc-experimental -Wno-bounds-safety-init-list %s | FileCheck %s
2+
// RUN: %clang_cc1 -ast-dump -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -Wno-bounds-safety-init-list %s | FileCheck %s
33

44
#include <ptrcheck.h>
55

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// FileCheck lines automatically generated using make-ast-dump-check-v2.py
22

33
// RUN: %clang_cc1 -triple x86_64-apple-mac -ast-dump -fbounds-safety %s 2>&1 | FileCheck %s
4-
// RUN: %clang_cc1 -triple x86_64-apple-mac -ast-dump -fbounds-safety -x objective-c -fbounds-attributes-objc-experimental %s 2>&1 | FileCheck %s
4+
// RUN: %clang_cc1 -triple x86_64-apple-mac -ast-dump -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc %s 2>&1 | FileCheck %s
55
#include <ptrcheck.h>
66

77
struct S {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -ast-dump -fbounds-safety %s 2> /dev/null | FileCheck %s
2-
// RUN: %clang_cc1 -ast-dump -fbounds-safety -x objective-c -fbounds-attributes-objc-experimental %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
33

44
#include <ptrcheck.h>
55

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -ast-dump -fbounds-safety -Wno-bounds-safety-init-list %s | FileCheck %s
2-
// RUN: %clang_cc1 -ast-dump -fbounds-safety -x objective-c -fbounds-attributes-objc-experimental -Wno-bounds-safety-init-list %s | FileCheck %s
2+
// RUN: %clang_cc1 -ast-dump -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -Wno-bounds-safety-init-list %s | FileCheck %s
33

44
#include <ptrcheck.h>
55

clang/test/BoundsSafety-legacy-checks/AST/unify-function-types.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
// RUN: %clang_cc1 -ast-dump -fbounds-safety -verify=c %s | FileCheck %s
3-
// RUN: %clang_cc1 -x c++ -ast-dump -fbounds-safety -fbounds-attributes-cxx-experimental -verify=cpp %s
3+
// RUN: %clang_cc1 -x c++ -ast-dump -fbounds-safety -fexperimental-bounds-safety-cxx -verify=cpp %s
44
#include <ptrcheck.h>
55

66
char funcA(char buf[__counted_by(len)], int len, int len2);

clang/test/BoundsSafety-legacy-checks/CodeGen/addr-of-array-elem-O2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// 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]+"
22

33
// RUN: %clang_cc1 -O2 -fbounds-safety -triple arm64-apple-iphoneos -emit-llvm %s -o - | FileCheck %s
4-
// RUN: %clang_cc1 -O2 -fbounds-safety -triple arm64-apple-iphoneos -x objective-c -fbounds-attributes-objc-experimental -emit-llvm %s -o - | FileCheck %s
4+
// RUN: %clang_cc1 -O2 -fbounds-safety -triple arm64-apple-iphoneos -x objective-c -fexperimental-bounds-safety-objc -emit-llvm %s -o - | FileCheck %s
55

66
int arr[10];
77

clang/test/BoundsSafety-legacy-checks/CodeGen/addr-of-array-elem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// 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]+"
22

33
// RUN: %clang_cc1 -O0 -triple arm64-apple-iphoneos -fbounds-safety -emit-llvm %s -o - | FileCheck %s
4-
// RUN: %clang_cc1 -O0 -triple arm64-apple-iphoneos -fbounds-safety -x objective-c -fbounds-attributes-objc-experimental -emit-llvm %s -o - | FileCheck %s
4+
// RUN: %clang_cc1 -O0 -triple arm64-apple-iphoneos -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -emit-llvm %s -o - | FileCheck %s
55

66
int arr[10];
77

clang/test/BoundsSafety-legacy-checks/CodeGen/addr-of-packed-struct.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
// RUN: %clang_cc1 -O0 -fbounds-safety -triple arm64-apple-iphoneos -emit-llvm %s -o /dev/null
44
// RUN: %clang_cc1 -O2 -fbounds-safety -triple arm64-apple-iphoneos -emit-llvm %s -o - | FileCheck %s
5-
// RUN: %clang_cc1 -O0 -fbounds-safety -triple arm64-apple-iphoneos -x objective-c -fbounds-attributes-objc-experimental -emit-llvm %s -o /dev/null
6-
// RUN: %clang_cc1 -O2 -fbounds-safety -triple arm64-apple-iphoneos -x objective-c -fbounds-attributes-objc-experimental -emit-llvm %s -o - | FileCheck %s
5+
// RUN: %clang_cc1 -O0 -fbounds-safety -triple arm64-apple-iphoneos -x objective-c -fexperimental-bounds-safety-objc -emit-llvm %s -o /dev/null
6+
// RUN: %clang_cc1 -O2 -fbounds-safety -triple arm64-apple-iphoneos -x objective-c -fexperimental-bounds-safety-objc -emit-llvm %s -o - | FileCheck %s
77

88
struct __attribute__((packed)) foo {
99
char x; // field 0

clang/test/BoundsSafety-legacy-checks/CodeGen/addrof-member-to-single-O2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// 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_
22

33
// RUN: %clang_cc1 -O2 -fbounds-safety -emit-llvm -triple arm64e-apple-iphoneos %s -o - | FileCheck %s
4-
// RUN: %clang_cc1 -O2 -fbounds-safety -x objective-c -fbounds-attributes-objc-experimental -emit-llvm -triple arm64e-apple-iphoneos %s -o - | FileCheck %s
4+
// RUN: %clang_cc1 -O2 -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -emit-llvm -triple arm64e-apple-iphoneos %s -o - | FileCheck %s
55

66
#include <ptrcheck.h>
77

clang/test/BoundsSafety-legacy-checks/CodeGen/alloc-sized-calloc/alloc-sized-calloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44

55
// RUN: %clang_cc1 -emit-llvm -triple arm64e -fbounds-safety %s -o - | FileCheck %s
6-
// RUN: %clang_cc1 -emit-llvm -triple arm64e -fbounds-safety -x objective-c -fbounds-attributes-objc-experimental %s -o - | FileCheck %s
6+
// RUN: %clang_cc1 -emit-llvm -triple arm64e -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc %s -o - | FileCheck %s
77

88
#include <ptrcheck.h>
99
#include "mock-header.h"

clang/test/BoundsSafety-legacy-checks/CodeGen/array-bound-deref-addrof.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
// RUN: %clang_cc1 -O0 -triple arm64-apple-iphoneos -fbounds-safety -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-O0
55
// RUN: %clang_cc1 -O2 -triple arm64-apple-iphoneos -fbounds-safety -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-O2
6-
// RUN: %clang_cc1 -O0 -triple arm64-apple-iphoneos -fbounds-safety -x objective-c -fbounds-attributes-objc-experimental -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-O0
7-
// RUN: %clang_cc1 -O2 -triple arm64-apple-iphoneos -fbounds-safety -x objective-c -fbounds-attributes-objc-experimental -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-O2
6+
// RUN: %clang_cc1 -O0 -triple arm64-apple-iphoneos -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-O0
7+
// RUN: %clang_cc1 -O2 -triple arm64-apple-iphoneos -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-O2
88
#include <ptrcheck.h>
99

1010
// CHECK-O0-LABEL: @foo(

clang/test/BoundsSafety-legacy-checks/CodeGen/array-decay.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
// RUN: %clang_cc1 -O0 -triple arm64-apple-iphoneos -fbounds-safety -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-O0
44
// RUN: %clang_cc1 -O2 -triple arm64-apple-iphoneos -fbounds-safety -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-O2
5-
// RUN: %clang_cc1 -O0 -triple arm64-apple-iphoneos -fbounds-safety -x objective-c -fbounds-attributes-objc-experimental -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-O0
6-
// RUN: %clang_cc1 -O2 -triple arm64-apple-iphoneos -fbounds-safety -x objective-c -fbounds-attributes-objc-experimental -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-O2
5+
// RUN: %clang_cc1 -O0 -triple arm64-apple-iphoneos -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-O0
6+
// RUN: %clang_cc1 -O2 -triple arm64-apple-iphoneos -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-O2
77

88
// CHECK-O0-LABEL: @foo(
99
// CHECK-O0: {{.*}}:

clang/test/BoundsSafety-legacy-checks/CodeGen/const-bound-ptr-conversion.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
// RUN: %clang_cc1 -O0 -triple x86_64 -fbounds-safety -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK_O0
55
// RUN: %clang_cc1 -O2 -triple x86_64 -fbounds-safety -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK_O2
6-
// RUN: %clang_cc1 -O0 -triple x86_64 -fbounds-safety -x objective-c -fbounds-attributes-objc-experimental -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK_O0
7-
// RUN: %clang_cc1 -O2 -triple x86_64 -fbounds-safety -x objective-c -fbounds-attributes-objc-experimental -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK_O2
6+
// RUN: %clang_cc1 -O0 -triple x86_64 -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK_O0
7+
// 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
88
// CHECK_O0-LABEL: @foo(
99
// CHECK_O0: {{.*}}:
1010
// CHECK_O0: [[ARRAY:%.*]] = alloca [10 x i32], align 16

clang/test/BoundsSafety-legacy-checks/CodeGen/constant-eval-count-static-init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
// RUN: %clang_cc1 -triple x86_64 -fbounds-safety -emit-llvm %s -o - | FileCheck %s
5-
// RUN: %clang_cc1 -triple x86_64 -fbounds-safety -x objective-c -fbounds-attributes-objc-experimental -emit-llvm %s -o - | FileCheck %s
5+
// RUN: %clang_cc1 -triple x86_64 -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -emit-llvm %s -o - | FileCheck %s
66
#include <ptrcheck.h>
77

88
typedef struct {

clang/test/BoundsSafety-legacy-checks/CodeGen/count-return.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
// RUN: %clang_cc1 -O0 -triple x86_64 -fbounds-safety -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-O0
55
// RUN: %clang_cc1 -O2 -triple x86_64 -fbounds-safety -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-O2
6-
// RUN: %clang_cc1 -O0 -triple x86_64 -fbounds-safety -x objective-c -fbounds-attributes-objc-experimental -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-O0
7-
// RUN: %clang_cc1 -O2 -triple x86_64 -fbounds-safety -x objective-c -fbounds-attributes-objc-experimental -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-O2
6+
// RUN: %clang_cc1 -O0 -triple x86_64 -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-O0
7+
// 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
88
#include <ptrcheck.h>
99

1010
int *__sized_by(len) alloc(int len);

clang/test/BoundsSafety-legacy-checks/CodeGen/counted_by_or_null_call-O2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 4
22

33
// RUN: %clang_cc1 -O2 -triple arm64-apple-iphoneos -fbounds-safety -Wno-bounds-safety-init-list -emit-llvm %s -o - | FileCheck %s
4-
// RUN: %clang_cc1 -O2 -triple arm64-apple-iphoneos -fbounds-safety -x objective-c -fbounds-attributes-objc-experimental -Wno-bounds-safety-init-list -emit-llvm %s -o - | FileCheck %s
4+
// RUN: %clang_cc1 -O2 -triple arm64-apple-iphoneos -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -Wno-bounds-safety-init-list -emit-llvm %s -o - | FileCheck %s
55

66
#include <ptrcheck.h>
77

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 4
22

33
// RUN: %clang_cc1 -O0 -triple arm64-apple-iphoneos -fbounds-safety -Wno-bounds-safety-init-list -emit-llvm %s -o - | FileCheck %s
4-
// RUN: %clang_cc1 -O0 -triple arm64-apple-iphoneos -fbounds-safety -x objective-c -fbounds-attributes-objc-experimental -Wno-bounds-safety-init-list -emit-llvm %s -o - | FileCheck %s
4+
// RUN: %clang_cc1 -O0 -triple arm64-apple-iphoneos -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -Wno-bounds-safety-init-list -emit-llvm %s -o - | FileCheck %s
55

66
#include <ptrcheck.h>
77

clang/test/BoundsSafety-legacy-checks/CodeGen/counted_by_to_counted_by-O2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
// RUN: %clang_cc1 -O2 -fbounds-safety -triple x86_64 -emit-llvm %s -o - | FileCheck %s
5-
// RUN: %clang_cc1 -O2 -fbounds-safety -x objective-c -fbounds-attributes-objc-experimental -triple x86_64 -emit-llvm %s -o - | FileCheck %s
5+
// RUN: %clang_cc1 -O2 -fbounds-safety -x objective-c -fexperimental-bounds-safety-objc -triple x86_64 -emit-llvm %s -o - | FileCheck %s
66

77
#include <ptrcheck.h>
88

0 commit comments

Comments
 (0)