[clang-tools-extra] [clang-tidy] Fix erroneous warning to make deleted function public (PR #182577)

Jakob Widauer via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 21 18:27:41 PST 2026


================
@@ -219,3 +219,20 @@ namespace PR33759 {
       static Number& getNumber();
   };
 }
+
+namespace PR54276 {
+
+  class PrivateDeletedFunctionWithPublicOverload {
+    public:
+      void foo() {}
+    private:
+      void foo(int) = delete;
+      // CHECK-MESSAGES: :[[@LINE-1]]:12: warning: deleted member function should be public [modernize-use-equals-delete]
+  };
+
+  class PrivateDeletedFunctionWithPrivateOverload {
+    private:
+      void foo() {}
+      void foo(int) = delete;
+  };
----------------
jwidauer wrote:

Sounds good! Done!

https://github.com/llvm/llvm-project/pull/182577


More information about the cfe-commits mailing list