Home
last modified time | relevance | path

Searched refs:getMainFileID (Results 1 – 25 of 118) sorted by relevance

12345

/llvm-project-15.0.7/clang/lib/Frontend/Rewrite/
H A DRewriteMacros.cpp67 llvm::MemoryBufferRef FromFile = SM.getBufferOrFake(SM.getMainFileID()); in LexRawTokensFromMainFile()
68 Lexer RawLex(SM.getMainFileID(), FromFile, SM, PP.getLangOpts()); in LexRawTokensFromMainFile()
94 RewriteBuffer &RB = Rewrite.getEditBuffer(SM.getMainFileID()); in RewriteMacrosInInput()
209 Rewrite.getRewriteBufferFor(SM.getMainFileID())) { in RewriteMacrosInInput()
H A DRewriteTest.cpp22 TokenRewriter Rewriter(SM.getMainFileID(), SM, LangOpts); in DoRewriteTest()
H A DHTMLPrint.cpp64 FileID FID = R.getSourceMgr().getMainFileID(); in HandleTranslationUnit()
/llvm-project-15.0.7/clang-tools-extra/clangd/refactor/
H A DTweak.cpp68 Code = SM.getBufferData(SM.getMainFileID()); in Selection()
69 Cursor = SM.getComposedLoc(SM.getMainFileID(), RangeBegin); in Selection()
117 auto PathAndEdit = fileEdit(SM, SM.getMainFileID(), std::move(Replacements)); in mainFileEdit()
/llvm-project-15.0.7/clang-tools-extra/clangd/
H A DSemanticSelection.cpp49 if ((Begin.first != SM.getMainFileID()) || (End.first != SM.getMainFileID())) in toFoldingRange()
115 auto FID = SM.getMainFileID(); in getSemanticRanges()
133 if (!SR || SM.getFileID(SR->getBegin()) != SM.getMainFileID()) { in getSemanticRanges()
H A DHeaders.cpp54 auto MainFID = SM.getMainFileID(); in InclusionDirective()
165 SM.getLineNumber(SM.getMainFileID(), Offset) - 1; in HandleComment()
243 MainFileEntry = SM.getFileEntryForID(SM.getMainFileID()); in collect()
H A DIncludeCleaner.cpp247 for (const syntax::Token &Tok : Tokens->spelledTokens(SM.getMainFileID())) { in findReferencedMacros()
308 for (const FileEntry *FE = SM.getFileEntryForID(ID); ID != SM.getMainFileID(); in headerResponsible()
483 .getFileEntryRefForID(AST.getSourceManager().getMainFileID()) in issueUnusedIncludesDiagnostics()
/llvm-project-15.0.7/clang/unittests/Tooling/Syntax/
H A DTokensTest.cpp182 Ls.first = SourceMgr->getLocForStartOfFile(SourceMgr->getMainFileID()) in RangeIs()
184 Ls.second = SourceMgr->getLocForStartOfFile(SourceMgr->getMainFileID()) in RangeIs()
249 File = SourceMgr->getMainFileID(); in findSpelled()
370 Buffer.spelledTokens(SourceMgr->getMainFileID()), in TEST_F()
377 auto StartLoc = SourceMgr->getLocForStartOfFile(SourceMgr->getMainFileID()); in TEST_F()
920 EXPECT_EQ(Int.range(SM), FileRange(SM.getMainFileID(), Code.range("i").Begin, in TEST_F()
923 FileRange(SM.getMainFileID(), Code.range("all").Begin, in TEST_F()
941 auto Expansions = Buffer.macroExpansions(SM.getMainFileID()); in TEST_F()
945 FileRange(SM.getMainFileID(), Range.Begin, Range.End)); in TEST_F()
957 SourceLocation Loc = SourceMgr->getComposedLoc(SourceMgr->getMainFileID(), in TEST_F()
[all …]
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/altera/
H A DKernelNameRestrictionCheck.cpp81 const FileEntry *Entry = SM.getFileEntryForID(SM.getMainFileID()); in EndOfMainFile()
84 Check.diag(SM.getLocForStartOfFile(SM.getMainFileID()), in EndOfMainFile()
/llvm-project-15.0.7/clang-tools-extra/clangd/unittests/
H A DPreambleTests.cpp365 SM.getComposedLoc(SM.getMainFileID(), Modified.point("use"))); in TEST()
373 EXPECT_EQ(SM.getFileID(MacroLoc), SM.getMainFileID()); in TEST()
389 SM.getComposedLoc(SM.getMainFileID(), Modified.point())); in TEST()
485 EXPECT_NE(SM.getFileID(ND.getLocation()), SM.getMainFileID()); in TEST()
489 EXPECT_EQ(DecompLoc.first, SM.getMainFileID()); in TEST()
/llvm-project-15.0.7/clang/unittests/Tooling/
H A DRefactoringActionRulesTest.cpp103 Context.Sources.getLocForStartOfFile(Context.Sources.getMainFileID()) in TEST_F()
166 Context.Sources.getLocForStartOfFile(Context.Sources.getMainFileID()); in TEST_F()
225 Context.Sources.getLocForStartOfFile(Context.Sources.getMainFileID()); in TEST_F()
/llvm-project-15.0.7/clang/unittests/Analysis/FlowSensitive/
H A DTestingSupport.cpp94 SourceManager.getLocForStartOfFile(SourceManager.getMainFileID()) in buildStatementToAnnotationMapping()
117 SourceManager.getLocForStartOfFile(SourceManager.getMainFileID()) in buildStatementToAnnotationMapping()
/llvm-project-15.0.7/clang-tools-extra/clangd/refactor/tweaks/
H A DDefineOutline.cpp129 SM.getBufferData(SM.getMainFileID()), Replacements); in getFunctionSourceAfterReplacements()
180 SM.getLocForStartOfFile(SM.getMainFileID()), ND); in getFunctionSourceCode()
412 getCanonicalPath(SM.getFileEntryForID(SM.getMainFileID()), SM); in apply()
453 auto HeaderFE = Effect::fileEdit(SM, SM.getMainFileID(), in apply()
H A DAddUsing.cpp71 if (SM.getFileID(Loc) != SM.getMainFileID()) { in VisitUsingDecl()
240 if (isHeaderFile(SM.getFileEntryRefForID(SM.getMainFileID())->getName(), in prepare()
368 assert(SM.getFileID(InsertionPoint->Loc) == SM.getMainFileID()); in apply()
/llvm-project-15.0.7/clang-tools-extra/clangd/index/
H A DSymbolCollector.cpp577 SM.getFileID(SM.getSpellingLoc(Loc)) == SM.getMainFileID()) in handleDeclOccurrence()
585 !isHeaderFile(SM.getFileEntryRefForID(SM.getMainFileID())->getName(), in handleDeclOccurrence()
609 if (Opts.RefsInHeaders || FID == SM.getMainFileID()) { in handleDeclOccurrence()
646 const auto *MainFileEntry = SM.getFileEntryForID(SM.getMainFileID()); in handleMacros()
677 if (!HeaderFileURIs->getIncludeHeader(SM.getMainFileID()).empty()) { in handleMacros()
710 !isHeaderFile(SM.getFileEntryRefForID(SM.getMainFileID())->getName(), in handleMacroOccurrence()
714 (Opts.RefsInHeaders || SM.getFileID(SpellingLoc) == SM.getMainFileID())) { in handleMacroOccurrence()
735 SM.getFileID(SpellingLoc) == SM.getMainFileID()) in handleMacroOccurrence()
/llvm-project-15.0.7/llvm/lib/TableGen/
H A DParser.cpp28 auto *MainFileBuffer = SrcMgr.getMemoryBuffer(SrcMgr.getMainFileID()); in TableGenParseFile()
/llvm-project-15.0.7/clang/unittests/Tooling/RecursiveASTVisitorTests/
H A DTraversalScope.cpp21 Match("TU", SM.getLocForStartOfFile(SM.getMainFileID())); in VisitTranslationUnitDecl()
/llvm-project-15.0.7/clang/unittests/AST/
H A DCommentTextTest.cpp36 FileID File = SourceMgr.getMainFileID(); in formatComment()
/llvm-project-15.0.7/clang-tools-extra/clang-include-fixer/find-all-symbols/
H A DFindAllMacros.cpp64 Reporter->reportSymbols(SM->getFileEntryForID(SM->getMainFileID())->getName(), in EndOfMainFile()
/llvm-project-15.0.7/mlir/lib/AsmParser/
H A DLexer.cpp33 auto bufferID = sourceMgr.getMainFileID(); in Lexer()
46 unsigned mainFileID = sourceMgr.getMainFileID(); in getEncodedSourceLocation()
/llvm-project-15.0.7/clang/tools/libclang/
H A DRewrite.cpp57 R.getEditBuffer(R.getSourceMgr().getMainFileID()).write(llvm::outs()); in clang_CXRewriter_writeMainFileToStdOut()
/llvm-project-15.0.7/mlir/lib/Parser/
H A DParser.cpp22 const auto *sourceBuf = sourceMgr.getMemoryBuffer(sourceMgr.getMainFileID()); in parseSourceFile()
/llvm-project-15.0.7/mlir/lib/Tools/lsp-server-support/
H A DSourceMgrUtils.cpp88 includeLoc) != sourceMgr.getMainFileID()) in gatherIncludeFiles()
/llvm-project-15.0.7/clang/lib/Frontend/
H A DFrontendActions.cpp967 llvm::MemoryBufferRef FromFile = SM.getBufferOrFake(SM.getMainFileID()); in ExecuteAction()
968 Lexer RawLex(SM.getMainFileID(), FromFile, SM, PP.getLangOpts()); in ExecuteAction()
1027 SM.getBufferOrNone(SM.getMainFileID())) { in ExecuteAction()
1159 llvm::MemoryBufferRef FromFile = SM.getBufferOrFake(SM.getMainFileID()); in ExecuteAction()
1165 SM.getLocForStartOfFile(SM.getMainFileID()))) { in ExecuteAction()
1191 FileID MainFileID = SM.getMainFileID(); in ExecuteAction()
/llvm-project-15.0.7/clang/lib/Sema/
H A DSemaModule.cpp111 SourceMgr.getLocForStartOfFile(SourceMgr.getMainFileID()); in HandleStartOfHeaderUnit()
115 HUName = SourceMgr.getFileEntryForID(SourceMgr.getMainFileID())->getName(); in HandleStartOfHeaderUnit()
127 F = SourceMgr.getFileEntryForID(SourceMgr.getMainFileID()); in HandleStartOfHeaderUnit()
234 ? SourceMgr.getLocForStartOfFile(SourceMgr.getMainFileID()) in ActOnModuleDecl()
663 assert(File != getSourceManager().getMainFileID() && in ActOnModuleEnd()

12345