[PATCH] A new ADT: StringRefNulTerminated

Krzysztof Parzyszek kparzysz at codeaurora.org
Sat Feb 23 15:22:25 PST 2013


On 2/23/2013 5:13 PM, Dmitri Gribenko wrote:
>
> +    /// Construct an empty string ref.
> +    /*implicit*/ StringRefNulTerminated() : StringRef() {}

This is not quite the same as an empty null-terminated string.  I don't 
know if this was the intention, but it could cause confusion.  Maybe you 
could have a static const char in the class, initialized to 0, and 
initialize the StringRef with it instead?

-Krzysztof


-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation



More information about the llvm-commits mailing list