angelgarcia added a comment. It is allowed as long as you specify that the length is 0.
assert https://cs.corp.google.com/#piper///depot/google3/third_party/grte/v4_x86/release/usr/grte/v4/include/assert.h&l=85&ct=xref_jump_to_def&cl=GROK&gsn=assert((data https://cs.corp.google.com/#piper///depot/google3/third_party/llvm/llvm/include/llvm/ADT/StringRef.h&l=76&ct=xref_jump_to_def&cl=GROK&gsn=data | | length https://cs.corp.google.com/#piper///depot/google3/third_party/llvm/llvm/include/llvm/ADT/StringRef.h&l=76&ct=xref_jump_to_def&cl=GROK&gsn=length | 0) && "StringRef cannot be built from a NULL argument with ----------------------------------------------------------------- non-null length"); I thought that this way it was clear that I was returning an empty string, but they are both equivalent. I can change it if you think the default constructor is better. http://reviews.llvm.org/D12186 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits