Преглед изворни кода

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

Adam Yang пре 4 година
родитељ
комит
78cf9bde8f
1 измењених фајлова са 1 додато и 0 уклоњено
  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.
     /*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.
     /*implicit*/ StringRef(const char *Str)