This is an archive of the discontinued LLVM Phabricator instance.

Fix CMIUtilString::SplitConsiderQuotes (MI)
ClosedPublic

Authored by ki.stfu on Feb 10 2015, 4:42 AM.

Details

Summary

This method doesn't work properly. Here is an example:

CMIUtilString test("\"hello\" \"\\\" world \\\" !\"");
CMIUtilString::VecString_t res;
test.SplitConsiderQuotes(" ", res);

Before this patch the result was as following:

(lldb) print res
(CMIUtilString::VecString_t) $1 = size=4 {
  [0] = (std::__1::string = "\"hello\"")
  [1] = (std::__1::string = "\"\\\"")
  [2] = (std::__1::string = "world")
  [3] = (std::__1::string = "\\\" !\"")
}

This patch fixes that error and now it looks like following:

(lldb) print res
(CMIUtilString::VecString_t) $1 = size=2 {
  [0] = (std::__1::string = "\"hello\"")
  [1] = (std::__1::string = "\"\\\" world \\\" !\"")
}

Diff Detail

Event Timeline

ki.stfu updated this revision to Diff 19665.Feb 10 2015, 4:42 AM
ki.stfu retitled this revision from to Fix CMIUtilString::SplitConsiderQuotes (MI).
ki.stfu updated this object.
ki.stfu edited the test plan for this revision. (Show Details)
ki.stfu added reviewers: abidh, clayborg, emaste.
ki.stfu added subscribers: abidh, clayborg, emaste, Unknown Object (MLST).
clayborg accepted this revision.Feb 10 2015, 9:38 AM
clayborg edited edge metadata.
This revision is now accepted and ready to land.Feb 10 2015, 9:38 AM
ki.stfu closed this revision.Feb 10 2015, 8:54 PM