Author: Piotr Zegar Date: 2023-08-27T08:52:10Z New Revision: 9c857f2151b48d3447828496295d076c3ec145e6
URL: https://github.com/llvm/llvm-project/commit/9c857f2151b48d3447828496295d076c3ec145e6 DIFF: https://github.com/llvm/llvm-project/commit/9c857f2151b48d3447828496295d076c3ec145e6.diff LOG: [clang-tidy][NFC] Fix modernize-raw-string-literal findings Fix issues found by clang-tidy in clang-tidy source directory. Added: Modified: clang-tools-extra/clang-tidy/ClangTidyProfiling.cpp clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/clang-tidy/ClangTidyProfiling.cpp b/clang-tools-extra/clang-tidy/ClangTidyProfiling.cpp index 14dfe963c9db3e..07ab34a07cd31d 100644 --- a/clang-tools-extra/clang-tidy/ClangTidyProfiling.cpp +++ b/clang-tools-extra/clang-tidy/ClangTidyProfiling.cpp @@ -43,8 +43,8 @@ void ClangTidyProfiling::printUserFriendlyTable(llvm::raw_ostream &OS) { void ClangTidyProfiling::printAsJSON(llvm::raw_ostream &OS) { OS << "{\n"; - OS << "\"file\": \"" << Storage->SourceFilename << "\",\n"; - OS << "\"timestamp\": \"" << Storage->Timestamp << "\",\n"; + OS << R"("file": ")" << Storage->SourceFilename << "\",\n"; + OS << R"("timestamp": ")" << Storage->Timestamp << "\",\n"; OS << "\"profile\": {\n"; TG->printJSONValues(OS, ""); OS << "\n}\n"; diff --git a/clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp index 1b1fbe97e9358e..ccc28efca68cda 100644 --- a/clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp +++ b/clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp @@ -483,7 +483,7 @@ static void insertNullTerminatorExpr(StringRef Name, (Twine('\n') + SpaceBeforeStmtStr + exprToStr(Result.Nodes.getNodeAs<Expr>(DestExprName), Result) + "[" + exprToStr(Result.Nodes.getNodeAs<Expr>(LengthExprName), Result) + - "] = " + ((Name[0] != 'w') ? "\'\\0\';" : "L\'\\0\';")) + "] = " + ((Name[0] != 'w') ? R"('\0';)" : R"(L'\0';)")) .str(); const auto AddNullTerminatorExprFix = FixItHint::CreateInsertion( _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits