diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-06-10 13:44:22 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-06-10 13:44:22 +0000 | 
| commit | 1b08b196ac845675036ac78f3ac927d0a37f707c (patch) | |
| tree | 1fbd923674e903831dc097fdb4fdfd64dd6e47b1 /tools/libclang/CIndex.cpp | |
| parent | 551c698530debaae81139c7c76a29fb762793362 (diff) | |
Notes
Diffstat (limited to 'tools/libclang/CIndex.cpp')
| -rw-r--r-- | tools/libclang/CIndex.cpp | 6 | 
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp index 2d92de19d99c4..1ccf6cbd328e8 100644 --- a/tools/libclang/CIndex.cpp +++ b/tools/libclang/CIndex.cpp @@ -3300,12 +3300,14 @@ clang_parseTranslationUnit_Impl(CXIndex CIdx, const char *source_filename,        options & CXTranslationUnit_CreatePreambleOnFirstParse;    // FIXME: Add a flag for modules.    TranslationUnitKind TUKind -    = (options & CXTranslationUnit_Incomplete)? TU_Prefix : TU_Complete; +    = (options & (CXTranslationUnit_Incomplete | +                  CXTranslationUnit_SingleFileParse))? TU_Prefix : TU_Complete;    bool CacheCodeCompletionResults      = options & CXTranslationUnit_CacheCompletionResults;    bool IncludeBriefCommentsInCodeCompletion      = options & CXTranslationUnit_IncludeBriefCommentsInCodeCompletion;    bool SkipFunctionBodies = options & CXTranslationUnit_SkipFunctionBodies; +  bool SingleFileParse = options & CXTranslationUnit_SingleFileParse;    bool ForSerialization = options & CXTranslationUnit_ForSerialization;    // Configure the diagnostics. @@ -3390,7 +3392,7 @@ clang_parseTranslationUnit_Impl(CXIndex CIdx, const char *source_filename,        /*CaptureDiagnostics=*/true, *RemappedFiles.get(),        /*RemappedFilesKeepOriginalName=*/true, PrecompilePreambleAfterNParses,        TUKind, CacheCodeCompletionResults, IncludeBriefCommentsInCodeCompletion, -      /*AllowPCHWithCompilerErrors=*/true, SkipFunctionBodies, +      /*AllowPCHWithCompilerErrors=*/true, SkipFunctionBodies, SingleFileParse,        /*UserFilesAreVolatile=*/true, ForSerialization,        CXXIdx->getPCHContainerOperations()->getRawReader().getFormat(),        &ErrUnit));  | 
