소스 검색

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)