[PATCH] Change semantics of regex expectations in the diagnostic verifier
Alp Toker
alp at nuanti.com
Wed Dec 11 15:38:40 PST 2013
On 11/12/2013 22:07, Hans Wennborg wrote:
> +// Add the characters from FixedStr to RegexStr, escaping as needed. This
> +// avoids the need for backslash-escaping in common patterns.
> +static void AddFixedStringToRegEx(StringRef FixedStr, std::string &RegexStr) {
> + // FIXME: Expose FileCheck.cpp's Pattern::AddFixedStringToRegEx as a utility
> + // method in RegEx.
Just a drive-by comment, but any reason not to go ahead and put this or
similar right in Regex::escape()?
Apart from preventing further copy-and-paste proliferation it'd also
self-document the interface and the fact that raw strings need to be
escaped when slotted into an RE string.
Alp.
--
http://www.nuanti.com
the browser experts
More information about the cfe-commits
mailing list