[PATCH] D26332: Add a user-defined literal for StringRef

Malcolm Parsons via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 23 05:05:31 PST 2016


malcolm.parsons added a comment.

In https://reviews.llvm.org/D26332#603406, @chandlerc wrote:

> I think that UDLs introduce a surprising and novel syntax for calling functions.


Calling methods on a literal StringRef is indeed surprising and novel.
I see some of those in this patch; they were not intentional and I'm removing them.

> In the overwhelming majority of the cases in this patch, I suspect the construction of the StringRef could be skipped entirely, and at most some missing overloads added to cause the code to work as-is without any need for further syntactic contortions.

I'll remove the cases that don't have embedded nulls and add some that are constructed statically (PR11944).


https://reviews.llvm.org/D26332





More information about the llvm-commits mailing list