Author: akirtzidis
Date: Thu Jun 28 16:03:08 2012
New Revision: 159377

URL: http://llvm.org/viewvc/llvm-project?rev=159377&view=rev
Log:
[libclang] Don't bind a StringRef to a temporary std::string object.
It may end up pointing at garbage.

Fixes the MSVC debug build. rdar://11703319

Modified:
    cfe/trunk/tools/libclang/Indexing.cpp

Modified: cfe/trunk/tools/libclang/Indexing.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/Indexing.cpp?rev=159377&r1=159376&r2=159377&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/Indexing.cpp (original)
+++ cfe/trunk/tools/libclang/Indexing.cpp Thu Jun 28 16:03:08 2012
@@ -369,7 +369,6 @@
     IndexActionCleanup(IndexAction.get());
 
   bool Persistent = requestedToGetTU;
-  StringRef ResourceFilesPath = CXXIdx->getClangResourcesPath();
   bool OnlyLocalDecls = false;
   bool PrecompilePreamble = false;
   bool CacheCodeCompletionResults = false;
@@ -393,7 +392,7 @@
                                                        IndexAction.get(),
                                                        Unit,
                                                        Persistent,
-                                                       ResourceFilesPath,
+                                                
CXXIdx->getClangResourcesPath(),
                                                        OnlyLocalDecls,
                                                     
/*CaptureDiagnostics=*/true,
                                                        PrecompilePreamble,


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to