aboutsummaryrefslogtreecommitdiff
path: root/clang/docs
diff options
context:
space:
mode:
authorNikolas Klauser <nikolasklauser@berlin.de>2023-07-22 09:33:55 -0700
committerNikolas Klauser <nikolasklauser@berlin.de>2023-07-22 09:34:15 -0700
commit874217f99b99ab3c9026dc3b7bd84cd2beebde6e (patch)
treeb0720a4d0a56ba849139ee2723a81acbc89c99f5 /clang/docs
parent1d0759e6c3c2eaa8cbacfd76d409ed80ffd9fe9d (diff)
downloadllvm-874217f99b99ab3c9026dc3b7bd84cd2beebde6e.zip
llvm-874217f99b99ab3c9026dc3b7bd84cd2beebde6e.tar.gz
llvm-874217f99b99ab3c9026dc3b7bd84cd2beebde6e.tar.bz2
[clang] Enable C++11-style attributes in all language modes
This also ignores and deprecates the `-fdouble-square-bracket-attributes` command line flag, which seems to not be used anywhere. At least a code search exclusively found mentions of it in documentation: https://sourcegraph.com/search?q=context:global+-fdouble-square-bracket-attributes+-file:clang/*+-file:test/Sema/*+-file:test/Parser/*+-file:test/AST/*+-file:test/Preprocessor/*+-file:test/Misc/*+archived:yes&patternType=standard&sm=0&groupBy=repo RFC: https://discourse.llvm.org/t/rfc-enable-c-11-c2x-attributes-in-all-standard-modes-as-an-extension-and-remove-fdouble-square-bracket-attributes This enables `[[]]` attributes in all C and C++ language modes without warning by default. `-Wc++-extensions` does warn. GCC has enabled this extension in all C modes since GCC 10. Reviewed By: aaron.ballman, MaskRay Spies: #clang-vendors, beanz, JDevlieghere, Michael137, MaskRay, sstefan1, jplehr, cfe-commits, lldb-commits, dmgreen, jdoerfert, wenlei, wlei Differential Revision: https://reviews.llvm.org/D151683
Diffstat (limited to 'clang/docs')
-rw-r--r--clang/docs/LanguageExtensions.rst13
-rw-r--r--clang/docs/ReleaseNotes.rst3
2 files changed, 10 insertions, 6 deletions
diff --git a/clang/docs/LanguageExtensions.rst b/clang/docs/LanguageExtensions.rst
index 38a73f3..6705ee1 100644
--- a/clang/docs/LanguageExtensions.rst
+++ b/clang/docs/LanguageExtensions.rst
@@ -1429,15 +1429,15 @@ More information could be found `here <https://clang.llvm.org/docs/Modules.html>
Language Extensions Back-ported to Previous Standards
=====================================================
-====================================== ================================ ============= ============= ==================================
-Feature Feature Test Macro Introduced In Backported To Required Flags
-====================================== ================================ ============= ============= ==================================
+====================================== ================================ ============= =============
+Feature Feature Test Macro Introduced In Backported To
+====================================== ================================ ============= =============
variadic templates __cpp_variadic_templates C++11 C++03
Alias templates __cpp_alias_templates C++11 C++03
Non-static data member initializers __cpp_nsdmi C++11 C++03
Range-based ``for`` loop __cpp_range_based_for C++11 C++03
RValue references __cpp_rvalue_references C++11 C++03
-Attributes __cpp_attributes C++11 C++03 -fdouble-square-bracket-attributes
+Attributes __cpp_attributes C++11 C++03
variable templates __cpp_variable_templates C++14 C++03
Binary literals __cpp_binary_literals C++14 C++03
Relaxed constexpr __cpp_constexpr C++14 C++11
@@ -1457,10 +1457,11 @@ Conditional ``explicit`` __cpp_conditional_explicit C++20
``using enum`` __cpp_using_enum C++20 C++03
``if consteval`` __cpp_if_consteval C++23 C++20
``static operator()`` __cpp_static_call_operator C++23 C++03
--------------------------------------- -------------------------------- ------------- ------------- ----------------------------------
+-------------------------------------- -------------------------------- ------------- -------------
Designated initializers (N494) C99 C89
Array & element qualification (N2607) C2x C89
-====================================== ================================ ============= ============= ==================================
+Attributes (N2335) C2x C89
+====================================== ================================ ============= =============
Type Trait Primitives
=====================
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index f412e79..1944605 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -277,6 +277,9 @@ New Compiler Flags
Deprecated Compiler Flags
-------------------------
+- ``-fdouble-square-bracket-attributes`` has been deprecated. It is ignored now
+ and will be removed in Clang 18.
+
Modified Compiler Flags
-----------------------