Răsfoiți Sursa

Added deleted constructor for null type for StringRef (#3618)

Adam Yang 4 ani în urmă
părinte
comite
78cf9bde8f
1 a modificat fișierele cu 1 adăugiri și 0 ștergeri
  1. 1 0
      include/llvm/ADT/StringRef.h

+ 1 - 0
include/llvm/ADT/StringRef.h

@@ -64,6 +64,7 @@ namespace llvm {
 
 
     /// Construct an empty string ref.
     /// Construct an empty string ref.
     /*implicit*/ StringRef() : Data(nullptr), Length(0) {}
     /*implicit*/ StringRef() : Data(nullptr), Length(0) {}
+    StringRef(std::nullptr_t) = delete; // HLSL Change - So we don't accidentally pass `false` again
 
 
     /// Construct a string ref from a cstring.
     /// Construct a string ref from a cstring.
     /*implicit*/ StringRef(const char *Str)
     /*implicit*/ StringRef(const char *Str)