Home
last modified time | relevance | path

Searched refs:FileRange (Results 1 – 25 of 29) sorted by relevance

12

/llvm-project/clang/unittests/Tooling/
H A DASTSelectionTest.cpp27 using FileRange = std::pair<FileLocation, FileLocation>; typedef
31 std::optional<FileRange> SelectionRange;
38 FileLocation Location, std::optional<FileRange> SelectionRange, in SelectionFinderVisitor()
69 std::optional<FileRange> SelectionRange, in findSelectedASTNodesWithRange()
81 std::optional<FileRange> SelectionRange, in findSelectedASTNodes()
180 " void f() { }", {1, 1}, FileRange{{1, 1}, {1, 1}}, in TEST()
183 " void f() { }", {1, 1}, FileRange{{1, 1}, {1, 2}}, in TEST()
188 findSelectedASTNodes("void f() { }", {1, 1}, FileRange{{1, 1}, {1, 1}}, in TEST()
203 Source, {1, 1}, FileRange{{1, 1}, {2, 2}}, in TEST()
227 Source, {2, 1}, FileRange{{ in TEST()
[all...]
/llvm-project/clang/include/clang/Tooling/Syntax/
H A DTokens.h50 struct FileRange { struct
52 FileRange(FileID File, unsigned BeginOffset, unsigned EndOffset);
54 FileRange(const SourceManager &SM, SourceLocation BeginLoc, unsigned Length);
57 FileRange(const SourceManager &SM, SourceLocation BeginLoc,
84 friend bool operator==(const FileRange &L, const FileRange &R) {
87 friend bool operator!=(const FileRange &L, const FileRange &R) {
98 llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const FileRange &R); argument
127 FileRange range(const SourceManager &SM) const;
133 static FileRange range(const SourceManager &SM, const syntax::Token &First,
412 tokenize(const FileRange &FR, const SourceManager &SM, const LangOptions &LO);
/llvm-project/clang-tools-extra/clangd/unittests/
H A DReplayPeambleTests.cpp161 auto FileRange = FileRanges[I]; in TEST() local
163 Code.substr(FileRange.Begin, FileRange.End - FileRange.Begin)); in TEST()
171 Code.substr(FileRange.Begin - 1, FileRange.End - FileRange.Begin + 2)); in TEST()
H A DSelectionTests.cpp56 auto FileRange = in nodeRange() local
58 assert(FileRange && "We should be able to get the File Range"); in nodeRange()
60 offsetToPosition(Buffer, SM.getFileOffset(FileRange->getBegin())), in nodeRange()
61 offsetToPosition(Buffer, SM.getFileOffset(FileRange->getEnd()))}; in nodeRange()
H A DSourceCodeTests.cpp635 auto FileRange = toHalfOpenFileRange(SM, LangOpts, Decl.getSourceRange()); in TEST() local
637 ASSERT_NE(FileRange, std::nullopt); in TEST()
638 Range HalfOpenRange = SourceRangeToRange(*FileRange); in TEST()
H A DIncludeCleanerTests.cpp212 syntax::FileRange BRange{SM.getMainFileID(), static_cast<unsigned int>(Start), in TEST()
/llvm-project/llvm/utils/filecheck_lint/
H A Dfilecheck_lint.py80 class FileRange: class
131 filerange: FileRange
138 filerange: FileRange, argument
159 ) -> Generator[Tuple[FileRange, str], None, None]:
177 yield (FileRange(content, span[0], span[1]), potential_directive)
/llvm-project/clang-tools-extra/clang-tidy/readability/
H A DAvoidConstParamsInDecls.cpp31 CharSourceRange FileRange = Lexer::makeFileCharRange( in findConstToRemove() local
35 if (FileRange.isInvalid()) in findConstToRemove()
39 tok::kw_const, FileRange, *Result.Context, *Result.SourceManager); in findConstToRemove()
H A DConstReturnTypeCheck.cpp41 CharSourceRange FileRange = Lexer::makeFileCharRange( in findConstToRemove() local
45 if (FileRange.isInvalid()) in findConstToRemove()
49 tok::kw_const, FileRange, *Result.Context, *Result.SourceManager); in findConstToRemove()
H A DQualifiedAutoCheck.cpp44 CharSourceRange FileRange = Lexer::makeFileCharRange( in findQualToken() local
48 if (FileRange.isInvalid()) in findQualToken()
56 return utils::lexer::getQualifyingToken(Tok, FileRange, *Result.Context, in findQualToken()
/llvm-project/clang/lib/Tooling/Syntax/
H A DTokens.cpp161 FileRange syntax::Token::range(const SourceManager &SM) const { in range()
166 return FileRange(File, StartOffset, StartOffset + length()); in range()
169 FileRange syntax::Token::range(const SourceManager &SM, in range()
177 return FileRange(F.file(), F.beginOffset(), L.endOffset()); in range()
184 FileRange::FileRange(FileID File, unsigned BeginOffset, unsigned EndOffset) in FileRange() function in FileRange
190 FileRange::FileRange(const SourceManager &SM, SourceLocation BeginLoc, in FileRange() function in FileRange
198 FileRange::FileRange(const SourceManager &SM, SourceLocation BeginLoc, in FileRange() function in FileRange
212 const FileRange &R) { in operator <<()
218 llvm::StringRef FileRange::text(const SourceManager &SM) const { in text()
264 CharSourceRange FileRange::toCharRange(const SourceManager &SM) const { in toCharRange()
[all …]
H A DComputeReplacements.cpp72 syntax::FileRange rangeOfExpanded(const syntax::TokenBufferTokenManager &STM, in rangeOfExpanded()
83 return syntax::FileRange( in rangeOfExpanded()
/llvm-project/llvm/lib/ProfileData/Coverage/
H A DCoverageMappingReader.cpp606 // Maps a hash of the filenames in a TU to a \c FileRange. The range
618 FilenameRange FileRange) { in insertFunctionRecordIfNeeded()
633 FileRange.StartingIndex, FileRange.Length); in insertFunctionRecordIfNeeded()
655 OldRecord.FilenamesBegin = FileRange.StartingIndex; in VersionedCovMapFuncRecordReader()
656 OldRecord.FilenamesSize = FileRange.Length; in VersionedCovMapFuncRecordReader()
707 FilenameRange FileRange(FilenamesBegin, Filenames.size() - FilenamesBegin); in readCoverageHeader()
715 FileRangeMap.insert(std::make_pair(FilenamesRef, FileRange)); in readCoverageHeader()
723 It + FileRange.StartingIndex, in readCoverageHeader()
724 It + FileRange in readCoverageHeader()
611 insertFunctionRecordIfNeeded(const FuncRecordType * CFR,StringRef Mapping,FilenameRange FileRange) insertFunctionRecordIfNeeded() argument
700 FilenameRange FileRange(FilenamesBegin, Filenames.size() - FilenamesBegin); readCoverageHeader() local
773 std::optional<FilenameRange> FileRange; readFunctionRecords() local
[all...]
/llvm-project/clang-tools-extra/clangd/index/
H A DMemIndex.h49 typename FileRange, typename Payload>
51 FileRange &&Files, IndexContents IdxContents, Payload &&BackingData, in MemIndex()
57 this->Files = std::forward<FileRange>(Files); in MemIndex()
/llvm-project/clang-tools-extra/clangd/index/dex/
H A DDex.h65 typename FileRange, typename Payload> in Dex()
67 FileRange &&Files, IndexContents IdxContents, Payload &&BackingData, in Dex()
73 this->Files = std::forward<FileRange>(Files); in Dex()
/llvm-project/clang-tools-extra/clang-tidy/modernize/
H A DUseOverrideCheck.cpp138 CharSourceRange FileRange = Lexer::makeFileCharRange( in check() local
142 if (!FileRange.isValid()) in check()
148 SmallVector<Token, 16> Tokens = parseTokens(FileRange, Result); in check()
210 InsertLoc = FileRange.getEnd(); in check()
/llvm-project/clang-tools-extra/clangd/
H A DSourceCode.cpp398 SourceRange FileRange = Loc; in getTokenFileRange() local
399 while (!FileRange.getBegin().isFileID()) { in getTokenFileRange()
400 if (SM.isMacroArgExpansion(FileRange.getBegin())) { in getTokenFileRange()
401 FileRange = unionTokenRange( in getTokenFileRange()
402 SM.getImmediateSpellingLoc(FileRange.getBegin()), in getTokenFileRange()
403 SM.getImmediateSpellingLoc(FileRange.getEnd()), SM, LangOpts); in getTokenFileRange()
404 assert(SM.isWrittenInSameFile(FileRange.getBegin(), FileRange.getEnd())); in getTokenFileRange()
407 getExpansionTokenRangeInSameFile(FileRange.getBegin(), SM, LangOpts); in getTokenFileRange()
409 getExpansionTokenRangeInSameFile(FileRange in getTokenFileRange()
[all...]
H A DIncludeCleaner.h42 syntax::FileRange SymRefRange;
H A DCollectMacros.cpp24 SM, syntax::FileRange(MainFile, StartOffset, EndOffset).toCharRange(SM)); in toRange()
H A DParsedAST.cpp170 syntax::FileRange(SM.getMainFileID(), 0, PB.Size), SM, LangOpts); in ReplayPreamble()
243 syntax::FileRange(SM, SynthesizedFilenameTok.getLocation(), in replay()
/llvm-project/lldb/source/Plugins/Process/mach-core/
H A DProcessMachCore.h124 typedef lldb_private::Range<lldb::addr_t, lldb::addr_t> FileRange; typedef
125 typedef lldb_private::RangeDataVector<lldb::addr_t, lldb::addr_t, FileRange>
/llvm-project/lldb/source/Plugins/Process/elf-core/
H A DProcessElfCore.h125 typedef lldb_private::Range<lldb::addr_t, lldb::addr_t> FileRange;
126 typedef lldb_private::RangeDataVector<lldb::addr_t, lldb::addr_t, FileRange>
127 typedef lldb_private::Range<lldb::addr_t, lldb::addr_t> FileRange; global() typedef
H A DProcessElfCore.cpp117 FileRange file_range(header.p_offset, header.p_filesz); in AddAddressRangeFromLoadSegment()
152 FileRange file_range(header.p_offset, header.p_filesz); in AddAddressRangeFromMemoryTagSegment()
/llvm-project/clang/unittests/Tooling/Syntax/
H A DTokensTest.cpp171 syntax::FileRange(FID, Annot.range().Begin, Annot.range().End), in tokenize()
960 EXPECT_EQ(Int.range(SM), FileRange(SM.getMainFileID(), Code.range("i").Begin, in TEST_F()
963 FileRange(SM.getMainFileID(), Code.range("all").Begin, in TEST_F()
982 std::vector<FileRange> ExpectedMacroRanges; in TEST_F()
985 FileRange(SM.getMainFileID(), Range.Begin, Range.End)); in TEST_F()
986 std::vector<FileRange> ActualMacroRanges; in TEST_F()
H A DTreeTestBase.cpp179 syntax::FileRange(SourceMgr->getMainFileID(), R.Begin, R.End)) in nodeByRange()

12