[PATCH] D51018: [sancov] Fixed malformed JSON when symbolizing coverage information

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 8 13:56:22 PDT 2019


vsk added subscribers: Dor1s, vsk.
vsk added a comment.

@Dor1s - any chance you know more folks actively working on sancov who have the bandwidth to review?



================
Comment at: llvm/tools/sancov/sancov.cpp:351
   static void printJSONStringLiteral(StringRef S, raw_ostream &OS) {
-    if (S.find('"') == std::string::npos) {
+    if (S.find('"') == std::string::npos &&
+        S.find('\\') == std::string::npos) {
----------------
Perhaps this whole function should be simplified to `OS << json::Value(S)` (see 'llvm/Support/JSON.h')?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D51018/new/

https://reviews.llvm.org/D51018





More information about the llvm-commits mailing list