]> granicus.if.org Git - clang/commitdiff
[Sema] Mark undefined ctors as deleted. NFC.
authorGeorge Burgess IV <george.burgess.iv@gmail.com>
Thu, 5 Jan 2017 01:21:21 +0000 (01:21 +0000)
committerGeorge Burgess IV <george.burgess.iv@gmail.com>
Thu, 5 Jan 2017 01:21:21 +0000 (01:21 +0000)
Looks like these functions exist just to prevent bad implicit
conversions. Rather than waiting for the linker to complain about
undefined references to them, we can mark them as deleted.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291058 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Sema/Ownership.h

index 92ea5296c45b631a2938eb14527a12f530213eaf..fd46de870fb429cd04b08fbd085bb22673781ff7 100644 (file)
@@ -153,8 +153,8 @@ namespace clang {
     ActionResult(const DiagnosticBuilder &) : Val(PtrTy()), Invalid(true) {}
 
     // These two overloads prevent void* -> bool conversions.
-    ActionResult(const void *);
-    ActionResult(volatile void *);
+    ActionResult(const void *) = delete;
+    ActionResult(volatile void *) = delete;
 
     bool isInvalid() const { return Invalid; }
     bool isUsable() const { return !Invalid && Val; }
@@ -192,8 +192,8 @@ namespace clang {
     ActionResult(const DiagnosticBuilder &) : PtrWithInvalid(0x01) { }
 
     // These two overloads prevent void* -> bool conversions.
-    ActionResult(const void *);
-    ActionResult(volatile void *);
+    ActionResult(const void *) = delete;
+    ActionResult(volatile void *) = delete;
 
     bool isInvalid() const { return PtrWithInvalid & 0x01; }
     bool isUsable() const { return PtrWithInvalid > 0x01; }