aboutsummaryrefslogtreecommitdiff
path: root/tools/libclang/Indexing.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-06-28 21:03:08 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-06-28 21:03:08 +0000
commit3791814b2c5efb3986ec4dd40c75c9d28f325222 (patch)
treec5292cbfcd82134b155f8e578ce246a2058b4da0 /tools/libclang/Indexing.cpp
parent1d2b2ca97686b1ed16b1614e4700f9d2a0938a71 (diff)
[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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159377 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/libclang/Indexing.cpp')
-rw-r--r--tools/libclang/Indexing.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/libclang/Indexing.cpp b/tools/libclang/Indexing.cpp
index e660c4d6eb..6b681340f1 100644
--- a/tools/libclang/Indexing.cpp
+++ b/tools/libclang/Indexing.cpp
@@ -369,7 +369,6 @@ static void clang_indexSourceFile_Impl(void *UserData) {
IndexActionCleanup(IndexAction.get());
bool Persistent = requestedToGetTU;
- StringRef ResourceFilesPath = CXXIdx->getClangResourcesPath();
bool OnlyLocalDecls = false;
bool PrecompilePreamble = false;
bool CacheCodeCompletionResults = false;
@@ -393,7 +392,7 @@ static void clang_indexSourceFile_Impl(void *UserData) {
IndexAction.get(),
Unit,
Persistent,
- ResourceFilesPath,
+ CXXIdx->getClangResourcesPath(),
OnlyLocalDecls,
/*CaptureDiagnostics=*/true,
PrecompilePreamble,