forked from OSchip/llvm-project
[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:
parent
528600c41f
commit
be04bfee2a
clang/include/clang/Sema
|
@ -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; }
|
||||||
|
|
Loading…
Reference in New Issue