diff --git a/clang-tools-extra/clang-tidy/modernize/RawStringLiteralCheck.cpp b/clang-tools-extra/clang-tidy/modernize/RawStringLiteralCheck.cpp --- a/clang-tools-extra/clang-tidy/modernize/RawStringLiteralCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/RawStringLiteralCheck.cpp @@ -56,7 +56,7 @@ *Result.SourceManager, Result.Context->getLangOpts()); StringRef Text = Lexer::getSourceText(CharRange, *Result.SourceManager, Result.Context->getLangOpts()); - if (isRawStringLiteral(Text)) + if (Text.empty() || isRawStringLiteral(Text)) return false; return containsEscapes(Text, R"('\"?x01)");