[Sema] Mark undefined ctors as deleted. NFC.

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.

llvm-svn: 291058
This commit is contained in:
George Burgess IV 2017-01-05 01:21:21 +00:00
parent 528600c41f
commit be04bfee2a
1 changed files with 4 additions and 4 deletions
clang/include/clang/Sema

View File

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