[llvm-branch-commits] [cfe-tag] r96050 - /cfe/tags/cremebrulee/cremebrulee-36.4/tools/CIndex/CIndex.cpp

Ted Kremenek kremenek at apple.com
Fri Feb 12 16:03:01 PST 2010


Author: kremenek
Date: Fri Feb 12 18:03:01 2010
New Revision: 96050

URL: http://llvm.org/viewvc/llvm-project?rev=96050&view=rev
Log:
Fetch c-string when creating CXString.

Modified:
    cfe/tags/cremebrulee/cremebrulee-36.4/tools/CIndex/CIndex.cpp

Modified: cfe/tags/cremebrulee/cremebrulee-36.4/tools/CIndex/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/tags/cremebrulee/cremebrulee-36.4/tools/CIndex/CIndex.cpp?rev=96050&r1=96049&r2=96050&view=diff

==============================================================================
--- cfe/tags/cremebrulee/cremebrulee-36.4/tools/CIndex/CIndex.cpp (original)
+++ cfe/tags/cremebrulee/cremebrulee-36.4/tools/CIndex/CIndex.cpp Fri Feb 12 18:03:01 2010
@@ -1910,7 +1910,8 @@
 extern "C" {
 
 const CXString clang_getClangVersion() {
-  return CIndexer::createCXString(getClangFullVersion(), true);
+  const std::string &s = getClangFullVersion();
+  return CIndexer::createCXString(s.c_str(), true);
 }
 
 } // end: extern "C"





More information about the llvm-branch-commits mailing list