[llvm] r248320 - Instead of defining the operator delete() function, it is better to delete the function so that any uses (even from within Node or its subclasses) do not accidentally call it. NFC intended.

Aaron Ballman via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 14:00:35 PDT 2015


Author: aaronballman
Date: Tue Sep 22 16:00:35 2015
New Revision: 248320

URL: http://llvm.org/viewvc/llvm-project?rev=248320&view=rev
Log:
Instead of defining the operator delete() function, it is better to delete the function so that any uses (even from within Node or its subclasses) do not accidentally call it. NFC intended.

Modified:
    llvm/trunk/include/llvm/Support/YAMLParser.h

Modified: llvm/trunk/include/llvm/Support/YAMLParser.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/YAMLParser.h?rev=248320&r1=248319&r2=248320&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/YAMLParser.h (original)
+++ llvm/trunk/include/llvm/Support/YAMLParser.h Tue Sep 22 16:00:35 2015
@@ -158,7 +158,7 @@ protected:
   std::unique_ptr<Document> &Doc;
   SMRange SourceRange;
 
-  void operator delete(void *) LLVM_NOEXCEPT {}
+  void operator delete(void *) LLVM_NOEXCEPT = delete;
 
   ~Node() = default;
 




More information about the llvm-commits mailing list