]> granicus.if.org Git - clang/commitdiff
Allow \n for newlines in expected error messages.
authorSebastian Redl <sebastian.redl@getdesigned.at>
Sun, 26 Oct 2008 19:05:16 +0000 (19:05 +0000)
committerSebastian Redl <sebastian.redl@getdesigned.at>
Sun, 26 Oct 2008 19:05:16 +0000 (19:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58198 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/DiagChecker.cpp

index 6f7ea0b739b31624251a3b5557af1ebef733da5a..51f3979b92a437387acfc7d2dbf27dbc3e1d4588 100644 (file)
@@ -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;
   }