https://github.com/nehaGautam07 updated 
https://github.com/llvm/llvm-project/pull/215644

>From 52d4e377b6729cb91e4eefc0f7a6cbd44b3cb8f1 Mon Sep 17 00:00:00 2001
From: neharaj <[email protected]>
Date: Tue, 11 Aug 2026 18:57:13 +0000
Subject: [PATCH 1/2] Add tests for ref-qualified operator new

---
 clang/test/SemaCXX/function-type-qual.cpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/clang/test/SemaCXX/function-type-qual.cpp 
b/clang/test/SemaCXX/function-type-qual.cpp
index f4906f58abbae..af2ef9a7f5d73 100644
--- a/clang/test/SemaCXX/function-type-qual.cpp
+++ b/clang/test/SemaCXX/function-type-qual.cpp
@@ -54,4 +54,11 @@ struct B {
   void operator delete(void*) volatile; //expected-error {{static member 
function cannot have 'volatile' qualifier}}
   void operator delete[](void*) volatile; //expected-error {{static member 
function cannot have 'volatile' qualifier}}
 };
-}
+  struct RefQualifierLValue {
+    void* operator new(size_t bytes) &; // expected-error {{static member 
function cannot have '&' qualifier}}
+  };
+
+  struct RefQualifierRValue {
+    void* operator new(size_t bytes) &&; // expected-error {{static member 
function cannot have '&&' qualifier}}
+  };
+  } // namespace GH79748
\ No newline at end of file

>From 22c76d0bbbef628df8f9e285aae0d01758b7f52d Mon Sep 17 00:00:00 2001
From: neharaj <[email protected]>
Date: Wed, 12 Aug 2026 11:27:01 +0000
Subject: [PATCH 2/2] Add newline at end of file

---
 clang/test/SemaCXX/function-type-qual.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/test/SemaCXX/function-type-qual.cpp 
b/clang/test/SemaCXX/function-type-qual.cpp
index af2ef9a7f5d73..854d694048667 100644
--- a/clang/test/SemaCXX/function-type-qual.cpp
+++ b/clang/test/SemaCXX/function-type-qual.cpp
@@ -61,4 +61,4 @@ struct B {
   struct RefQualifierRValue {
     void* operator new(size_t bytes) &&; // expected-error {{static member 
function cannot have '&&' qualifier}}
   };
-  } // namespace GH79748
\ No newline at end of file
+  } // namespace GH79748

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to