]> granicus.if.org Git - clang/commitdiff
PR14581: Make SourceLocation::printToString work, or it will always return an empty...
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 12 Dec 2012 14:17:17 +0000 (14:17 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 12 Dec 2012 14:17:17 +0000 (14:17 +0000)
No test case, this is debugging code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169980 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/SourceLocation.cpp

index 0d62f7bb4b8c6697ac2d2c0dd6d5030e241c3aef..182209117966f366c1602f27970cec632d9672db 100644 (file)
@@ -65,7 +65,7 @@ std::string SourceLocation::printToString(const SourceManager &SM) const {
   std::string S;
   llvm::raw_string_ostream OS(S);
   print(OS, SM);
-  return S;
+  return OS.str();
 }
 
 void SourceLocation::dump(const SourceManager &SM) const {