PR14581: Make SourceLocation::printToString work, or it will always return an empty string.
No test case, this is debugging code.
llvm-svn: 169980
diff --git a/clang/lib/Basic/SourceLocation.cpp b/clang/lib/Basic/SourceLocation.cpp
index 0d62f7b..1822091 100644
--- a/clang/lib/Basic/SourceLocation.cpp
+++ b/clang/lib/Basic/SourceLocation.cpp
@@ -65,7 +65,7 @@
std::string S;
llvm::raw_string_ostream OS(S);
print(OS, SM);
- return S;
+ return OS.str();
}
void SourceLocation::dump(const SourceManager &SM) const {