[clang] 630548a - [clang][NFC] Keep the order of DRs in dr23xx.cpp

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 15 07:42:02 PST 2024


Author: Vlad Serebrennikov
Date: 2024-02-15T18:41:44+03:00
New Revision: 630548a11423a40c5496cec78001374bfb8ff741

URL: https://github.com/llvm/llvm-project/commit/630548a11423a40c5496cec78001374bfb8ff741
DIFF: https://github.com/llvm/llvm-project/commit/630548a11423a40c5496cec78001374bfb8ff741.diff

LOG: [clang][NFC] Keep the order of DRs in dr23xx.cpp

Added: 
    

Modified: 
    clang/test/CXX/drs/dr23xx.cpp

Removed: 
    


################################################################################
diff  --git a/clang/test/CXX/drs/dr23xx.cpp b/clang/test/CXX/drs/dr23xx.cpp
index 38c6f8a915600d..ad941f606141c8 100644
--- a/clang/test/CXX/drs/dr23xx.cpp
+++ b/clang/test/CXX/drs/dr23xx.cpp
@@ -183,6 +183,39 @@ namespace dr2358 { // dr2358: 16
 }
 #endif
 
+// CWG2363 was closed as NAD, but its resolution does affirm that
+// a friend declaration cannot have an opaque-enumm-specifier.
+namespace dr2363 { // dr2363: yes
+
+enum class E0;
+enum E1 : int;
+
+struct A {
+  friend enum class E0;
+  // since-cxx11-error at -1 {{reference to enumeration must use 'enum' not 'enum class'}}
+  // expected-error at -2 {{elaborated enum specifier cannot be declared as a friend}}
+  // expected-note at -3 {{remove 'enum class' to befriend an enum}}
+
+  friend enum E0;
+  // expected-error at -1 {{elaborated enum specifier cannot be declared as a friend}}
+  // expected-note at -2 {{remove 'enum' to befriend an enum}}
+
+  friend enum class E1;
+  // since-cxx11-error at -1 {{reference to enumeration must use 'enum' not 'enum class'}}
+  // expected-error at -2 {{elaborated enum specifier cannot be declared as a friend}}
+  // expected-note at -3 {{remove 'enum class' to befriend an enum}}
+
+  friend enum E1;
+  // expected-error at -1 {{elaborated enum specifier cannot be declared as a friend}}
+  // expected-note at -2 {{remove 'enum' to befriend an enum}}
+
+  friend enum class E2;
+  // since-cxx11-error at -1 {{reference to enumeration must use 'enum' not 'enum class'}}
+  // expected-error at -2 {{elaborated enum specifier cannot be declared as a friend}}
+  // expected-note at -3 {{remove 'enum class' to befriend an enum}}
+};
+} // namespace dr2363
+
 namespace dr2370 { // dr2370: no
 namespace N {
 typedef int type;
@@ -278,37 +311,4 @@ namespace dr2397 { // dr2397: 17
   }
 } // namespace dr2397
 
-// CWG2363 was closed as NAD, but its resolution does affirm that
-// a friend declaration cannot have an opaque-enumm-specifier.
-namespace dr2363 { // dr2363: yes
-
-enum class E0;
-enum E1 : int;
-
-struct A {
-  friend enum class E0;
-  // since-cxx11-error at -1 {{reference to enumeration must use 'enum' not 'enum class'}}
-  // expected-error at -2 {{elaborated enum specifier cannot be declared as a friend}}
-  // expected-note at -3 {{remove 'enum class' to befriend an enum}}
-
-  friend enum E0;
-  // expected-error at -1 {{elaborated enum specifier cannot be declared as a friend}}
-  // expected-note at -2 {{remove 'enum' to befriend an enum}}
-
-  friend enum class E1;
-  // since-cxx11-error at -1 {{reference to enumeration must use 'enum' not 'enum class'}}
-  // expected-error at -2 {{elaborated enum specifier cannot be declared as a friend}}
-  // expected-note at -3 {{remove 'enum class' to befriend an enum}}
-
-  friend enum E1;
-  // expected-error at -1 {{elaborated enum specifier cannot be declared as a friend}}
-  // expected-note at -2 {{remove 'enum' to befriend an enum}}
-
-  friend enum class E2;
-  // since-cxx11-error at -1 {{reference to enumeration must use 'enum' not 'enum class'}}
-  // expected-error at -2 {{elaborated enum specifier cannot be declared as a friend}}
-  // expected-note at -3 {{remove 'enum class' to befriend an enum}}
-};
-} // namespace dr2363
-
 #endif


        


More information about the cfe-commits mailing list