Lines Matching defs:TU
77 if (TU)
78 clang_disposeTranslationUnit(TU);
230 ASTUnit *Unit = cxtu::getASTUnit(TU);
279 ASTUnit *Unit = cxtu::getASTUnit(TU);
342 if (Visit(MakeCXCursor(D, TU, Range), /*CheckedRegionOfInterest=*/true))
362 if (Visit(MakeCXCursor(D, TU, Range), /*CheckedRegionOfInterest=*/true))
433 if (Visit(MakeMacroExpansionCursor(ME, TU)))
440 if (Visit(MakeMacroDefinitionCursor(MD, TU)))
447 if (Visit(MakeInclusionDirectiveCursor(ID, TU)))
495 CXTranslationUnit TU = getCursorTU(Cursor);
496 ASTUnit *CXXUnit = cxtu::getASTUnit(TU);
506 if (Visit(MakeCXCursor(*TL, TU, RegionOfInterest), true))
536 A->getInterfaceLoc(), TU));
547 getMacroInfo(cxcursor::getCursorMacroDefinition(Cursor), TU);
549 checkForMacroInMacroDefinition(MI, Loc, TU))
550 return Visit(cxcursor::MakeMacroExpansionCursor(MacroDef, BeginLoc, TU));
563 return Visit(MakeCXCursor(Body, StmtParent, TU, RegionOfInterest));
603 CXCursor Cursor = MakeCXCursor(D, TU, RegionOfInterest);
620 Cursor = MakeCursorObjCClassRef(ID, ID->getLocation(), TU);
625 Cursor = MakeCursorObjCProtocolRef(PD, PD->getLocation(), TU);
724 return Visit(MakeCXCursor(Init, StmtParent, TU, RegionOfInterest));
824 Init->getMemberLocation(), TU)))
833 if (Visit(MakeCXCursor(Initializer, ND, TU, RegionOfInterest)))
838 if (Visit(MakeCXCursor(ND->getBody(), StmtParent, TU, RegionOfInterest)))
850 return Visit(MakeCXCursor(BitWidth, StmtParent, TU, RegionOfInterest));
860 return Visit(MakeCXCursor(Init, StmtParent, TU, RegionOfInterest));
871 return Visit(MakeCXCursor(DefArg, StmtParent, TU, RegionOfInterest));
913 if (Visit(MakeCXCursor(*P, TU, RegionOfInterest)))
918 Visit(MakeCXCursor(ND->getBody(), StmtParent, TU, RegionOfInterest)))
1005 CXCursor Cursor = MakeCXCursor(*I, TU, RegionOfInterest);
1019 TU)))
1025 if (Visit(MakeCursorObjCProtocolRef(*I, *PL, TU)))
1033 return Visit(MakeCursorObjCProtocolRef(PID, PID->getLocation(), TU));
1038 if (Visit(MakeCursorObjCProtocolRef(*I, *PL, TU)))
1070 if (Visit(MakeCXCursor(MD, TU, RegionOfInterest)))
1075 if (Visit(MakeCXCursor(MD, TU, RegionOfInterest)))
1084 return Visit(MakeCursorObjCClassRef(D, D->getLocation(), TU));
1091 TU)))
1097 if (Visit(MakeCursorObjCProtocolRef(*I, *PL, TU)))
1110 if (Visit(MakeCursorObjCClassRef(ID, D->getLocation(), TU)))
1123 TU)))
1133 return Visit(MakeCursorMemberRef(Ivar, PD->getPropertyIvarDeclLoc(), TU));
1149 D->getTargetNameLoc(), TU));
1159 if (Visit(MakeCursorOverloadedDeclRef(D, D->getLocation(), TU)))
1172 D->getIdentLocation(), TU));
1236 TU));
1240 Range.getBegin(), TU));
1248 return Visit(MakeCursorTypeRef(Typedef->getDecl(), Range.getBegin(), TU));
1250 return Visit(MakeCursorTypeRef(Tag->getDecl(), Range.getBegin(), TU));
1279 TU)))
1287 TU)))
1316 if (Visit(MakeCXCursor(*P, TU, RegionOfInterest)))
1326 return Visit(MakeCursorTemplateRef(Name.getAsTemplateDecl(), Loc, TU));
1330 if (Visit(MakeCursorOverloadedDeclRef(Name, Loc, TU)))
1343 Loc, TU));
1348 Loc, TU));
1353 Loc, TU));
1373 return Visit(MakeCXCursor(E, StmtParent, TU, RegionOfInterest));
1378 return Visit(MakeCXCursor(E, StmtParent, TU, RegionOfInterest));
1383 return Visit(MakeCXCursor(E, StmtParent, TU, RegionOfInterest));
1449 TU));
1456 return Visit(MakeCursorTypeRef(TL.getTypedefNameDecl(), TL.getNameLoc(), TU));
1460 return Visit(MakeCursorTypeRef(TL.getDecl(), TL.getNameLoc(), TU));
1465 return Visit(MakeCXCursor(TL.getDecl(), TU, RegionOfInterest));
1467 return Visit(MakeCursorTypeRef(TL.getDecl(), TL.getNameLoc(), TU));
1471 return Visit(MakeCursorTypeRef(TL.getDecl(), TL.getNameLoc(), TU));
1475 if (Visit(MakeCursorObjCClassRef(TL.getIFaceDecl(), TL.getNameLoc(), TU)))
1487 TU)))
1533 if (Visit(MakeCXCursor(D, TU, RegionOfInterest)))
1544 return Visit(MakeCXCursor(Size, StmtParent, TU, RegionOfInterest));
1569 return Visit(MakeCXCursor(TL.getUnderlyingExpr(), StmtParent, TU));
1621 return Visit(MakeCXCursor(E, StmtParent, TU));
1627 return Visit(MakeCursorTypeRef(TL.getDecl(), TL.getNameLoc(), TU));
1664 if (Visit(cxcursor::MakeCursorCXXBaseSpecifier(I, TU)))
1675 if (Visit(MakeCXCursor(*i, D, TU)))
2243 EnqueueVisitor(WL, MakeCXCursor(S, StmtParent, TU,RegionOfInterest)).Visit(S);
2271 if (Visit(MakeCXCursor(D, TU, RegionOfInterest,
2298 TU))) {
2320 if (Visit(MakeCursorMemberRef(V->get(), V->getLoc(), TU)))
2330 CXCursor Cursor = MakeCXCursor(S, StmtParent, TU, RegionOfInterest);
2389 if (Visit(MakeCursorOverloadedDeclRef(O, TU)))
2398 E->getPackLoc(), TU)))
2406 TU)))
2429 TU)))
2445 if (Visit(MakeCXCursor(Proto.getArg(I), TU)))
2612 ASTUnit *TU = ASTUnit::LoadFromASTFile(ast_filename, Diags, FileSystemOpts,
2618 return MakeCXTranslationUnit(CXXIdx, TU);
2823 unsigned clang_defaultSaveOptions(CXTranslationUnit TU) {
2830 CXTranslationUnit TU;
2842 CIndexer *CXXIdx = STUI->TU->CIdx;
2846 bool hadError = cxtu::getASTUnit(STUI->TU)->Save(STUI->FileName);
2850 TU, const char *FileName,
2853 *Log << TU << ' ' << FileName;
2856 if (!TU)
2859 ASTUnit *CXXUnit = cxtu::getASTUnit(TU);
2864 SaveTranslationUnitInfo STUI = { TU, FileName, options, CXSaveError_None };
2871 PrintLibclangResourceUsage(TU);
2890 PrintLibclangResourceUsage(TU);
2912 unsigned clang_defaultReparseOptions(CXTranslationUnit TU) {
2917 CXTranslationUnit TU;
2927 CXTranslationUnit TU = RTUI->TU;
2928 if (!TU)
2932 delete static_cast<CXDiagnosticSetImpl*>(TU->Diagnostics);
2933 TU->Diagnostics = 0;
2941 CIndexer *CXXIdx = TU->CIdx;
2945 ASTUnit *CXXUnit = cxtu::getASTUnit(TU);
2968 int clang_reparseTranslationUnit(CXTranslationUnit TU,
2973 *Log << TU;
2976 ReparseTranslationUnitInfo RTUI = { TU, num_unsaved_files, unsaved_files,
2988 cxtu::getASTUnit(TU)->setUnsafeToFree(true);
2991 PrintLibclangResourceUsage(TU);
3005 CXCursor clang_getTranslationUnitCursor(CXTranslationUnit TU) {
3006 if (!TU)
3009 ASTUnit *CXXUnit = cxtu::getASTUnit(TU);
3010 return MakeCXCursor(CXXUnit->getASTContext().getTranslationUnitDecl(), TU);
3036 CXFile clang_getFile(CXTranslationUnit TU, const char *file_name) {
3037 if (!TU)
3040 ASTUnit *CXXUnit = cxtu::getASTUnit(TU);
3046 unsigned clang_isFileMultipleIncludeGuarded(CXTranslationUnit TU, CXFile file) {
3047 if (!TU || !file)
3050 ASTUnit *CXXUnit = cxtu::getASTUnit(TU);
3933 CXCursor clang_getCursor(CXTranslationUnit TU, CXSourceLocation Loc) {
3934 if (!TU)
3937 ASTUnit *CXXUnit = cxtu::getASTUnit(TU);
3941 CXCursor Result = cxcursor::getCursor(TU, SLoc);
4202 CXCursor cxcursor::getCursor(CXTranslationUnit TU, SourceLocation SLoc) {
4203 assert(TU);
4210 ASTUnit *CXXUnit = cxtu::getASTUnit(TU);
4220 CursorVisitor CursorVis(TU, GetCursorVisitor, &ResultData,
4285 ASTUnit *TU = getCursorASTUnit(C);
4287 return TU->mapRangeFromPreamble(Range);
4291 ASTUnit *TU = getCursorASTUnit(C);
4293 return TU->mapRangeFromPreamble(Range);
4297 ASTUnit *TU = getCursorASTUnit(C);
4299 return TU->mapRangeFromPreamble(Range);
4303 ASTUnit *TU = getCursorASTUnit(C);
4304 FileID MainID = TU->getSourceManager().getMainFileID();
4305 SourceLocation Start = TU->getSourceManager().getLocForStartOfFile(MainID);
4306 SourceLocation End = TU->getSourceManager().getLocForEndOfFile(MainID);
4385 CXTranslationUnit tu = getCursorTU(C);
4391 return MakeCursorOverloadedDeclRef(Using, D->getLocation(), tu);
4395 return MakeCXCursor(Property, tu);
4404 CXCursor declCursor = MakeCXCursor(D, tu);
4411 return MakeCursorOverloadedDeclRef(Ovl, tu);
4421 return MakeCXCursor(labelS, getCursorDecl(C), tu);
4428 return MakeMacroDefinitionCursor(Def, tu);
4436 return MakeCXCursor(getCursorObjCSuperClassRef(C).first, tu);
4441 return MakeCXCursor(Def, tu);
4443 return MakeCXCursor(Prot, tu);
4449 return MakeCXCursor(Def, tu);
4451 return MakeCXCursor(Class, tu);
4455 return MakeCXCursor(getCursorTypeRef(C).first, tu );
4458 return MakeCXCursor(getCursorTemplateRef(C).first, tu );
4461 return MakeCXCursor(getCursorNamespaceRef(C).first, tu );
4464 return MakeCXCursor(getCursorMemberRef(C).first, tu );
4469 tu ));
4476 cxtu::getASTUnit(tu)->getASTContext()
4478 tu);
4484 return MakeCXCursor(getCursorVariableRef(C).first, tu);
4496 CXTranslationUnit TU = getCursorTU(C);
4560 TU);
4563 return MakeCXCursor(cast<NamespaceAliasDecl>(D)->getNamespace(), TU);
4571 return MakeCXCursor(Def, TU);
4581 return MakeCXCursor(Def, TU);
4590 return MakeCXCursor(Def, TU);
4597 return MakeCXCursor(Def->getDescribedFunctionTemplate(), TU);
4605 TU);
4612 return MakeCXCursor(cast<VarDecl>(Def)->getDescribedVarTemplate(), TU);
4618 D->getLocation(), TU);
4623 TU));
4639 return MakeCXCursor(Def, TU);
4647 return MakeCXCursor(Impl, TU);
4652 return MakeCXCursor(Def, TU);
4664 return MakeCXCursor(Def, TU);
4666 return MakeCXCursor(Impl, TU);
4679 return MakeCXCursor(Def, TU);
4685 return clang_getCursorDefinition(MakeCXCursor(Friend, TU));
4690 return clang_getCursorDefinition(MakeCXCursor(Friend, TU));
4753 CXTranslationUnit TU = getCursorTU(cursor);
4756 return MakeCXCursor(E->decls_begin()[index], TU);
4760 return MakeCXCursor(S->begin()[index], TU);
4767 return MakeCXCursor(cast<UsingShadowDecl>(*Pos)->getTargetDecl(), TU);
4870 CXString clang_getTokenSpelling(CXTranslationUnit TU, CXToken CXTok) {
4891 ASTUnit *CXXUnit = cxtu::getASTUnit(TU);
4907 CXSourceLocation clang_getTokenLocation(CXTranslationUnit TU, CXToken CXTok) {
4908 ASTUnit *CXXUnit = cxtu::getASTUnit(TU);
4916 CXSourceRange clang_getTokenExtent(CXTranslationUnit TU, CXToken CXTok) {
4917 ASTUnit *CXXUnit = cxtu::getASTUnit(TU);
4997 void clang_tokenize(CXTranslationUnit TU, CXSourceRange Range,
5000 *Log << TU << ' ' << Range;
5008 if (!TU)
5011 ASTUnit *CXXUnit = cxtu::getASTUnit(TU);
5032 void clang_disposeTokens(CXTranslationUnit TU,
5087 CXTranslationUnit TU, SourceRange RegionOfInterest)
5090 AnnotateVis(TU,
5097 SrcMgr(cxtu::getASTUnit(TU)->getSourceManager()),
5469 CXTranslationUnit TU;
5492 static void annotatePreprocessorTokens(CXTranslationUnit TU,
5497 ASTUnit *CXXUnit = cxtu::getASTUnit(TU);
5555 MI = getMacroInfo(II, MappedTokLoc, TU);
5570 MacroDefinition *MacroDef = checkForMacroInMacroDefinition(MI,Tok,TU);
5574 Tok.getLocation(), TU);
5583 MakePreprocessingDirectiveCursor(SourceRange(BeginLoc, EndLoc), TU);
5597 CXTranslationUnit TU = ((clang_annotateTokens_Data*)UserData)->TU;
5603 CIndexer *CXXIdx = TU->CIdx;
5610 cxloc::translateSourceLocation(clang_getTokenLocation(TU, Tokens[0])));
5612 cxloc::translateSourceLocation(clang_getTokenLocation(TU,
5617 annotatePreprocessorTokens(TU, RegionOfInterest, Cursors, Tokens, NumTokens);
5633 CursorVisitor MacroArgMarker(TU,
5643 AnnotateTokensWorker W(Tokens, Cursors, NumTokens, TU, RegionOfInterest);
5709 void clang_annotateTokens(CXTranslationUnit TU,
5712 if (!TU || NumTokens == 0 || !Tokens || !Cursors) {
5718 *Log << TU << ' ';
5719 CXSourceLocation bloc = clang_getTokenLocation(TU, Tokens[0]);
5720 CXSourceLocation eloc = clang_getTokenLocation(TU, Tokens[NumTokens-1]);
5729 ASTUnit *CXXUnit = cxtu::getASTUnit(TU);
5735 clang_annotateTokens_Data data = { TU, CXXUnit, Tokens, NumTokens, Cursors };
6175 unsigned clang_Module_getNumTopLevelHeaders(CXTranslationUnit TU,
6177 if (!TU || !CXMod)
6180 FileManager &FileMgr = cxtu::getASTUnit(TU)->getFileManager();
6185 CXFile clang_Module_getTopLevelHeader(CXTranslationUnit TU,
6187 if (!TU || !CXMod)
6190 FileManager &FileMgr = cxtu::getASTUnit(TU)->getFileManager();
6329 CXTUResourceUsage clang_getCXTUResourceUsage(CXTranslationUnit TU) {
6330 if (!TU) {
6335 ASTUnit *astUnit = cxtu::getASTUnit(TU);
6428 void clang::PrintLibclangResourceUsage(CXTranslationUnit TU) {
6429 CXTUResourceUsage Usage = clang_getCXTUResourceUsage(TU);
6500 CXTranslationUnit TU){
6501 if (MacroDefLoc.isInvalid() || !TU)
6506 ASTUnit *Unit = cxtu::getASTUnit(TU);
6521 CXTranslationUnit TU) {
6522 if (!MacroDef || !TU)
6528 return getMacroInfo(*II, MacroDef->getLocation(), TU);
6533 CXTranslationUnit TU) {
6534 if (!MI || !TU)
6543 ASTUnit *Unit = cxtu::getASTUnit(TU);
6575 CXTranslationUnit TU) {
6576 if (Loc.isInvalid() || !MI || !TU)
6581 ASTUnit *Unit = cxtu::getASTUnit(TU);
6590 return checkForMacroInMacroDefinition(MI, Tok, TU);
6601 Logger &cxindex::Logger::operator<<(CXTranslationUnit TU) {
6602 if (TU) {
6603 if (ASTUnit *Unit = cxtu::getASTUnit(TU)) {
6611 LogOS << "<NULL TU>";