philnik created this revision.
philnik added reviewers: aaron.ballman, erichkeane.
Herald added subscribers: wlei, wenlei, jdoerfert, dmgreen.
Herald added a project: All.
philnik requested review of this revision.
Herald added subscribers: lldb-commits, cfe-commits, jplehr, sstefan1, MaskRay.
Herald added a reviewer: jdoerfert.
Herald added projects: clang, LLDB.

This also removes 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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D151683

Files:
  clang/docs/LanguageExtensions.rst
  clang/include/clang/Basic/DiagnosticParseKinds.td
  clang/include/clang/Basic/LangOptions.def
  clang/include/clang/Driver/Options.td
  clang/include/clang/Parse/Parser.h
  clang/lib/Basic/Attributes.cpp
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/lib/Lex/Lexer.cpp
  clang/lib/Parse/ParseDecl.cpp
  clang/lib/Parse/ParseDeclCXX.cpp
  clang/test/AST/ast-dump-attr.m
  clang/test/AST/ast-dump-c-attr.c
  clang/test/AST/attr-annotate-type.c
  clang/test/CodeGen/attr-btf_type_tag-func.c
  clang/test/CodeGen/attr-btf_type_tag-var.c
  clang/test/Frontend/noderef.c
  clang/test/OpenMP/assumes_messages_attr.c
  clang/test/OpenMP/openmp_attribute_compat.cpp
  clang/test/Parser/asm.c
  clang/test/Parser/c2x-attributes.c
  clang/test/Parser/c2x-attributes.m
  clang/test/Parser/cxx-decl.cpp
  clang/test/Parser/objc-attr.m
  clang/test/ParserHLSL/group_shared.hlsl
  clang/test/Preprocessor/has_c_attribute.c
  clang/test/Sema/annotate-type.c
  clang/test/Sema/annotate.c
  clang/test/Sema/attr-availability-square-brackets.c
  clang/test/Sema/attr-external-source-symbol-cxx.cpp
  clang/test/Sema/attr-external-source-symbol.c
  clang/test/Sema/attr-likelihood.c
  clang/test/Sema/attr-objc-bridge-related.m
  clang/test/Sema/attr-regparm.c
  clang/test/Sema/attr-type-safety.c
  clang/test/Sema/c2x-noreturn.c
  clang/test/Sema/internal_linkage.c
  clang/test/Sema/matrix-type-builtins.c
  clang/test/Sema/neon-vector-types.c
  clang/test/Sema/overload-arm-mve.c
  clang/test/Sema/overloadable.c
  clang/test/Sema/vector-gcc-compat.c
  clang/test/SemaCXX/attr-cxx-disabled.cpp
  clang/test/SemaObjC/attr-objc-gc.m
  clang/unittests/AST/AttrTest.cpp
  clang/utils/TableGen/ClangAttrEmitter.cpp
  lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp

Index: lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
===================================================================
--- lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
+++ lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
@@ -575,7 +575,6 @@
     // FIXME: We should ask the driver for the appropriate default flags.
     lang_opts.GNUMode = true;
     lang_opts.GNUKeywords = true;
-    lang_opts.DoubleSquareBracketAttributes = true;
     lang_opts.CPlusPlus11 = true;
 
     // The Darwin libc expects this macro to be set.
Index: clang/utils/TableGen/ClangAttrEmitter.cpp
===================================================================
--- clang/utils/TableGen/ClangAttrEmitter.cpp
+++ clang/utils/TableGen/ClangAttrEmitter.cpp
@@ -3387,14 +3387,10 @@
       // If this is the C++11 variety, also add in the LangOpts test.
       if (Variety == "CXX11")
         Test += " && LangOpts.CPlusPlus11";
-      else if (Variety == "C2x")
-        Test += " && LangOpts.DoubleSquareBracketAttributes";
     } else if (Variety == "CXX11")
       // C++11 mode should be checked against LangOpts, which is presumed to be
       // present in the caller.
       Test = "LangOpts.CPlusPlus11";
-    else if (Variety == "C2x")
-      Test = "LangOpts.DoubleSquareBracketAttributes";
 
     std::string TestStr = !Test.empty()
                               ? Test + " ? " + llvm::itostr(Version) + " : 0"
Index: clang/unittests/AST/AttrTest.cpp
===================================================================
--- clang/unittests/AST/AttrTest.cpp
+++ clang/unittests/AST/AttrTest.cpp
@@ -157,7 +157,7 @@
   AST = buildASTFromCodeWithArgs(R"c(
     __auto_type [[clang::annotate_type("auto")]] auto_var = 1;
   )c",
