Lines Matching +full:no +full:- +full:memory +full:- +full:wc

1 // -*- C++ -*-
2 //===----------------------------------------------------------------------===//
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 //===----------------------------------------------------------------------===//
41 // This is for backward compatibility -- make enabling `_LIBCPP_ENABLE_ASSERTIONS` (which predates hardening modes)
55 // - `_LIBCPP_HARDENING_MODE_NONE`;
56 // - `_LIBCPP_HARDENING_MODE_FAST`;
57 // - `_LIBCPP_HARDENING_MODE_EXTENSIVE`;
58 // - `_LIBCPP_HARDENING_MODE_DEBUG`.
62 // - `_LIBCPP_HARDENING_MODE_NONE` -- sets the hardening mode to "none" which disables all runtime hardening checks;
64 // - `_LIBCPP_HARDENING_MODE_FAST` -- sets that hardening mode to "fast". The fast mode enables security-critical checks
67 // - `_LIBCPP_HARDENING_MODE_EXTENSIVE` -- sets the hardening mode to "extensive". The extensive mode is a superset of
69 // but are not necessarily security-critical;
71 // - `_LIBCPP_HARDENING_MODE_DEBUG` -- sets the hardening mode to "debug". The debug mode is a superset of the extensive
75 // Inside the library, assertions are categorized so they can be cherry-picked based on the chosen hardening mode. These
76 // macros are only for internal use -- users should only pick one of the high-level hardening modes described above.
78 // - `_LIBCPP_ASSERT_VALID_INPUT_RANGE` -- checks that ranges (whether expressed as an iterator pair, an iterator and
80 // - the sentinel is reachable from the begin iterator;
81 // - TODO(hardening): both iterators refer to the same container.
83 // - `_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS` -- checks that any attempts to access a container element, whether through
85 // a non-existent element. For iterator checks to work, bounded iterators must be enabled in the ABI. Types like
86 // `optional` and `function` are considered one-element containers for the purposes of this check.
88 // - `_LIBCPP_ASSERT_NON_NULL` -- checks that the pointer being dereferenced is not null. On most modern platforms zero
89 // address does not refer to an actual location in memory, so a null pointer dereference would not compromize the
90 // memory security of a program (however, it is still undefined behavior that can result in strange errors due to
93 // - `_LIBCPP_ASSERT_NON_OVERLAPPING_RANGES` -- for functions that take several ranges as arguments, checks that the
96 // - `_LIBCPP_ASSERT_VALID_DEALLOCATION` -- checks that an attempt to deallocate memory is valid (e.g. the given object
97 // was allocated by the given allocator). Violating this category typically results in a memory leak.
99 // - `_LIBCPP_ASSERT_VALID_EXTERNAL_API_CALL` -- checks that a call to an external API doesn't fail in
102 // (from system calls to compiler intrinsics). We generally don't expect these failures to compromize memory safety or
105 // - `_LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR` -- checks any operations that exchange nodes between containers to make sure
108 // - `_LIBCPP_ASSERT_ARGUMENT_WITHIN_DOMAIN` -- checks that the given argument is within the domain of valid arguments
112 // which doesn't cause any immediate issues in the library -- whatever the consequences are, they will happen in the
115 // - `_LIBCPP_ASSERT_PEDANTIC` -- checks prerequisites which are imposed by the Standard, but violating which happens to
118 // - `_LIBCPP_ASSERT_SEMANTIC_REQUIREMENT` -- checks that the given argument satisfies the semantic requirements imposed
119 // by the Standard. Typically, there is no simple way to completely prove that a semantic requirement is satisfied;
122 // - `_LIBCPP_ASSERT_INTERNAL` -- checks that internal invariants of the library hold. These assertions don't depend on
125 // - `_LIBCPP_ASSERT_UNCATEGORIZED` -- for assertions that haven't been properly classified yet.
127 // clang-format off
132 // clang-format on
160 // NOLINTNEXTLINE(libcpp-cpp-version-check)
201 # error "libc++ only supports C++03 with Clang-based compilers. Please enable C++11"
249 // Both MinGW and native MSVC provide a "MSVC"-like environment
263 // The size of wchar is 2 byte on 32-bit mode on AIX.
279 // is the recommended source of entropy for user-space programs.
281 // constructor *must* be "/dev/urandom" -- anything else is an error.
286 // constructor *must* be "/dev/urandom" -- anything else is an error.
290 // deliver high-quality entropy and cannot fail.
292 // constructor *must* be "/dev/urandom" -- anything else is an error.
299 // constructor *must* be "/dev/urandom" -- anything else is an error.
304 // constructor *must* be "/dev/urandom" -- anything else is an error.
353 // Objective-C++ features (opt-in)
522 // 2. The symbol is given an ABI tag that encodes the ODR-relevant properties of the library.
523 // This ensures that no ODR violation can arise from mixing two TUs compiled with different
524 // versions or configurations of libc++ (such as exceptions vs no-exceptions). Indeed, if the
525 // program contains two definitions of a function, the ODR requires them to be token-by-token
532 // and the other aborts the program). This violates the ODR and makes the program ill-formed, and in
536 // A similar reasoning holds for many other properties that are ODR-affecting. Essentially any
538 // can be considered ODR-affecting. In practice, we don't encode all such properties in the ABI
543 // force-inlining all functions or giving internal linkage to all functions. Both these previous
555 // the implementation of a virtual function in an ABI-incompatible way in the first place,
566 // use compression mangling instead, see https://github.com/itanium-cxx-abi/cxx-abi/issues/70.
587 # if __has_warning("-Wc++23-extensions")
588 # define _LIBCPP_CLANG_DIAGNOSTIC_IGNORED_CXX23_EXTENSION _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wc++23-extensions")
590 # define _LIBCPP_CLANG_DIAGNOSTIC_IGNORED_CXX23_EXTENSION _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wc++2b-extensions")
599 _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wc++11-extensions") \
600 _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wc++14-extensions") \
601 _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wc++17-extensions") \
602 _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wc++20-extensions") \
604 _LIBCPP_GCC_DIAGNOSTIC_IGNORED("-Wc++14-extensions") \
605 _LIBCPP_GCC_DIAGNOSTIC_IGNORED("-Wc++17-extensions") \
606 _LIBCPP_GCC_DIAGNOSTIC_IGNORED("-Wc++20-extensions") \
607 _LIBCPP_GCC_DIAGNOSTIC_IGNORED("-Wc++23-extensions")
615 // clang-format off
631 // clang-format on
645 // clang-format off
652 // clang-format on
709 // Deprecations warnings are always enabled, except when users explicitly opt-out
730 "using -std=c++20 if you need to use these facilities.")
780 _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wdeprecated\"") \
781 _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
829 // clang-format off
846 // clang-format on
854 # error "No thread API"
889 // mutexes have no destroy mechanism.
897 // clang-format off
901 // clang-format on
972 // when compiling for CUDA we use the non-underscored version of the noinline
978 // See https://github.com/llvm/llvm-project/pull/73838 for more details.
988 // disabling it without having to resort to #if-#endif, which has a larger
996 // clang-format off
999 // clang-format on
1011 // Configures the fopen close-on-exec mode character, if any. This string will
1014 // Not all platforms support this, but it helps avoid fd-leaks on platforms that
1023 // MSVC implements [[no_unique_address]] as a silent no-op currently.
1028 // Clang-cl does not yet (14.0) implement either [[no_unique_address]] or
1036 // Note that this can be replaced by #error as soon as clang-cl
1037 // implements msvc::no_unique_address, since there should be no C++20
1039 // We generally don't want to use this macro outside of C++20-only code,
1063 // '-Wctad-maybe-unsupported' compiler warning when CTAD is used in user code
1069 [[maybe_unused]] _ClassName(typename _Tag::__allow_ctad...)->_ClassName<_Tag...>
1073 ClassName(typename _Tag::__allow_ctad...)->ClassName<_Tag...>
1079 // TODO(varconst): currently, there are bugs in Clang's intrinsics when handling Objective-C++ `id`, so don't use
1080 // compiler intrinsics in the Objective-C++ mode.
1099 // NAME - the name of the functor
1100 // OP - type of the callable object with the reduction operation
1101 // omp_in - refers to the local partial result
1102 // omp_out - refers to the final value of the combiner operator
1103 // omp_priv - refers to the private copy of the initial value
1104 // omp_orig - refers to the original variable to be reduced
1132 // Optional attributes - these are useful for a better QoI, but not required to be available
1219 // The attribute uses 1-based indices for ordinary and static member functions.
1220 // The attribute uses 2-based indices for non-static member functions.
1239 // Allow for build-time disabling of unsigned integer sanitization
1241 # define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK __attribute__((__no_sanitize__("unsigned-integer-overflow")))
1246 // Clang-18 has support for deducing this, but it does not set the FTM.