Fix printing of std::map broken in 1e004e9.

Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
This commit is contained in:
Roman Zulak 2016-11-22 18:08:28 -05:00 committed by sftnight
parent 0a1bab6bd8
commit 9157aad03e
2 changed files with 12 additions and 2 deletions

View File

@ -103,10 +103,10 @@ namespace cling {
return valuePrinterInternal::kEmptyCollection;
std::string str("{ ");
str += printPair(*iter);
str += printPair(iter);
while (++iter != iterEnd) {
str += ", ";
str += printPair(*iter);
str += printPair(iter);
}
return str + " }";
}

View File

@ -12,6 +12,7 @@
#include <string>
#include <tuple>
#include <vector>
#include <map>
std::vector<bool> Bv(5,5)
// FIXME: Printing std::vector<bool> is still broken.
@ -34,5 +35,14 @@ cling::printValue(&A) == cling::printValue(&B)
std::tuple<> tA
// CHECK: (std::tuple<> &) {}
std::map<int, int> m
// CHECK: (std::map<int, int> &) {}
for (int i = 0; i < 5; ++i) m[i] = i+1;
m
// CHECK: (std::map<int, int> &) { 0 => 1, 1 => 2, 2 => 3, 3 => 4, 4 => 5 }
// expected-no-diagnostics
.q