-                                 {"-fdouble-square-bracket-attributes"},
+                                 {},
                                  "input.c");
 
   {
Index: clang/test/SemaObjC/attr-objc-gc.m
===================================================================
--- clang/test/SemaObjC/attr-objc-gc.m
+++ clang/test/SemaObjC/attr-objc-gc.m
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fdouble-square-bracket-attributes -verify %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify %s
 static id __attribute((objc_gc(weak))) a;
 static id __attribute((objc_gc(strong))) b;
 
Index: clang/test/SemaCXX/attr-cxx-disabled.cpp
===================================================================
--- clang/test/SemaCXX/attr-cxx-disabled.cpp
+++ clang/test/SemaCXX/attr-cxx-disabled.cpp
@@ -1,12 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -fno-double-square-bracket-attributes -verify -pedantic -std=c++11 -DERRORS %s
-// RUN: %clang_cc1 -fsyntax-only -fdouble-square-bracket-attributes -verify -pedantic -std=c++11 %s
+// RUN: %clang_cc1 -fsyntax-only -verify -pedantic -std=c++11 -DERRORS %s
 
 struct [[]] S {};
 
-#ifdef ERRORS
-// expected-error@-3 {{declaration of anonymous struct must be a definition}}
-// expected-warning@-4 {{declaration does not declare anything}}
-#else
 // expected-no-diagnostics
-#endif
-
Index: clang/test/Sema/vector-gcc-compat.c
===================================================================
--- clang/test/Sema/vector-gcc-compat.c
+++ clang/test/Sema/vector-gcc-compat.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -verify -fsyntax-only -fdouble-square-bracket-attributes -Weverything -Wno-unused-but-set-variable -triple x86_64-apple-darwin10
+// RUN: %clang_cc1 %s -verify -fsyntax-only -Weverything -Wno-unused-but-set-variable -triple x86_64-apple-darwin10
 
 // Test the compatibility of clang's vector extensions with gcc's vector
 // extensions for C. Notably &&, ||, ?: and ! are not available.
@@ -20,17 +20,14 @@
 // Verify that we can use the [[]] spelling of the attribute.
 // We intentionally use the same type alias name to check that both versions
 // define the same type.
-// FIXME: Warnings are nuisance warnings due to the `-Weverything` flag, but
-// we shouldn't really be emitting them in C mode with the
-// `-fdouble-square-bracket-attributes` flag.
-typedef long long v2i64 [[gnu::vector_size(16)]]; // expected-warning{{C++11 attribute syntax is incompatible with C++98}}
-typedef int v2i32 [[gnu::vector_size(8)]]; // expected-warning{{C++11 attribute syntax is incompatible with C++98}}
+typedef long long v2i64 [[gnu::vector_size(16)]]; // expected-warning{{[[]] attributes are a C2x extension}}
+typedef int v2i32 [[gnu::vector_size(8)]]; // expected-warning{{[[]] attributes are a C2x extension}}
 
 // Check various positions where the [[]] spelling can or cannot be used.
-[[gnu::vector_size(16)]] typedef long long v2i64; // expected-warning{{C++11 attribute syntax is incompatible with C++98}}
+[[gnu::vector_size(16)]] typedef long long v2i64; // expected-warning{{[[]] attributes are a C2x extension}}
 typedef long long [[gnu::vector_size(16)]] v2i64_ignored;
   // expected-warning@-1{{'vector_size' attribute ignored}}
-  // expected-warning@-2{{C++11 attribute syntax is incompatible with C++98}}
+  // expected-warning@-2{{[[]] attributes are a C2x extension}}
 // FIXME: Contrary to the error message that we emit, GCC does actually allow
 // the attribute in the following position. Somewhat surprisingly, the attribute
 // is applied not to the pointer but to the base type, i.e. this declaration has
@@ -38,10 +35,10 @@
 typedef long long *[[gnu::vector_size(16)]] v2i64_doesnt_work;
   // expected-error@-1{{invalid vector element type 'long long *'}}
   // expected-warning@-2{{GCC does not allow the 'vector_size' attribute to be written on a type}}
-  // expected-warning@-3{{C++11 attribute syntax is incompatible with C++98}}
+  // expected-warning@-3{{[[]] attributes are a C2x extension}}
 
 // Verify that we can use the attribute outside of a typedef.
-static int v2i32_var [[gnu::vector_size(8)]]; // expected-warning{{C++11 attribute syntax is incompatible with C++98}}
+static int v2i32_var [[gnu::vector_size(8)]]; // expected-warning{{[[]] attributes are a C2x extension}}
 
 void arithmeticTest(void);
 void logicTest(void);
Index: clang/test/Sema/overloadable.c
===================================================================
--- clang/test/Sema/overloadable.c
+++ clang/test/Sema/overloadable.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -fdouble-square-bracket-attributes -verify %s -Wincompatible-pointer-types -Wno-strict-prototypes
+// RUN: %clang_cc1 -fsyntax-only -verify %s -Wincompatible-pointer-types -Wno-strict-prototypes
 
 int var __attribute__((overloadable)); // expected-error{{'overloadable' attribute only applies to functions}}
 void bad_attr_target(int) [[clang::overloadable]]; // expected-error{{'overloadable' attribute cannot be applied to types}}
@@ -74,7 +74,7 @@
   f1();
 }
 
-// Validate that the invalid function doesn't stay overloadable. 
+// Validate that the invalid function doesn't stay overloadable.
 int __attribute__((overloadable)) invalid(); // expected-error{{'overloadable' function 'invalid' must have a prototype}}
 int __attribute__((overloadable)) invalid(int); // expected-error{{redeclaration of 'invalid' must not have the 'overloadable' attribute}}
                                                 // expected-note@-2{{previous unmarked overload of function is here}}
Index: clang/test/Sema/overload-arm-mve.c
===================================================================
--- clang/test/Sema/overload-arm-mve.c
+++ clang/test/Sema/overload-arm-mve.c
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -flax-vector-conversions=all -fdouble-square-bracket-attributes -Werror -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -flax-vector-conversions=all -fdouble-square-bracket-attributes -verify -fsyntax-only -DERROR_CHECK %s
+// RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -flax-vector-conversions=all -Werror -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -flax-vector-conversions=all -verify -fsyntax-only -DERROR_CHECK %s
 
 typedef   signed short      int16_t;
 typedef   signed int        int32_t;
Index: clang/test/Sema/neon-vector-types.c
===================================================================
--- clang/test/Sema/neon-vector-types.c
+++ clang/test/Sema/neon-vector-types.c
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 %s -triple armv7 -target-feature +neon -fsyntax-only -fdouble-square-bracket-attributes -verify
-// RUN: %clang_cc1 %s -triple armv8 -target-feature +neon -fsyntax-only -fdouble-square-bracket-attributes -verify
+// RUN: %clang_cc1 %s -triple armv7 -target-feature +neon -fsyntax-only -verify
+// RUN: %clang_cc1 %s -triple armv8 -target-feature +neon -fsyntax-only -verify
 
 typedef float float32_t;
 typedef signed char poly8_t;
