Index: clang-tools-extra/tags/RELEASE_800/rc2/clang-tidy/modernize/RawStringLiteralCheck.cpp =================================================================== --- clang-tools-extra/tags/RELEASE_800/rc2/clang-tidy/modernize/RawStringLiteralCheck.cpp +++ clang-tools-extra/tags/RELEASE_800/rc2/clang-tidy/modernize/RawStringLiteralCheck.cpp @@ -38,7 +38,8 @@ // Already a raw string literal if R comes before ". const size_t QuotePos = Text.find('"'); assert(QuotePos != StringRef::npos); - return (QuotePos > 0) && (Text[QuotePos - 1] == 'R'); + return (QuotePos != StringRef::npos) && (QuotePos > 0) && + (Text[QuotePos - 1] == 'R'); } bool containsEscapedCharacters(const MatchFinder::MatchResult &Result,