Lines Matching refs:AST
727 ASTUnit &AST, bool CaptureDiagnostics) { in ConfigureDiags() argument
730 Diags->setClient(new StoredDiagnosticConsumer(&AST.StoredDiagnostics, nullptr)); in ConfigureDiags()
740 std::unique_ptr<ASTUnit> AST(new ASTUnit(true)); in LoadFromASTFile() local
744 ASTUnitCleanup(AST.get()); in LoadFromASTFile()
749 ConfigureDiags(Diags, *AST, CaptureDiagnostics); in LoadFromASTFile()
751 AST->LangOpts = std::make_shared<LangOptions>(); in LoadFromASTFile()
752 AST->OnlyLocalDecls = OnlyLocalDecls; in LoadFromASTFile()
753 AST->CaptureDiagnostics = CaptureDiagnostics; in LoadFromASTFile()
754 AST->Diagnostics = Diags; in LoadFromASTFile()
757 AST->FileMgr = new FileManager(FileSystemOpts, VFS); in LoadFromASTFile()
758 AST->UserFilesAreVolatile = UserFilesAreVolatile; in LoadFromASTFile()
759 AST->SourceMgr = new SourceManager(AST->getDiagnostics(), in LoadFromASTFile()
760 AST->getFileManager(), in LoadFromASTFile()
762 AST->PCMCache = new MemoryBufferCache; in LoadFromASTFile()
763 AST->HSOpts = std::make_shared<HeaderSearchOptions>(); in LoadFromASTFile()
764 AST->HSOpts->ModuleFormat = PCHContainerRdr.getFormat(); in LoadFromASTFile()
765 AST->HeaderInfo.reset(new HeaderSearch(AST->HSOpts, in LoadFromASTFile()
766 AST->getSourceManager(), in LoadFromASTFile()
767 AST->getDiagnostics(), in LoadFromASTFile()
768 AST->getLangOpts(), in LoadFromASTFile()
770 AST->PPOpts = std::make_shared<PreprocessorOptions>(); in LoadFromASTFile()
773 AST->PPOpts->addRemappedFile(RemappedFile.first, RemappedFile.second); in LoadFromASTFile()
777 HeaderSearch &HeaderInfo = *AST->HeaderInfo; in LoadFromASTFile()
780 AST->PP = std::make_shared<Preprocessor>( in LoadFromASTFile()
781 AST->PPOpts, AST->getDiagnostics(), *AST->LangOpts, in LoadFromASTFile()
782 AST->getSourceManager(), *AST->PCMCache, HeaderInfo, AST->ModuleLoader, in LoadFromASTFile()
785 Preprocessor &PP = *AST->PP; in LoadFromASTFile()
788 AST->Ctx = new ASTContext(*AST->LangOpts, AST->getSourceManager(), in LoadFromASTFile()
795 AST->Reader = new ASTReader(PP, AST->Ctx.get(), PCHContainerRdr, {}, in LoadFromASTFile()
800 AST->Reader->setListener(llvm::make_unique<ASTInfoCollector>( in LoadFromASTFile()
801 *AST->PP, AST->Ctx.get(), *AST->HSOpts, *AST->PPOpts, *AST->LangOpts, in LoadFromASTFile()
802 AST->TargetOpts, AST->Target, Counter)); in LoadFromASTFile()
809 if (AST->Ctx) in LoadFromASTFile()
810 AST->Ctx->setExternalSource(AST->Reader); in LoadFromASTFile()
812 switch (AST->Reader->ReadAST(Filename, serialization::MK_MainFile, in LoadFromASTFile()
823 AST->getDiagnostics().Report(diag::err_fe_unable_to_load_pch); in LoadFromASTFile()
827 AST->OriginalSourceFile = AST->Reader->getOriginalSourceFile(); in LoadFromASTFile()
833 AST->Consumer.reset(new ASTConsumer); in LoadFromASTFile()
837 AST->TheSema.reset(new Sema(PP, *AST->Ctx, *AST->Consumer)); in LoadFromASTFile()
838 AST->TheSema->Initialize(); in LoadFromASTFile()
839 AST->Reader->InitializeSema(*AST->TheSema); in LoadFromASTFile()
843 AST->getDiagnostics().getClient()->BeginSourceFile(PP.getLangOpts(), &PP); in LoadFromASTFile()
845 return AST; in LoadFromASTFile()
1470 std::unique_ptr<ASTUnit> AST(new ASTUnit(false)); in create() local
1471 ConfigureDiags(Diags, *AST, CaptureDiagnostics); in create()
1474 AST->Diagnostics = Diags; in create()
1475 AST->FileSystemOpts = CI->getFileSystemOpts(); in create()
1476 AST->Invocation = std::move(CI); in create()
1477 AST->FileMgr = new FileManager(AST->FileSystemOpts, VFS); in create()
1478 AST->UserFilesAreVolatile = UserFilesAreVolatile; in create()
1479 AST->SourceMgr = new SourceManager(AST->getDiagnostics(), *AST->FileMgr, in create()
1481 AST->PCMCache = new MemoryBufferCache; in create()
1483 return AST; in create()
1498 ASTUnit *AST = Unit; in LoadFromCompilerInvocationAction() local
1499 if (!AST) { in LoadFromCompilerInvocationAction()
1502 AST = OwnAST.get(); in LoadFromCompilerInvocationAction()
1503 if (!AST) in LoadFromCompilerInvocationAction()
1511 AST->OnlyLocalDecls = OnlyLocalDecls; in LoadFromCompilerInvocationAction()
1512 AST->CaptureDiagnostics = CaptureDiagnostics; in LoadFromCompilerInvocationAction()
1514 AST->PreambleRebuildCounter = PrecompilePreambleAfterNParses; in LoadFromCompilerInvocationAction()
1515 AST->TUKind = Action ? Action->getTranslationUnitKind() : TU_Complete; in LoadFromCompilerInvocationAction()
1516 AST->ShouldCacheCodeCompletionResults = CacheCodeCompletionResults; in LoadFromCompilerInvocationAction()
1517 AST->IncludeBriefCommentsInCodeCompletion in LoadFromCompilerInvocationAction()
1530 ProcessWarningOptions(AST->getDiagnostics(), CI->getDiagnosticOpts()); in LoadFromCompilerInvocationAction()
1541 AST->OriginalSourceFile = Clang->getFrontendOpts().Inputs[0].getFile(); in LoadFromCompilerInvocationAction()
1545 Clang->setDiagnostics(&AST->getDiagnostics()); in LoadFromCompilerInvocationAction()
1569 AST->TheSema.reset(); in LoadFromCompilerInvocationAction()
1570 AST->Ctx = nullptr; in LoadFromCompilerInvocationAction()
1571 AST->PP = nullptr; in LoadFromCompilerInvocationAction()
1572 AST->Reader = nullptr; in LoadFromCompilerInvocationAction()
1575 Clang->setFileManager(&AST->getFileManager()); in LoadFromCompilerInvocationAction()
1578 Clang->setSourceManager(&AST->getSourceManager()); in LoadFromCompilerInvocationAction()
1584 TrackerAct.reset(new TopLevelDeclTrackerAction(*AST)); in LoadFromCompilerInvocationAction()
1593 AST->transferASTDataFromCompilerInstance(*Clang); in LoadFromCompilerInvocationAction()
1603 AST->getCurrentTopLevelHashValue())); in LoadFromCompilerInvocationAction()
1608 *AST, AST->getCurrentTopLevelHashValue())); in LoadFromCompilerInvocationAction()
1613 AST->transferASTDataFromCompilerInstance(*Clang); in LoadFromCompilerInvocationAction()
1621 AST->transferASTDataFromCompilerInstance(*Clang); in LoadFromCompilerInvocationAction()
1628 return AST; in LoadFromCompilerInvocationAction()
1674 std::unique_ptr<ASTUnit> AST(new ASTUnit(false)); in LoadFromCompilerInvocation() local
1675 ConfigureDiags(Diags, *AST, CaptureDiagnostics); in LoadFromCompilerInvocation()
1676 AST->Diagnostics = Diags; in LoadFromCompilerInvocation()
1677 AST->OnlyLocalDecls = OnlyLocalDecls; in LoadFromCompilerInvocation()
1678 AST->CaptureDiagnostics = CaptureDiagnostics; in LoadFromCompilerInvocation()
1679 AST->TUKind = TUKind; in LoadFromCompilerInvocation()
1680 AST->ShouldCacheCodeCompletionResults = CacheCodeCompletionResults; in LoadFromCompilerInvocation()
1681 AST->IncludeBriefCommentsInCodeCompletion in LoadFromCompilerInvocation()
1683 AST->Invocation = std::move(CI); in LoadFromCompilerInvocation()
1684 AST->FileSystemOpts = FileMgr->getFileSystemOpts(); in LoadFromCompilerInvocation()
1685 AST->FileMgr = FileMgr; in LoadFromCompilerInvocation()
1686 AST->UserFilesAreVolatile = UserFilesAreVolatile; in LoadFromCompilerInvocation()
1690 ASTUnitCleanup(AST.get()); in LoadFromCompilerInvocation()
1695 if (AST->LoadFromCompilerInvocation(std::move(PCHContainerOps), in LoadFromCompilerInvocation()
1697 AST->FileMgr->getVirtualFileSystem())) in LoadFromCompilerInvocation()
1699 return AST; in LoadFromCompilerInvocation()
1750 std::unique_ptr<ASTUnit> AST; in LoadFromCommandLine() local
1751 AST.reset(new ASTUnit(false)); in LoadFromCommandLine()
1752 AST->NumStoredDiagnosticsFromDriver = StoredDiagnostics.size(); in LoadFromCommandLine()
1753 AST->StoredDiagnostics.swap(StoredDiagnostics); in LoadFromCommandLine()
1754 ConfigureDiags(Diags, *AST, CaptureDiagnostics); in LoadFromCommandLine()
1755 AST->Diagnostics = Diags; in LoadFromCommandLine()
1756 AST->FileSystemOpts = CI->getFileSystemOpts(); in LoadFromCommandLine()
1760 AST->FileMgr = new FileManager(AST->FileSystemOpts, VFS); in LoadFromCommandLine()
1761 AST->PCMCache = new MemoryBufferCache; in LoadFromCommandLine()
1762 AST->OnlyLocalDecls = OnlyLocalDecls; in LoadFromCommandLine()
1763 AST->CaptureDiagnostics = CaptureDiagnostics; in LoadFromCommandLine()
1764 AST->TUKind = TUKind; in LoadFromCommandLine()
1765 AST->ShouldCacheCodeCompletionResults = CacheCodeCompletionResults; in LoadFromCommandLine()
1766 AST->IncludeBriefCommentsInCodeCompletion in LoadFromCommandLine()
1768 AST->UserFilesAreVolatile = UserFilesAreVolatile; in LoadFromCommandLine()
1769 AST->Invocation = CI; in LoadFromCommandLine()
1770 AST->SkipFunctionBodies = SkipFunctionBodies; in LoadFromCommandLine()
1772 AST->WriterData.reset(new ASTWriterData(*AST->PCMCache)); in LoadFromCommandLine()
1779 ASTUnitCleanup(AST.get()); in LoadFromCommandLine()
1781 if (AST->LoadFromCompilerInvocation(std::move(PCHContainerOps), in LoadFromCommandLine()
1787 AST->StoredDiagnostics.swap(AST->FailedParseDiagnostics); in LoadFromCommandLine()
1788 ErrAST->swap(AST); in LoadFromCommandLine()
1793 return AST.release(); in LoadFromCommandLine()
1878 ASTUnit &AST; member in __anon0cd8e0a00511::AugmentedCodeCompleteConsumer
1882 AugmentedCodeCompleteConsumer(ASTUnit &AST, CodeCompleteConsumer &Next, in AugmentedCodeCompleteConsumer() argument
1885 AST(AST), Next(Next) { in AugmentedCodeCompleteConsumer()
1903 if (AST.getASTContext().getLangOpts().CPlusPlus) in AugmentedCodeCompleteConsumer()
2032 C = AST.cached_completion_begin(), in ProcessCodeCompleteResults()
2033 CEnd = AST.cached_completion_end(); in ProcessCodeCompleteResults()
2070 = AST.getCachedCompletionTypes(); in ProcessCodeCompleteResults()