[BoundsSafety] Rename experimental C++ and Objective-C flags and make them CC1 only #10668
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.-fbounds-attributes-cxx-experimental
->-fexperimental-bounds-safety-cxx
-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
(cherry picked from commit cf995c3)
This is a cherry-pick of #10635
Conflicts:
clang/test/BoundsSafety-legacy-checks/AST/SystemHeaders/builtin-function-main.c
clang/test/BoundsSafety/AST/builtin-memcpy-count-annotation.c
clang/test/BoundsSafety/AST/system-merge-dynamic-bound-attr.c
clang/test/BoundsSafety/AST/typedef-function-attrs-late-parsed-call.c
clang/test/BoundsSafety/AST/unify-auto.cpp
clang/test/BoundsSafety/CodeGen/compound-literal-counted_by-O2.c
clang/test/BoundsSafety/CodeGen/compound-literal-sized_by-O2.c
clang/test/BoundsSafety/CodeGen/ended_by_locals.c
clang/test/BoundsSafety/CodeGen/init-global-indexable-with-null.c
clang/test/BoundsSafety/CodeGen/terminated-by-to-indexable-loop-O2.c
clang/test/BoundsSafety/Sema/dynamic-count-ptr-null.c
clang/test/BoundsSafety/Sema/static-bound-ptr-init.c
clang/utils/bounds_safety_fixup_codegen_tests.sh