llvm-project/libcxx
Eric Fiselier b1e7a12ee8 Add _LIBCPP_DIAGNOSE_WARNING and _LIBCPP_DIAGNOSE_ERROR macros.
Clang recently added a `diagnose_if(cond, msg, type)` attribute
which can be used to generate diagnostics when `cond` is a constant
expression that evaluates to true. Otherwise no attribute has no
effect.

This patch adds _LIBCPP_DIAGNOSE_ERROR/WARNING macros which
use this new attribute. Additionally this patch implements
a diagnostic message when a non-const-callable comparator is
given to a container.

Note: For now the warning version of the diagnostic is useless
within libc++ since warning diagnostics are suppressed by the
system header pragma. I'm going to work on fixing this.

llvm-svn: 291961
2017-01-13 22:02:08 +00:00
..
benchmarks improve performance of string::find 2016-12-30 18:01:36 +00:00
cmake Revert "[CMake][libcxx] Move Python check to main CMake file" 2017-01-11 23:56:33 +00:00
docs Add _LIBCPP_DIAGNOSE_WARNING and _LIBCPP_DIAGNOSE_ERROR macros. 2017-01-13 22:02:08 +00:00
include Add _LIBCPP_DIAGNOSE_WARNING and _LIBCPP_DIAGNOSE_ERROR macros. 2017-01-13 22:02:08 +00:00
lib Update version to 5.0 2017-01-13 18:29:56 +00:00
src [libc++] Pair _aligned_malloc with _aligned_free 2017-01-12 06:22:36 +00:00
test Add _LIBCPP_DIAGNOSE_WARNING and _LIBCPP_DIAGNOSE_ERROR macros. 2017-01-13 22:02:08 +00:00
utils Fix creating __generated_config on Windows 2017-01-03 03:55:29 +00:00
www Implement P0403R1 - 'Literal suffixes for basic_string_view'. Requires clang 4.0 (specifically, r290744) 2017-01-09 18:07:34 +00:00
.arcconfig Upgrade arcconfig to use https 2016-07-18 02:02:49 +00:00
.clang-format clang-format: tweak configuration 2017-01-03 04:23:52 +00:00
.gitignore Implement N4606 optional 2016-10-12 07:46:20 +00:00
CMakeLists.txt Revert "[CMake][libcxx] Move Python check to main CMake file" 2017-01-11 23:56:33 +00:00
CREDITS.TXT Added "Michael Park" to `CREDITS.TXT`. 2017-01-07 10:19:24 +00:00
LICENSE.TXT Update year to 2017 2017-01-03 11:20:43 +00:00
NOTES.TXT Update doc and various cleanup 2016-12-23 20:00:13 +00:00
TODO.TXT Update doc and various cleanup 2016-12-23 20:00:13 +00:00