[PATCH] D55741: Implementation Feature Test Macros for P0722R3
Chris Kennelly via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Dec 15 21:04:46 PST 2018
ckennelly created this revision.
ckennelly added a reviewer: rsmith.
Herald added a subscriber: cfe-commits.
P1353R0, adopted in San Diego, specified an implementation feature test macro for destroying delete (P0722R3).
The implementation of the feature (https://reviews.llvm.org/rL315662) is not guarded behind a flag, so the macro is not conditional on language version.
Repository:
rC Clang
https://reviews.llvm.org/D55741
Files:
lib/Frontend/InitPreprocessor.cpp
test/Lexer/cxx-features.cpp
Index: test/Lexer/cxx-features.cpp
===================================================================
--- test/Lexer/cxx-features.cpp
+++ test/Lexer/cxx-features.cpp
@@ -34,6 +34,10 @@
#error "wrong value for __cpp_char8_t"
#endif
+#if check(impl_destroying_delete, 201806, 201806, 201806, 201806, 201806)
+#error "wrong value for __cpp_impl_destroying_delete"
+#endif
+
// --- C++17 features ---
#if check(hex_float, 0, 0, 0, 201603, 201603)
Index: lib/Frontend/InitPreprocessor.cpp
===================================================================
--- lib/Frontend/InitPreprocessor.cpp
+++ lib/Frontend/InitPreprocessor.cpp
@@ -543,6 +543,7 @@
// C++20 features.
if (LangOpts.Char8)
Builder.defineMacro("__cpp_char8_t", "201811L");
+ Builder.defineMacro("__cpp_impl_destroying_delete", "201806L");
// TS features.
if (LangOpts.ConceptsTS)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55741.178384.patch
Type: text/x-patch
Size: 872 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181216/94d7d8a5/attachment.bin>
More information about the cfe-commits
mailing list