From ad3c91c267b071db52df308eb6d80fb336a8dee5 Mon Sep 17 00:00:00 2001 From: Sebastian Redl Date: Sun, 26 Oct 2008 19:05:16 +0000 Subject: [PATCH] Allow \n for newlines in expected error messages. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58198 91177308-0d34-0410-b5e6-96231b3b80d8 --- Driver/DiagChecker.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Driver/DiagChecker.cpp b/Driver/DiagChecker.cpp index 6f7ea0b739..51f3979b92 100644 --- a/Driver/DiagChecker.cpp +++ b/Driver/DiagChecker.cpp @@ -78,6 +78,10 @@ static void FindDiagnostics(const std::string &Comment, } std::string Msg(Comment.substr(OpenDiag, CloseDiag - OpenDiag)); + size_type FindPos; + while((FindPos = Msg.find("\\n")) != std::string::npos) { + Msg.replace(FindPos, 2, "\n"); + } ExpectedDiags.push_back(std::make_pair(Pos, Msg)); ColNo = CloseDiag + 2; } -- 2.40.0