浏览代码

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)