[PATCH] D45932: [clang-tidy][modernize-raw-string-literal] Don't replace upper ASCII with raw literals

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 24 04:46:33 PDT 2018


aaron.ballman added inline comments.


================
Comment at: clang-tidy/modernize/RawStringLiteralCheck.cpp:71
+  // supported by specific code pages only.
+  if (Bytes.find_if_not(isASCII) != StringRef::npos)
+    return false;
----------------
I am starting to think that this functionality should be refactored because the check is now O(N^2) in the worst case because all of the bytes of the string need to be touched twice. It would be nice for performance reasons to combine this so that there's only a single pass over all of the characters.

What do you think?


https://reviews.llvm.org/D45932





More information about the cfe-commits mailing list