[PATCH] D16529: [clang-tidy] Add modernize-raw-string-literal check

Richard via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 8 09:04:54 PST 2016


LegalizeAdulthood added a comment.

I wrote:

> Repeated searching of the string for the literal delimiter could be avoided by changing the routine to search for the delimiter. If present, it could examine the characters following the literal to make the literal more unique and then continue searching from there to look for more occurrences of the extended delimiter. It would proceed incrementally through the rest of the string to create a unique delimiter in a single pass through the string. I think the resulting literals would be even more non-sensical than the current implementation, but it would result in a delimiter obtained by a single pass through the string. It's a significantly more complicated implementation and results in an even weirder delimiter to handle a very edge case.


Unfortunately in this paragraph I used the term "literal" in several places where I should have said "delimiter".  I hope that wasn't too confusing.  It should have read:

> Repeated searching of the string for the delimiter could be avoided by changing the routine to search for the delimiter. If present, it could examine the characters following the delimiter to make the delimiter more unique and then continue searching from there to look for more occurrences of the extended delimiter. It would proceed incrementally through the rest of the string to create a unique delimiter in a single pass through the string. I think the resulting delimiters would be even more non-sensical than the current implementation, but it would result in a delimiter obtained by a single pass through the string. It's a significantly more complicated implementation and results in an even weirder delimiter to handle a very edge case.



http://reviews.llvm.org/D16529





More information about the cfe-commits mailing list