Lines Matching refs:AST
748 ASTUnit &AST, in ConfigureDiags() argument
753 &AST.StoredDiagnostics, nullptr, in ConfigureDiags()
763 std::unique_ptr<ASTUnit> AST(new ASTUnit(true)); in LoadFromASTFile() local
767 ASTUnitCleanup(AST.get()); in LoadFromASTFile()
772 ConfigureDiags(Diags, *AST, CaptureDiagnostics); in LoadFromASTFile()
774 AST->LangOpts = std::make_shared<LangOptions>(); in LoadFromASTFile()
775 AST->OnlyLocalDecls = OnlyLocalDecls; in LoadFromASTFile()
776 AST->CaptureDiagnostics = CaptureDiagnostics; in LoadFromASTFile()
777 AST->Diagnostics = Diags; in LoadFromASTFile()
780 AST->FileMgr = new FileManager(FileSystemOpts, VFS); in LoadFromASTFile()
781 AST->UserFilesAreVolatile = UserFilesAreVolatile; in LoadFromASTFile()
782 AST->SourceMgr = new SourceManager(AST->getDiagnostics(), in LoadFromASTFile()
783 AST->getFileManager(), in LoadFromASTFile()
785 AST->ModuleCache = new InMemoryModuleCache; in LoadFromASTFile()
786 AST->HSOpts = std::make_shared<HeaderSearchOptions>(); in LoadFromASTFile()
787 AST->HSOpts->ModuleFormat = std::string(PCHContainerRdr.getFormat()); in LoadFromASTFile()
788 AST->HeaderInfo.reset(new HeaderSearch(AST->HSOpts, in LoadFromASTFile()
789 AST->getSourceManager(), in LoadFromASTFile()
790 AST->getDiagnostics(), in LoadFromASTFile()
791 AST->getLangOpts(), in LoadFromASTFile()
793 AST->PPOpts = std::make_shared<PreprocessorOptions>(); in LoadFromASTFile()
797 HeaderSearch &HeaderInfo = *AST->HeaderInfo; in LoadFromASTFile()
800 AST->PP = std::make_shared<Preprocessor>( in LoadFromASTFile()
801 AST->PPOpts, AST->getDiagnostics(), *AST->LangOpts, in LoadFromASTFile()
802 AST->getSourceManager(), HeaderInfo, AST->ModuleLoader, in LoadFromASTFile()
805 Preprocessor &PP = *AST->PP; in LoadFromASTFile()
808 AST->Ctx = new ASTContext(*AST->LangOpts, AST->getSourceManager(), in LoadFromASTFile()
816 AST->Reader = new ASTReader( in LoadFromASTFile()
817 PP, *AST->ModuleCache, AST->Ctx.get(), PCHContainerRdr, {}, in LoadFromASTFile()
821 AST->Reader->setListener(std::make_unique<ASTInfoCollector>( in LoadFromASTFile()
822 *AST->PP, AST->Ctx.get(), *AST->HSOpts, *AST->PPOpts, *AST->LangOpts, in LoadFromASTFile()
823 AST->TargetOpts, AST->Target, Counter)); in LoadFromASTFile()
830 if (AST->Ctx) in LoadFromASTFile()
831 AST->Ctx->setExternalSource(AST->Reader); in LoadFromASTFile()
833 switch (AST->Reader->ReadAST(Filename, serialization::MK_MainFile, in LoadFromASTFile()
844 AST->getDiagnostics().Report(diag::err_fe_unable_to_load_pch); in LoadFromASTFile()
848 AST->OriginalSourceFile = std::string(AST->Reader->getOriginalSourceFile()); in LoadFromASTFile()
854 AST->Consumer.reset(new ASTConsumer); in LoadFromASTFile()
858 AST->TheSema.reset(new Sema(PP, *AST->Ctx, *AST->Consumer)); in LoadFromASTFile()
859 AST->TheSema->Initialize(); in LoadFromASTFile()
860 AST->Reader->InitializeSema(*AST->TheSema); in LoadFromASTFile()
864 AST->getDiagnostics().getClient()->BeginSourceFile(PP.getLangOpts(), &PP); in LoadFromASTFile()
866 return AST; in LoadFromASTFile()
1486 std::unique_ptr<ASTUnit> AST(new ASTUnit(false)); in create() local
1487 ConfigureDiags(Diags, *AST, CaptureDiagnostics); in create()
1490 AST->Diagnostics = Diags; in create()
1491 AST->FileSystemOpts = CI->getFileSystemOpts(); in create()
1492 AST->Invocation = std::move(CI); in create()
1493 AST->FileMgr = new FileManager(AST->FileSystemOpts, VFS); in create()
1494 AST->UserFilesAreVolatile = UserFilesAreVolatile; in create()
1495 AST->SourceMgr = new SourceManager(AST->getDiagnostics(), *AST->FileMgr, in create()
1497 AST->ModuleCache = new InMemoryModuleCache; in create()
1499 return AST; in create()
1513 ASTUnit *AST = Unit; in LoadFromCompilerInvocationAction() local
1514 if (!AST) { in LoadFromCompilerInvocationAction()
1517 AST = OwnAST.get(); in LoadFromCompilerInvocationAction()
1518 if (!AST) in LoadFromCompilerInvocationAction()
1526 AST->OnlyLocalDecls = OnlyLocalDecls; in LoadFromCompilerInvocationAction()
1527 AST->CaptureDiagnostics = CaptureDiagnostics; in LoadFromCompilerInvocationAction()
1529 AST->PreambleRebuildCountdown = PrecompilePreambleAfterNParses; in LoadFromCompilerInvocationAction()
1530 AST->TUKind = Action ? Action->getTranslationUnitKind() : TU_Complete; in LoadFromCompilerInvocationAction()
1531 AST->ShouldCacheCodeCompletionResults = CacheCodeCompletionResults; in LoadFromCompilerInvocationAction()
1532 AST->IncludeBriefCommentsInCodeCompletion = false; in LoadFromCompilerInvocationAction()
1544 ProcessWarningOptions(AST->getDiagnostics(), CI->getDiagnosticOpts()); in LoadFromCompilerInvocationAction()
1555 AST->OriginalSourceFile = in LoadFromCompilerInvocationAction()
1560 Clang->setDiagnostics(&AST->getDiagnostics()); in LoadFromCompilerInvocationAction()
1576 AST->TheSema.reset(); in LoadFromCompilerInvocationAction()
1577 AST->Ctx = nullptr; in LoadFromCompilerInvocationAction()
1578 AST->PP = nullptr; in LoadFromCompilerInvocationAction()
1579 AST->Reader = nullptr; in LoadFromCompilerInvocationAction()
1582 Clang->setFileManager(&AST->getFileManager()); in LoadFromCompilerInvocationAction()
1585 Clang->setSourceManager(&AST->getSourceManager()); in LoadFromCompilerInvocationAction()
1591 TrackerAct.reset(new TopLevelDeclTrackerAction(*AST)); in LoadFromCompilerInvocationAction()
1600 AST->transferASTDataFromCompilerInstance(*Clang); in LoadFromCompilerInvocationAction()
1610 AST->getCurrentTopLevelHashValue())); in LoadFromCompilerInvocationAction()
1615 *AST, AST->getCurrentTopLevelHashValue())); in LoadFromCompilerInvocationAction()
1621 AST->transferASTDataFromCompilerInstance(*Clang); in LoadFromCompilerInvocationAction()
1629 AST->transferASTDataFromCompilerInstance(*Clang); in LoadFromCompilerInvocationAction()
1636 return AST; in LoadFromCompilerInvocationAction()
1682 std::unique_ptr<ASTUnit> AST(new ASTUnit(false)); in LoadFromCompilerInvocation() local
1683 ConfigureDiags(Diags, *AST, CaptureDiagnostics); in LoadFromCompilerInvocation()
1684 AST->Diagnostics = Diags; in LoadFromCompilerInvocation()
1685 AST->OnlyLocalDecls = OnlyLocalDecls; in LoadFromCompilerInvocation()
1686 AST->CaptureDiagnostics = CaptureDiagnostics; in LoadFromCompilerInvocation()
1687 AST->TUKind = TUKind; in LoadFromCompilerInvocation()
1688 AST->ShouldCacheCodeCompletionResults = CacheCodeCompletionResults; in LoadFromCompilerInvocation()
1689 AST->IncludeBriefCommentsInCodeCompletion in LoadFromCompilerInvocation()
1691 AST->Invocation = std::move(CI); in LoadFromCompilerInvocation()
1692 AST->FileSystemOpts = FileMgr->getFileSystemOpts(); in LoadFromCompilerInvocation()
1693 AST->FileMgr = FileMgr; in LoadFromCompilerInvocation()
1694 AST->UserFilesAreVolatile = UserFilesAreVolatile; in LoadFromCompilerInvocation()
1698 ASTUnitCleanup(AST.get()); in LoadFromCompilerInvocation()
1703 if (AST->LoadFromCompilerInvocation(std::move(PCHContainerOps), in LoadFromCompilerInvocation()
1705 &AST->FileMgr->getVirtualFileSystem())) in LoadFromCompilerInvocation()
1707 return AST; in LoadFromCompilerInvocation()
1761 std::unique_ptr<ASTUnit> AST; in LoadFromCommandLine() local
1762 AST.reset(new ASTUnit(false)); in LoadFromCommandLine()
1763 AST->NumStoredDiagnosticsFromDriver = StoredDiagnostics.size(); in LoadFromCommandLine()
1764 AST->StoredDiagnostics.swap(StoredDiagnostics); in LoadFromCommandLine()
1765 ConfigureDiags(Diags, *AST, CaptureDiagnostics); in LoadFromCommandLine()
1766 AST->Diagnostics = Diags; in LoadFromCommandLine()
1767 AST->FileSystemOpts = CI->getFileSystemOpts(); in LoadFromCommandLine()
1771 AST->FileMgr = new FileManager(AST->FileSystemOpts, VFS); in LoadFromCommandLine()
1772 AST->ModuleCache = new InMemoryModuleCache; in LoadFromCommandLine()
1773 AST->OnlyLocalDecls = OnlyLocalDecls; in LoadFromCommandLine()
1774 AST->CaptureDiagnostics = CaptureDiagnostics; in LoadFromCommandLine()
1775 AST->TUKind = TUKind; in LoadFromCommandLine()
1776 AST->ShouldCacheCodeCompletionResults = CacheCodeCompletionResults; in LoadFromCommandLine()
1777 AST->IncludeBriefCommentsInCodeCompletion in LoadFromCommandLine()
1779 AST->UserFilesAreVolatile = UserFilesAreVolatile; in LoadFromCommandLine()
1780 AST->Invocation = CI; in LoadFromCommandLine()
1781 AST->SkipFunctionBodies = SkipFunctionBodies; in LoadFromCommandLine()
1783 AST->WriterData.reset(new ASTWriterData(*AST->ModuleCache)); in LoadFromCommandLine()
1790 ASTUnitCleanup(AST.get()); in LoadFromCommandLine()
1792 if (AST->LoadFromCompilerInvocation(std::move(PCHContainerOps), in LoadFromCommandLine()
1798 AST->StoredDiagnostics.swap(AST->FailedParseDiagnostics); in LoadFromCommandLine()
1799 ErrAST->swap(AST); in LoadFromCommandLine()
1804 return AST.release(); in LoadFromCommandLine()
1889 ASTUnit &AST; member in __anonc715c21c0611::AugmentedCodeCompleteConsumer
1893 AugmentedCodeCompleteConsumer(ASTUnit &AST, CodeCompleteConsumer &Next, in AugmentedCodeCompleteConsumer() argument
1895 : CodeCompleteConsumer(CodeCompleteOpts), AST(AST), Next(Next) { in AugmentedCodeCompleteConsumer()
1913 if (AST.getASTContext().getLangOpts().CPlusPlus) in AugmentedCodeCompleteConsumer()
2042 C = AST.cached_completion_begin(), in ProcessCodeCompleteResults()
2043 CEnd = AST.cached_completion_end(); in ProcessCodeCompleteResults()
2080 = AST.getCachedCompletionTypes(); in ProcessCodeCompleteResults()