Index: clang/test/Sema/matrix-type-builtins.c
===================================================================
--- clang/test/Sema/matrix-type-builtins.c
+++ clang/test/Sema/matrix-type-builtins.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -fenable-matrix -fdouble-square-bracket-attributes -pedantic -verify -triple=x86_64-apple-darwin9
+// RUN: %clang_cc1 %s -fenable-matrix -pedantic -verify -triple=x86_64-apple-darwin9
 
 typedef float sx5x10_t __attribute__((matrix_type(5, 10)));
 typedef int ix3x2_t __attribute__((matrix_type(3, 2)));
@@ -8,17 +8,17 @@
 // Verify that we can use the [[]] spelling of the attribute.
 // We intentionally use the same type alias name to check that both versions
 // define the same type.
-typedef float [[clang::matrix_type(5, 10)]] sx5x10_t;
-typedef int [[clang::matrix_type(3, 2)]] ix3x2_t;
-[[clang::matrix_type(5, 10)]] typedef float sx5x10_t;
+typedef float [[clang::matrix_type(5, 10)]] sx5x10_t; // expected-warning {{[[]] attributes are a C2x extension}}
+typedef int [[clang::matrix_type(3, 2)]] ix3x2_t; // expected-warning {{[[]] attributes are a C2x extension}}
+[[clang::matrix_type(5, 10)]] typedef float sx5x10_t; // expected-warning {{[[]] attributes are a C2x extension}}
 // expected-warning@-1 {{applying attribute 'matrix_type' to a declaration is deprecated; apply it to the type instead}}
-[[clang::matrix_type(3, 2)]] typedef int ix3x2_t;
+[[clang::matrix_type(3, 2)]] typedef int ix3x2_t; // expected-warning {{[[]] attributes are a C2x extension}}
 // expected-warning@-1 {{applying attribute 'matrix_type' to a declaration is deprecated; apply it to the type instead}}
 
 // Attribute may not be used outside typedefs.
-[[clang::matrix_type(3, 2)]] int ix3x2_var;
+[[clang::matrix_type(3, 2)]] int ix3x2_var; // expected-warning {{[[]] attributes are a C2x extension}}
 // expected-error@-1 {{'matrix_type' attribute only applies to typedefs}}
