[PATCH] D28667: [clang-tidy] Don't modernize-raw-string-literal if replacement is longer.

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 16 14:45:38 PST 2017


alexfh added inline comments.


================
Comment at: test/clang-tidy/modernize-raw-string-literal.cpp:94
 
+char const *const Concatenated("\"foo\""
+                               "\"bar\"");
----------------
leanil wrote:
> alexfh wrote:
> > Does this test fail without the patch? Also, should there be a test covering the case where no replacement is made (and the current code issues a warning)?
> No, it doesn't. This is to check that MeasureTokenLength works as I expect. It wouldn't warn if it measured the two parts separately.
> And I left the check here for those who may have the same concerns, although it's indeed not the core functionality I test here. Should I remove it?
The test is fine, but it's better to add it as a separate patch. This patch needs proper tests of the new functionality.


https://reviews.llvm.org/D28667





More information about the cfe-commits mailing list