Skip to content

Commit c9ea73b

Browse files
author
git apple-llvm automerger
committed
Merge commit 'a02ee2f6ff2e' from llvm.org/release/19.x into stable/20240723
2 parents 53235b3 + a02ee2f commit c9ea73b

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

clang/docs/LanguageExtensions.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1503,6 +1503,7 @@ Conditional ``explicit`` __cpp_conditional_explicit C+
15031503
``static operator()`` __cpp_static_call_operator C++23 C++03
15041504
Attributes on Lambda-Expressions C++23 C++11
15051505
Attributes on Structured Bindings __cpp_structured_bindings C++26 C++03
1506+
Pack Indexing __cpp_pack_indexing C++26 C++03
15061507
``= delete ("should have a reason");`` __cpp_deleted_function C++26 C++03
15071508
-------------------------------------------- -------------------------------- ------------- -------------
15081509
Designated initializers (N494) C99 C89

clang/lib/Frontend/InitPreprocessor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,7 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts,
763763
Builder.defineMacro("__cpp_placeholder_variables", "202306L");
764764

765765
// C++26 features supported in earlier language modes.
766+
Builder.defineMacro("__cpp_pack_indexing", "202311L");
766767
Builder.defineMacro("__cpp_deleted_function", "202403L");
767768

768769
if (LangOpts.Char8)

clang/test/Lexer/cxx-features.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838
#error "wrong value for __cpp_deleted_function"
3939
#endif
4040

41+
#if check(pack_indexing, 202311, 202311, 202311, 202311, 202311, 202311, 202311)
42+
#error "wrong value for __cpp_pack_indexing"
43+
#endif
44+
4145
#if check(placeholder_variables, 202306, 202306, 202306, 202306, 202306, 202306, 202306)
4246
#error "wrong value for __cpp_placeholder_variables"
4347
#endif

0 commit comments

Comments
 (0)