Skip to content

Commit a00bbcb

Browse files
authored
[libc++] Remove _LIBCPP_DISABLE_ADDITIONAL_DIAGNOSTICS (#90512)
I strongly suspect nobody ever used that macro since it wasn't very well known. Furthermore, it only affects a handful of diagnostics and I think it makes sense to either provide them unconditionally, or to not provided them at all.
1 parent 4cbe760 commit a00bbcb

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

libcxx/docs/ReleaseNotes/19.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ Deprecations and Removals
118118
a ``std::basic_*fstream`` from a ``std::basic_string_view``, a input-iterator or a C-string, instead
119119
you can construct a temporary ``std::basic_string``. This change has been applied to C++17 and later.
120120

121+
- The ``_LIBCPP_DISABLE_ADDITIONAL_DIAGNOSTICS`` macro has been removed and is not honored anymore. Additional
122+
warnings provided by libc++ as a matter of QoI will now be provided unconditionally.
123+
121124

122125
Upcoming Deprecations and Removals
123126
----------------------------------

libcxx/docs/UsingLibcxx.rst

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,6 @@ safety annotations.
167167
build of libc++ which does not export any symbols, which can be useful when
168168
building statically for inclusion into another library.
169169

170-
**_LIBCPP_DISABLE_ADDITIONAL_DIAGNOSTICS**:
171-
This macro disables the additional diagnostics generated by libc++ using the
172-
`diagnose_if` attribute. These additional diagnostics include checks for:
173-
174-
* Giving `set`, `map`, `multiset`, `multimap` and their `unordered_`
175-
counterparts a comparator which is not const callable.
176-
* Giving an unordered associative container a hasher that is not const
177-
callable.
178-
179170
**_LIBCPP_NO_VCRUNTIME**:
180171
Microsoft's C and C++ headers are fairly entangled, and some of their C++
181172
headers are fairly hard to avoid. In particular, `vcruntime_new.h` gets pulled

libcxx/include/__config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1390,7 +1390,7 @@ typedef __char32_t char32_t;
13901390
# define _LIBCPP_NO_DESTROY
13911391
# endif
13921392

1393-
# if __has_attribute(__diagnose_if__) && !defined(_LIBCPP_DISABLE_ADDITIONAL_DIAGNOSTICS)
1393+
# if __has_attribute(__diagnose_if__)
13941394
# define _LIBCPP_DIAGNOSE_WARNING(...) __attribute__((__diagnose_if__(__VA_ARGS__, "warning")))
13951395
# else
13961396
# define _LIBCPP_DIAGNOSE_WARNING(...)

0 commit comments

Comments
 (0)