[clang] f13d704 - [clang][NFC] Mark CWG 1443 (Default arguments and non-static data members)...

Bruno Ricci via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 13 06:08:08 PDT 2020


Author: Bruno Ricci
Date: 2020-06-13T13:59:54+01:00
New Revision: f13d704a5014fa28d56240a6da7d1aa0b1c01f4d

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

LOG: [clang][NFC] Mark CWG 1443 (Default arguments and non-static data members)...

...as done. This is a NAD which has always been implemented correctly.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/test/CXX/drs/dr14xx.cpp b/clang/test/CXX/drs/dr14xx.cpp
index d55427f5de8c..50b0396a4b79 100644
--- a/clang/test/CXX/drs/dr14xx.cpp
+++ b/clang/test/CXX/drs/dr14xx.cpp
@@ -4,10 +4,6 @@
 // RUN: %clang_cc1 -std=c++17 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
 // RUN: %clang_cc1 -std=c++2a %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
 
-#if __cplusplus < 201103L
-// expected-no-diagnostics
-#endif
-
 namespace dr1423 { // dr1423: 11
 #if __cplusplus >= 201103L
   bool b1 = nullptr; // expected-error {{cannot initialize}}
@@ -17,6 +13,13 @@ namespace dr1423 { // dr1423: 11
 #endif
 }
 
+namespace dr1443 { // dr1443: yes
+struct A {
+  int i;
+  A() { void foo(int=i); } // expected-error {{default argument references 'this'}}
+};
+}
+
 // dr1425: na abi
 
 namespace dr1460 { // dr1460: 3.5


        


More information about the cfe-commits mailing list