================
@@ -113,8 +113,9 @@ namespace Static {
     static auto g() -> decltype(this->m); // expected-error{{'this' cannot be 
used in a static member function declaration}}
 
     static int h();
-    
-    static int i() noexcept(noexcept(m + 2)); // expected-error{{'this' cannot 
be implicitly used in a static member function declaration}}
+
+    // The use of 'm' doesn't constitute an ODR use, so we don't have a reason 
to reject it.
+    static int i() noexcept(noexcept(m + 2));
----------------
zyn0217 wrote:

All major compilers (except for us) accept the code: 
https://gcc.godbolt.org/z/ffxK4aKTa

https://github.com/llvm/llvm-project/pull/98023
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to