-int [[clang::matrix_type(3, 2)]] ix3x2_var;
+int [[clang::matrix_type(3, 2)]] ix3x2_var; // expected-warning {{[[]] attributes are a C2x extension}}
 // expected-error@-1 {{'matrix_type' attribute only applies to typedefs}}
 
 void transpose(sx5x10_t a, ix3x2_t b, dx3x3 c, int *d, int e) {
Index: clang/test/Sema/internal_linkage.c
===================================================================
--- clang/test/Sema/internal_linkage.c
+++ clang/test/Sema/internal_linkage.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -fdouble-square-bracket-attributes %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
 
 int var __attribute__((internal_linkage));
 int var2 __attribute__((internal_linkage,common)); // expected-error{{'common' and 'internal_linkage' attributes are not compatible}} \
Index: clang/test/Sema/c2x-noreturn.c
===================================================================
--- clang/test/Sema/c2x-noreturn.c
+++ clang/test/Sema/c2x-noreturn.c
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -verify=all,c2x -std=c2x -fsyntax-only %s
-// RUN: %clang_cc1 -verify=all -std=c17 -fdouble-square-bracket-attributes -fsyntax-only %s
+// RUN: %clang_cc1 -verify=all -std=c17 -fsyntax-only %s
 // RUN: %clang_cc1 -verify=none -Wno-deprecated-attributes -D_CLANG_DISABLE_CRT_DEPRECATION_WARNINGS -std=c2x -fsyntax-only %s
-// RUN: %clang_cc1 -verify=none -Wno-deprecated-attributes -D_CLANG_DISABLE_CRT_DEPRECATION_WARNINGS -std=c17 -fdouble-square-bracket-attributes -fsyntax-only %s
+// RUN: %clang_cc1 -verify=none -Wno-deprecated-attributes -D_CLANG_DISABLE_CRT_DEPRECATION_WARNINGS -std=c17 -fsyntax-only %s
 // none-no-diagnostics
 
 // Test preprocessor functionality.
Index: clang/test/Sema/attr-type-safety.c
===================================================================
--- clang/test/Sema/attr-type-safety.c
+++ clang/test/Sema/attr-type-safety.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -fdouble-square-bracket-attributes -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
 
 struct A {};
 
@@ -42,4 +42,3 @@
 
 [[clang::pointer_with_type_tag(a,1,2)]] void A_func(void *ptr, void *tag);
 [[clang::pointer_with_type_tag(c,1,2)]] void C_func(void *ptr, int tag);
-
Index: clang/test/Sema/attr-regparm.c
===================================================================
--- clang/test/Sema/attr-regparm.c
+++ clang/test/Sema/attr-regparm.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -fdouble-square-bracket-attributes -verify %s
+// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -verify %s
 
 __attribute((regparm(2))) int x0(void);
 __attribute((regparm(1.0))) int x1(void); // expected-error{{'regparm' attribute requires an integer constant}}
Index: clang/test/Sema/attr-objc-bridge-related.m
===================================================================
--- clang/test/Sema/attr-objc-bridge-related.m
+++ clang/test/Sema/attr-objc-bridge-related.m
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify -fsyntax-only -fdouble-square-bracket-attributes %s
+// RUN: %clang_cc1 -verify -fsyntax-only %s
 
 struct [[clang::objc_bridge_related(NSParagraphStyle,,)]] TestBridgedRef;
 
Index: clang/test/Sema/attr-likelihood.c
===================================================================
--- clang/test/Sema/attr-likelihood.c
+++ clang/test/Sema/attr-likelihood.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -fsyntax-only -fdouble-square-bracket-attributes -verify
+// RUN: %clang_cc1 %s -fsyntax-only -verify
 
 void g(void) {
   if (1)
Index: clang/test/Sema/attr-external-source-symbol.c
===================================================================
--- clang/test/Sema/attr-external-source-symbol.c
+++ clang/test/Sema/attr-external-source-symbol.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -fblocks -verify -fdouble-square-bracket-attributes %s
+// RUN: %clang_cc1 -fsyntax-only -fblocks -verify %s
 
 void threeClauses(void) __attribute__((external_source_symbol(language="Swift", defined_in="module", generated_declaration)));
 
Index: clang/test/Sema/attr-external-source-symbol-cxx.cpp
===================================================================
--- clang/test/Sema/attr-external-source-symbol-cxx.cpp
+++ clang/test/Sema/attr-external-source-symbol-cxx.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -fblocks -verify -fdouble-square-bracket-attributes %s
+// RUN: %clang_cc1 -fsyntax-only -fblocks -verify %s
 
 template<class T>
 class Class {
Index: clang/test/Sema/attr-availability-square-brackets.c
===================================================================
--- clang/test/Sema/attr-availability-square-brackets.c
+++ clang/test/Sema/attr-availability-square-brackets.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fsyntax-only -fdouble-square-bracket-attributes -verify %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fsyntax-only -verify %s
 
 [[clang::availability(macosx,introduced=10.4,deprecated=10.2)]] void f0(void); // expected-warning{{feature cannot be deprecated in macOS version 10.2 before it was introduced in version 10.4; attribute ignored}}
 [[clang::availability(ios,obsoleted=2.1,deprecated=3.0)]] void f1(void);  // expected-warning{{feature cannot be obsoleted in iOS version 2.1 before it was deprecated in version 3.0; attribute ignored}}
Index: clang/test/Sema/annotate.c
===================================================================
--- clang/test/Sema/annotate.c
+++ clang/test/Sema/annotate.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -fsyntax-only -fdouble-square-bracket-attributes -verify
+// RUN: %clang_cc1 %s -fsyntax-only -verify
 
 void __attribute__((annotate("foo"))) foo(float *a) {
   __attribute__((annotate("bar"))) int x;
Index: clang/test/Sema/annotate-type.c
===================================================================
--- clang/test/Sema/annotate-type.c
+++ clang/test/Sema/annotate-type.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -fsyntax-only -fdouble-square-bracket-attributes -verify
+// RUN: %clang_cc1 %s -fsyntax-only -verify
 
 const char *some_function();
 
Index: clang/test/Preprocessor/has_c_attribute.c
===================================================================
--- clang/test/Preprocessor/has_c_attribute.c
+++ clang/test/Preprocessor/has_c_attribute.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fdouble-square-bracket-attributes -std=c11 -E -P %s -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c11 -E -P %s -o - | FileCheck %s
 // RUN: %clang_cc1 -std=c2x -E -P %s -o - | FileCheck %s
 
 #define C2x(x) x: __has_c_attribute(x)
Index: clang/test/ParserHLSL/group_shared.hlsl
===================================================================
--- clang/test/ParserHLSL/group_shared.hlsl
+++ clang/test/ParserHLSL/group_shared.hlsl
@@ -8,9 +8,6 @@
 // expected-warning@+1 {{'auto' type specifier is a C++11 extension}}
 auto l = []() groupshared  {};
 
-
-// NOTE: remove this error once [[]] attribute is supported except for hlsl202x.
-// expected-error@+1 {{expected expression}}
 float groupshared [[]] i = 12;
 
 float groupshared const i2 = 12;
Index: clang/test/Parser/objc-attr.m
===================================================================
--- clang/test/Parser/objc-attr.m
+++ clang/test/Parser/objc-attr.m
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -fdouble-square-bracket-attributes -triple x86_64-apple-macosx10.10.0 -verify %s
+// RUN: %clang_cc1 -fsyntax-only -triple x86_64-apple-macosx10.10.0 -verify %s
 // expected-no-diagnostics
 
 @interface NSObject
@@ -14,7 +14,7 @@
 
 [[clang::objc_runtime_name("name")]] @protocol Bar;
 
-[[clang::objc_protocol_requires_explicit_implementation]] 
+[[clang::objc_protocol_requires_explicit_implementation]]
 @protocol Baz
 @end
 
Index: clang/test/Parser/cxx-decl.cpp
===================================================================
--- clang/test/Parser/cxx-decl.cpp
+++ clang/test/Parser/cxx-decl.cpp
@@ -196,12 +196,9 @@
 }
 
 // Ensure we produce at least some diagnostic for attributes in C++98.
-[[]] struct S;
-#if __cplusplus <= 199711L
-// expected-error@-2 {{expected expression}}
-// expected-error@-3 {{expected unqualified-id}}
-#else
-// expected-error@-5 {{misplaced attributes}}
+[[]] struct S; // expected-error {{misplaced attributes}}
+#if __cplusplus < 201103L
+// expected-error@-2 {{[[]] attributes are a C++11 extension}}
 #endif
 
 namespace test7 {
@@ -316,7 +313,6 @@
 
   int test6b;
 #if __cplusplus >= 201103L
-// expected-error@+3 {{expected}}
+// expected-error@+2 {{expected}}
 // expected-error@-3 {{expected ';' after top level declarator}}
 #endif
-
Index: clang/test/Parser/c2x-attributes.m
===================================================================
--- clang/test/Parser/c2x-attributes.m
+++ clang/test/Parser/c2x-attributes.m
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -fdouble-square-bracket-attributes -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
 // expected-no-diagnostics
 
 enum __attribute__((deprecated)) E1 : int; // ok
Index: clang/test/Parser/c2x-attributes.c
===================================================================
--- clang/test/Parser/c2x-attributes.c
+++ clang/test/Parser/c2x-attributes.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -fdouble-square-bracket-attributes -verify=expected,notc2x -Wno-strict-prototypes %s
+// RUN: %clang_cc1 -fsyntax-only -verify=expected,notc2x -Wno-strict-prototypes %s
 // RUN: %clang_cc1 -fsyntax-only -std=gnu2x -verify=expected,c2x %s
 
 enum [[]] E {
Index: clang/test/Parser/asm.c
===================================================================
--- clang/test/Parser/asm.c
+++ clang/test/Parser/asm.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -fdouble-square-bracket-attributes -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
 
 #if !__has_extension(gnu_asm)
 #error Extension 'gnu_asm' should be available by default
@@ -11,7 +11,7 @@
 
 void f2(void) {
   asm("foo" : "=r" (a)); // expected-error {{use of undeclared identifier 'a'}}
-  asm("foo" : : "r" (b)); // expected-error {{use of undeclared identifier 'b'}} 
+  asm("foo" : : "r" (b)); // expected-error {{use of undeclared identifier 'b'}}
 
   [[]] asm("");
   [[gnu::deprecated]] asm(""); // expected-warning {{'deprecated' attribute ignored}}
Index: clang/test/OpenMP/openmp_attribute_compat.cpp
===================================================================
--- clang/test/OpenMP/openmp_attribute_compat.cpp
+++ clang/test/OpenMP/openmp_attribute_compat.cpp
@@ -7,7 +7,7 @@
 // RUN: %clang_cc1 -fopenmp -fopenmp-version=50 -fsyntax-only -verify=off -Wno-openmp %s
 // RUN: %clang_cc1 -fopenmp -fopenmp-version=50 -fsyntax-only -verify=off -Wno-openmp-51-extensions %s
 
-// RUN: %clang_cc1 -fopenmp -fopenmp-version=51 -fsyntax-only -verify=pre -Wpre-openmp-51-compat -x c -fdouble-square-bracket-attributes %s
+// RUN: %clang_cc1 -fopenmp -fopenmp-version=51 -fsyntax-only -verify=pre -Wpre-openmp-51-compat -x c %s
 // RUN: %clang_cc1 -fopenmp -fopenmp-version=51 -fsyntax-only -verify=off -x c -std=c2x %s
 // RUN: %clang_cc1 -fopenmp -fopenmp-version=50 -fsyntax-only -verify=ext -Wopenmp -x c -std=c2x %s
 
@@ -16,4 +16,3 @@
 int x;
 [[omp::directive(threadprivate(x))]]; // pre-warning {{specifying OpenMP directives with [[]] is incompatible with OpenMP standards before OpenMP 5.1}} \
                                       // ext-warning {{specifying OpenMP directives with [[]] is an OpenMP 5.1 extension}}
-
Index: clang/test/OpenMP/assumes_messages_attr.c
===================================================================
--- clang/test/OpenMP/assumes_messages_attr.c
+++ clang/test/OpenMP/assumes_messages_attr.c
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp -fopenmp-version=51 -std=c99 -fms-extensions -fdouble-square-bracket-attributes -Wno-pragma-pack %s
-// RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp-simd -fopenmp-version=51 -std=c99 -fms-extensions -fdouble-square-bracket-attributes -Wno-pragma-pack %s
+// RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp -fopenmp-version=51 -std=c99 -fms-extensions -Wno-pragma-pack %s
+// RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp-simd -fopenmp-version=51 -std=c99 -fms-extensions -Wno-pragma-pack %s
 
 [[omp::directive(assumes)]]; // expected-error {{expected at least one 'ext_', 'absent', 'contains', 'holds', 'no_openmp', 'no_openmp_routines', 'no_parallelism' clause for '#pragma omp assumes'}}
 [[omp::directive(begin)]]; // expected-error {{expected an OpenMP directive}}
@@ -54,4 +54,3 @@
 
 // TODO: we should emit a warning at least.
 [[omp::directive(begin assumes ext_abc)]];
-
Index: clang/test/Frontend/noderef.c
===================================================================
--- clang/test/Frontend/noderef.c
+++ clang/test/Frontend/noderef.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -Wno-unused-value -fdouble-square-bracket-attributes -verify %s
+// RUN: %clang_cc1 -Wno-unused-value -verify %s
 
 #define NODEREF __attribute__((noderef))
 
Index: clang/test/CodeGen/attr-btf_type_tag-var.c
===================================================================
--- clang/test/CodeGen/attr-btf_type_tag-var.c
+++ clang/test/CodeGen/attr-btf_type_tag-var.c
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 -triple %itanium_abi_triple -debug-info-kind=limited -S -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang_cc1 -triple %itanium_abi_triple -DDOUBLE_BRACKET_ATTRS=1 -fdouble-square-bracket-attributes -debug-info-kind=limited -S -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -DDOUBLE_BRACKET_ATTRS=1 -debug-info-kind=limited -S -emit-llvm -o - %s | FileCheck %s
 
 #if DOUBLE_BRACKET_ATTRS
 #define __tag1 [[clang::btf_type_tag("tag1")]]
Index: clang/test/CodeGen/attr-btf_type_tag-func.c
===================================================================
--- clang/test/CodeGen/attr-btf_type_tag-func.c
+++ clang/test/CodeGen/attr-btf_type_tag-func.c
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 -triple %itanium_abi_triple -debug-info-kind=limited -S -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang_cc1 -triple %itanium_abi_triple -DDOUBLE_BRACKET_ATTRS=1 -fdouble-square-bracket-attributes -debug-info-kind=limited -S -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -DDOUBLE_BRACKET_ATTRS=1 -debug-info-kind=limited -S -emit-llvm -o - %s | FileCheck %s
 
 #if DOUBLE_BRACKET_ATTRS
 #define __tag1 [[clang::btf_type_tag("tag1")]]
Index: clang/test/AST/attr-annotate-type.c
===================================================================
--- clang/test/AST/attr-annotate-type.c
+++ clang/test/AST/attr-annotate-type.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -ast-dump -fdouble-square-bracket-attributes | FileCheck %s
+// RUN: %clang_cc1 %s -ast-dump | FileCheck %s
 
 // Verify that we print the [[clang::annotate_type]] attribute.
 // FIXME: The arguments are currently not printed -- see also comments in
Index: clang/test/AST/ast-dump-c-attr.c
===================================================================
--- clang/test/AST/ast-dump-c-attr.c
+++ clang/test/AST/ast-dump-c-attr.c
@@ -1,12 +1,12 @@
 // Test without serialization:
-// RUN: %clang_cc1 -triple x86_64-pc-linux -fdouble-square-bracket-attributes \
+// RUN: %clang_cc1 -triple x86_64-pc-linux \
 // RUN: -Wno-deprecated-declarations -ast-dump -ast-dump-filter Test %s \
 // RUN: | FileCheck --strict-whitespace %s
 //
 // Test with serialization:
-// RUN: %clang_cc1 -triple x86_64-pc-linux -fdouble-square-bracket-attributes \
+// RUN: %clang_cc1 -triple x86_64-pc-linux \
 // RUN: -Wno-deprecated-declarations -emit-pch -o %t %s
-// RUN: %clang_cc1 -x c -triple x86_64-pc-linux -fdouble-square-bracket-attributes \
+// RUN: %clang_cc1 -x c -triple x86_64-pc-linux \
 // RUN: -Wno-deprecated-declarations -include-pch %t -ast-dump-all -ast-dump-filter Test /dev/null \
 // RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \
 // RUN: | FileCheck --strict-whitespace %s
Index: clang/test/AST/ast-dump-attr.m
===================================================================
--- clang/test/AST/ast-dump-attr.m
+++ clang/test/AST/ast-dump-attr.m
@@ -1,12 +1,12 @@
 // Test without serialization:
-// RUN: %clang_cc1 -fdouble-square-bracket-attributes -triple x86_64-apple-macosx10.10.0 \
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.10.0 \
 // RUN: -ast-dump -ast-dump-filter Test %s \
 // RUN: | FileCheck --strict-whitespace %s
 //
 // Test with serialization:
-// RUN: %clang_cc1 -fdouble-square-bracket-attributes -triple x86_64-apple-macosx10.10.0 \
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.10.0 \
 // RUN: -emit-pch -o %t %s
-// RUN: %clang_cc1 -x objective-c -fdouble-square-bracket-attributes -triple x86_64-apple-macosx10.10.0 \
+// RUN: %clang_cc1 -x objective-c -triple x86_64-apple-macosx10.10.0 \
 // RUN: -include-pch %t -ast-dump-all -ast-dump-filter Test /dev/null \
 // RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \
 // RUN: | FileCheck --strict-whitespace %s
Index: clang/lib/Parse/ParseDeclCXX.cpp
===================================================================
--- clang/lib/Parse/ParseDeclCXX.cpp
+++ clang/lib/Parse/ParseDeclCXX.cpp
@@ -4474,7 +4474,9 @@
          "Not a double square bracket attribute list");
 
   SourceLocation OpenLoc = Tok.getLocation();
-  Diag(OpenLoc, diag::warn_cxx98_compat_attribute);
+  Diag(OpenLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_attribute
+                : getLangOpts().CPlusPlus ? diag::warn_ext_cxx11_attributes
+                                          : diag::warn_ext_c2x_attributes);
 
   ConsumeBracket();
   checkCompoundToken(OpenLoc, tok::l_square, CompoundToken::AttrBegin);
@@ -4589,8 +4591,6 @@
 /// attribute-specifier-seq:
 ///       attribute-specifier-seq[opt] attribute-specifier
 void Parser::ParseCXX11Attributes(ParsedAttributes &Attrs) {
-  assert(standardAttributesAllowed());
-
   SourceLocation StartLoc = Tok.getLocation();
   SourceLocation EndLoc = StartLoc;
 
Index: clang/lib/Parse/ParseDecl.cpp
===================================================================
--- clang/lib/Parse/ParseDecl.cpp
+++ clang/lib/Parse/ParseDecl.cpp
@@ -3337,7 +3337,7 @@
 
     case tok::l_square:
     case tok::kw_alignas:
-      if (!standardAttributesAllowed() || !isCXX11AttributeSpecifier())
+      if (!isCXX11AttributeSpecifier())
         goto DoneWithDeclSpec;
 
       ProhibitAttributes(attrs);
@@ -5160,7 +5160,7 @@
     // If attributes exist after the enumerator, parse them.
     ParsedAttributes attrs(AttrFactory);
     MaybeParseGNUAttributes(attrs);
-    if (standardAttributesAllowed() && isCXX11AttributeSpecifier()) {
+    if (isCXX11AttributeSpecifier()) {
       if (getLangOpts().CPlusPlus)
         Diag(Tok.getLocation(), getLangOpts().CPlusPlus17
                                     ? diag::warn_cxx14_compat_ns_enum_attribute
@@ -5885,8 +5885,7 @@
     DeclSpec &DS, unsigned AttrReqs, bool AtomicAllowed,
     bool IdentifierRequired,
     std::optional<llvm::function_ref<void()>> CodeCompletionHandler) {
-  if (standardAttributesAllowed() && (AttrReqs & AR_CXX11AttributesParsed) &&
-      isCXX11AttributeSpecifier()) {
+  if ((AttrReqs & AR_CXX11AttributesParsed) && isCXX11AttributeSpecifier()) {
     ParsedAttributes Attrs(AttrFactory);
     ParseCXX11Attributes(Attrs);
     DS.takeAttributesFrom(Attrs);
@@ -7064,7 +7063,7 @@
         TrailingReturnTypeLoc = Range.getBegin();
         EndLoc = Range.getEnd();
       }
-    } else if (standardAttributesAllowed()) {
+    } else {
       MaybeParseCXX11Attributes(FnAttrs);
     }
   }
Index: clang/lib/Lex/Lexer.cpp
===================================================================
--- clang/lib/Lex/Lexer.cpp
+++ clang/lib/Lex/Lexer.cpp
@@ -4222,9 +4222,7 @@
     if (LangOpts.Digraphs && Char == '>') {
       Kind = tok::r_square; // ':>' -> ']'
       CurPtr = ConsumeChar(CurPtr, SizeTmp, Result);
-    } else if ((LangOpts.CPlusPlus ||
-                LangOpts.DoubleSquareBracketAttributes) &&
-               Char == ':') {
+    } else if (Char == ':') {
       Kind = tok::coloncolon;
       CurPtr = ConsumeChar(CurPtr, SizeTmp, Result);
     } else {
@@ -4441,8 +4439,7 @@
     Result.setLiteralData(TokPtr);
     return true;
   }
-  if (Result.is(tok::colon) &&
-      (LangOpts.CPlusPlus || LangOpts.DoubleSquareBracketAttributes)) {
+  if (Result.is(tok::colon)) {
     // Convert consecutive colons to 'tok::coloncolon'.
     if (*BufferPtr == ':') {
       assert(DepDirectives.front().Tokens[NextDepDirectiveTokenIndex].is(
Index: clang/lib/Driver/ToolChains/Clang.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Clang.cpp
+++ clang/lib/Driver/ToolChains/Clang.cpp
@@ -1193,7 +1193,7 @@
        getToolChain().getTriple().isAMDGCN())) {
 
       // Add include/gpu-none-libc/* to our system include path. This lets us use
-      // GPU-specific system headers first. 
+      // GPU-specific system headers first.
       // TODO: We need to find a way to make these headers compatible with the
       // host environment.
       SmallString<128> P(llvm::sys::path::parent_path(D.InstalledDir));
@@ -6582,9 +6582,6 @@
       types::isCXX(InputType))
     CmdArgs.push_back("-fcoro-aligned-allocation");
 
-  Args.AddLastArg(CmdArgs, options::OPT_fdouble_square_bracket_attributes,
-                  options::OPT_fno_double_square_bracket_attributes);
-
   Args.addOptOutFlag(CmdArgs, options::OPT_faccess_control,
                      options::OPT_fno_access_control);
   Args.addOptOutFlag(CmdArgs, options::OPT_felide_constructors,
Index: clang/lib/Basic/Attributes.cpp
===================================================================
--- clang/lib/Basic/Attributes.cpp
+++ clang/lib/Basic/Attributes.cpp
@@ -33,8 +33,7 @@
   // attributes. We support those, but not through the typical attribute
   // machinery that goes through TableGen. We support this in all OpenMP modes
   // so long as double square brackets are enabled.
-  if (LangOpts.OpenMP && LangOpts.DoubleSquareBracketAttributes &&
-      ScopeName == "omp")
+  if (LangOpts.OpenMP && ScopeName == "omp")
     return (Name == "directive" || Name == "sequence") ? 1 : 0;
 
   int res = hasAttributeImpl(Syntax, Name, ScopeName, Target, LangOpts);
Index: clang/include/clang/Parse/Parser.h
===================================================================
--- clang/include/clang/Parse/Parser.h
+++ clang/include/clang/Parse/Parser.h
@@ -2685,17 +2685,11 @@
 private:
   void ParseBlockId(SourceLocation CaretLoc);
 
-  /// Are [[]] attributes enabled?
-  bool standardAttributesAllowed() const {
-    const LangOptions &LO = getLangOpts();
-    return LO.DoubleSquareBracketAttributes;
-  }
-
   // Check for the start of an attribute-specifier-seq in a context where an
   // attribute is not allowed.
   bool CheckProhibitedCXX11Attribute() {
     assert(Tok.is(tok::l_square));
-    if (!standardAttributesAllowed() || NextToken().isNot(tok::l_square))
+    if (NextToken().isNot(tok::l_square))
       return false;
     return DiagnoseProhibitedCXX11Attribute();
   }
@@ -2703,8 +2697,6 @@
   bool DiagnoseProhibitedCXX11Attribute();
   void CheckMisplacedCXX11Attribute(ParsedAttributes &Attrs,
                                     SourceLocation CorrectLocation) {
-    if (!standardAttributesAllowed())
-      return;
     if ((Tok.isNot(tok::l_square) || NextToken().isNot(tok::l_square)) &&
         Tok.isNot(tok::kw_alignas))
       return;
@@ -2795,7 +2787,7 @@
   bool MaybeParseAttributes(unsigned WhichAttrKinds, ParsedAttributes &Attrs,
                             LateParsedAttrList *LateAttrs = nullptr) {
     if (Tok.isOneOf(tok::kw___attribute, tok::kw___declspec) ||
-        (standardAttributesAllowed() && isCXX11AttributeSpecifier())) {
+        isCXX11AttributeSpecifier()) {
       ParseAttributes(WhichAttrKinds, Attrs, LateAttrs);
       return true;
     }
@@ -2847,7 +2839,7 @@
     }
   }
   void MaybeParseCXX11Attributes(Declarator &D) {
-    if (standardAttributesAllowed() && isCXX11AttributeSpecifier()) {
+    if (isCXX11AttributeSpecifier()) {
       ParsedAttributes Attrs(AttrFactory);
       ParseCXX11Attributes(Attrs);
       D.takeAttributes(Attrs);
@@ -2856,8 +2848,7 @@
 
   bool MaybeParseCXX11Attributes(ParsedAttributes &Attrs,
                                  bool OuterMightBeMessageSend = false) {
-    if (standardAttributesAllowed() &&
-        isCXX11AttributeSpecifier(false, OuterMightBeMessageSend)) {
+    if (isCXX11AttributeSpecifier(false, OuterMightBeMessageSend)) {
       ParseCXX11Attributes(Attrs);
       return true;
     }
Index: clang/include/clang/Driver/Options.td
===================================================================
--- clang/include/clang/Driver/Options.td
+++ clang/include/clang/Driver/Options.td
@@ -1231,11 +1231,6 @@
 def fast : Flag<["-"], "fast">, Group<f_Group>;
 def fasynchronous_unwind_tables : Flag<["-"], "fasynchronous-unwind-tables">, Group<f_Group>;
 
-defm double_square_bracket_attributes : BoolFOption<"double-square-bracket-attributes",
-  LangOpts<"DoubleSquareBracketAttributes">, Default<!strconcat(cpp11.KeyPath, "||", c2x.KeyPath)>,
-  PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [], "Disable">,
-  BothFlags<[NoXarchOption, CC1Option], " '[[]]' attributes in all C and C++ language modes">>;
-
 defm autolink : BoolFOption<"autolink",
   CodeGenOpts<"Autolink">, DefaultTrue,
   NegFlag<SetFalse, [CC1Option], "Disable generation of linker directives for automatic library linking">,
@@ -3532,7 +3527,7 @@
 def mguard_EQ : Joined<["-"], "mguard=">, Group<m_Group>, Flags<[NoXarchOption]>,
   HelpText<"Enable or disable Control Flow Guard checks and guard tables emission">,
   Values<"none,cf,cf-nochecks">;
-def mcpu_EQ : Joined<["-"], "mcpu=">, Group<m_Group>, 
+def mcpu_EQ : Joined<["-"], "mcpu=">, Group<m_Group>,
   HelpText<"For a list of available CPUs for the target use '-mcpu=help'">;
 def mmcu_EQ : Joined<["-"], "mmcu=">, Group<m_Group>;
 def msim : Flag<["-"], "msim">, Group<m_Group>;
Index: clang/include/clang/Basic/LangOptions.def
===================================================================
--- clang/include/clang/Basic/LangOptions.def
+++ clang/include/clang/Basic/LangOptions.def
@@ -160,8 +160,6 @@
 LANGOPT(RelaxedTemplateTemplateArgs, 1, 0, "C++17 relaxed matching of template template arguments")
 LANGOPT(ExperimentalLibrary, 1, 0, "enable unstable and experimental library features")
 
-LANGOPT(DoubleSquareBracketAttributes, 1, 0, "'[[]]' attributes extension for all language standard modes")
-
 COMPATIBLE_LANGOPT(RecoveryAST, 1, 1, "Preserve expressions in AST when encountering errors")
 COMPATIBLE_LANGOPT(RecoveryASTType, 1, 1, "Preserve the type in recovery expressions")
 
Index: clang/include/clang/Basic/DiagnosticParseKinds.td
===================================================================
--- clang/include/clang/Basic/DiagnosticParseKinds.td
+++ clang/include/clang/Basic/DiagnosticParseKinds.td
@@ -550,7 +550,7 @@
 def err_expected_unqualified_id : Error<
   "expected %select{identifier|unqualified-id}0">;
 def err_while_loop_outside_of_a_function : Error<
-  "while loop outside of a function">; 
+  "while loop outside of a function">;
 def err_brackets_go_after_unqualified_id : Error<
   "brackets are not allowed here; to declare an array, "
   "place the brackets after the %select{identifier|name}0">;
@@ -718,6 +718,12 @@
 def warn_cxx98_compat_attribute : Warning<
   "C++11 attribute syntax is incompatible with C++98">,
   InGroup<CXX98Compat>, DefaultIgnore;
+def warn_ext_cxx11_attributes : Extension<
+  "[[]] attributes are a C++11 extension">,
+  InGroup<CXX11>;
+def warn_ext_c2x_attributes : Extension<
+  "[[]] attributes are a C2x extension">,
+  InGroup<C2x>;
 def err_cxx11_attribute_forbids_arguments : Error<
   "attribute %0 cannot have an argument list">;
 def err_attribute_requires_arguments : Error<
Index: clang/docs/LanguageExtensions.rst
===================================================================
--- clang/docs/LanguageExtensions.rst
+++ clang/docs/LanguageExtensions.rst
@@ -1401,15 +1401,15 @@
 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
@@ -1429,10 +1429,10 @@
 ``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
-====================================== ================================ ============= ============= ==================================
+====================================== ================================ ============= =============
 
 Type Trait Primitives
 =====================
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to