[PATCH] D150321: [clang] Document extensions from later standards

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 11 07:41:38 PDT 2023


aaron.ballman added a comment.

Thank you for working on this! Just a few questions, but in general, this is looking good.



================
Comment at: clang/docs/LanguageExtensions.rst:1386
+Relaxed constexpr                   __cpp_constexpr                  C++14         C++11
+Designated initializers             __cpp_designated_initializers    C++20         C++03
+Attributes on enums                 __cpp_enumerator_attributes      C++17         C++11
----------------
This brings up a few questions for me: how should we handle C? For example, designated initializers also exist in C99 and are backported to C89? And how should we handle C features extended into C++ (or vice versa)?

Should we have multiple tables? Should we try to put both languages into one table with different columns?

(I'm not asking you to sign up to figure out the C extensions, just trying to get an idea for whether we want to change the layout of this table to account for that sort of thing.)


================
Comment at: clang/docs/LanguageExtensions.rst:1387
+Designated initializers             __cpp_designated_initializers    C++20         C++03
+Attributes on enums                 __cpp_enumerator_attributes      C++17         C++11
+Guaranteed copy elision             __cpp_guaranteed_copy_elision    C++17         C++03
----------------
What are your thoughts on extensions enabled by a feature flag? e.g., https://godbolt.org/z/ex9K5dzv6


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150321/new/

https://reviews.llvm.org/D150321



More information about the cfe-commits mailing list