diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-06-28 21:03:08 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-06-28 21:03:08 +0000 |
commit | 30a243268209377344eda599277ed2475dff9dd6 (patch) | |
tree | bc75cc153cf2cad20b6f72067680809c00f96c47 | |
parent | 27747b57f924a26d150fe84cb0ab64822a9d7399 (diff) | |
download | bcm5719-llvm-30a243268209377344eda599277ed2475dff9dd6.tar.gz bcm5719-llvm-30a243268209377344eda599277ed2475dff9dd6.zip |
[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
llvm-svn: 159377
-rw-r--r-- | clang/tools/libclang/Indexing.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/tools/libclang/Indexing.cpp b/clang/tools/libclang/Indexing.cpp index e660c4d6eb4..6b681340f1a 100644 --- a/clang/tools/libclang/Indexing.cpp +++ b/clang/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, |