summaryrefslogtreecommitdiff
path: root/tools/libclang/Indexing.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2012-08-15 20:02:54 +0000
committerDimitry Andric <dim@FreeBSD.org>2012-08-15 20:02:54 +0000
commit56d91b49b13fe55c918afbda19f6165b5fbff87a (patch)
tree9abb1a658a297776086f4e0dfa6ca533de02104e /tools/libclang/Indexing.cpp
parent41e20f564abdb05101d6b2b29c59459a966c22cc (diff)
Notes
Diffstat (limited to 'tools/libclang/Indexing.cpp')
-rw-r--r--tools/libclang/Indexing.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/libclang/Indexing.cpp b/tools/libclang/Indexing.cpp
index e660c4d6eb486..8fe9c36556f74 100644
--- a/tools/libclang/Indexing.cpp
+++ b/tools/libclang/Indexing.cpp
@@ -353,7 +353,8 @@ static void clang_indexSourceFile_Impl(void *UserData) {
CInvok->getDiagnosticOpts().IgnoreWarnings = true;
ASTUnit *Unit = ASTUnit::create(CInvok.getPtr(), Diags,
- /*CaptureDiagnostics=*/true);
+ /*CaptureDiagnostics=*/true,
+ /*UserFilesAreVolatile=*/true);
OwningPtr<CXTUOwner> CXTU(new CXTUOwner(MakeCXTranslationUnit(CXXIdx, Unit)));
// Recover resources if we crash before exiting this method.
@@ -369,7 +370,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,11 +393,13 @@ static void clang_indexSourceFile_Impl(void *UserData) {
IndexAction.get(),
Unit,
Persistent,
- ResourceFilesPath,
+ CXXIdx->getClangResourcesPath(),
OnlyLocalDecls,
/*CaptureDiagnostics=*/true,
PrecompilePreamble,
- CacheCodeCompletionResults);
+ CacheCodeCompletionResults,
+ /*IncludeBriefCommentsInCodeCompletion=*/false,
+ /*UserFilesAreVolatile=*/true);
if (DiagTrap.hasErrorOccurred() && CXXIdx->getDisplayDiagnostics())
printDiagsToStderr(Unit);