[clang] 22fb66e - [clang][NFC] Add another example to CWG952 test

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 10 23:26:06 PST 2023


Author: Vlad Serebrennikov
Date: 2023-02-11T10:25:59+03:00
New Revision: 22fb66eb94b643c858c2beecbcfac438a7fa29ed

URL: https://github.com/llvm/llvm-project/commit/22fb66eb94b643c858c2beecbcfac438a7fa29ed
DIFF: https://github.com/llvm/llvm-project/commit/22fb66eb94b643c858c2beecbcfac438a7fa29ed.diff

LOG: [clang][NFC] Add another example to CWG952 test

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/test/CXX/drs/dr9xx.cpp b/clang/test/CXX/drs/dr9xx.cpp
index 039ba431e4a1..cce0b6ecf209 100644
--- a/clang/test/CXX/drs/dr9xx.cpp
+++ b/clang/test/CXX/drs/dr9xx.cpp
@@ -73,6 +73,7 @@ namespace dr948 { // dr948: 3.7
 }
 
 namespace dr952 { // dr952: yes
+namespace example1 {
 struct A {
   typedef int I; // #dr952-typedef-decl
 };
@@ -98,6 +99,16 @@ struct C : B {
     }
   };
 };
+} // namespace example1
+namespace example2 {
+struct A {
+protected:
+  static int x;
+};
+struct B : A {
+  friend int get(B) { return x; }
+};
+} // namespace example2
 } // namespace dr952
 
 namespace dr974 { // dr974: yes


        


More information about the cfe-commits mailing list