bkramer added a comment.

In http://reviews.llvm.org/D12186#228702, @angelgarcia wrote:

> It is allowed as long as you specify that the length is 0.


I meant the code before your change, which calls `StringRef(const char *Str)` 
and completely disallows nullptr. In other words: this change is missing a 
regression test.

> 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.


I prefer the default ctor. Using nullptr for the empty string is just an 
implementation detail, exposing it doesn't add clarity in my opinion.


http://reviews.llvm.org/D12186



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to