Home
last modified time | relevance | path

Searched refs:CharSourceRange (Results 1 – 25 of 63) sorted by relevance

123

/external/clang/include/clang/Edit/
DCommit.h43 CharSourceRange getFileRange(SourceManager &SM) const;
44 CharSourceRange getInsertFromRange(SourceManager &SM) const;
77 bool insertFromRange(SourceLocation loc, CharSourceRange range,
80 bool insertWrap(StringRef before, CharSourceRange range, StringRef after);
82 bool remove(CharSourceRange range);
84 bool replace(CharSourceRange range, StringRef text);
85 bool replaceWithInner(CharSourceRange range, CharSourceRange innerRange);
92 return insertFromRange(loc, CharSourceRange::getTokenRange(TokenRange),
96 return insertWrap(before, CharSourceRange::getTokenRange(TokenRange), after); in insertWrap()
99 return remove(CharSourceRange::getTokenRange(TokenRange)); in remove()
[all …]
DEditsReceiver.h17 class CharSourceRange; variable
26 virtual void replace(CharSourceRange range, StringRef text) = 0;
28 virtual void remove(CharSourceRange range);
/external/clang/unittests/Lex/
DPPCallbacksTest.cpp58 CharSourceRange FilenameRange, const FileEntry *File, in InclusionDirective()
76 CharSourceRange FilenameRange;
148 StringRef GetSourceString(CharSourceRange Range) { in GetSourceString()
157 CharSourceRange InclusionDirectiveFilenameRange(const char* SourceText, in InclusionDirectiveFilenameRange()
245 CharSourceRange Range = in TEST_F()
255 CharSourceRange Range = in TEST_F()
266 CharSourceRange Range = in TEST_F()
277 CharSourceRange Range = in TEST_F()
288 CharSourceRange Range = in TEST_F()
300 CharSourceRange Range = in TEST_F()
[all …]
DLexerTest.cpp96 Lexer::getSourceText(CharSourceRange::getTokenRange(SourceRange( in getSourceText()
302 CharSourceRange range = Lexer::makeFileCharRange( in TEST_F()
303 CharSourceRange::getTokenRange(lsqrLoc, idLoc), SourceMgr, LangOpts); in TEST_F()
305 range = Lexer::makeFileCharRange(CharSourceRange::getTokenRange(idLoc, rsqrLoc), in TEST_F()
308 range = Lexer::makeFileCharRange(CharSourceRange::getTokenRange(lsqrLoc, rsqrLoc), in TEST_F()
316 CharSourceRange::getTokenRange(lsqrLoc, rsqrLoc), in TEST_F()
328 CharSourceRange::getTokenRange(macroLsqrLoc, macroIdLoc), in TEST_F()
333 range = Lexer::makeFileCharRange(CharSourceRange::getTokenRange(macroIdLoc, macroRsqrLoc), in TEST_F()
340 CharSourceRange::getTokenRange(macroLsqrLoc, macroRsqrLoc), in TEST_F()
346 CharSourceRange::getTokenRange(SourceRange(macroLsqrLoc, macroIdLoc)), in TEST_F()
/external/clang/include/clang/Frontend/
DDiagnosticRenderer.h78 ArrayRef<CharSourceRange> Ranges,
84 ArrayRef<CharSourceRange> Ranges,
89 SmallVectorImpl<CharSourceRange>& Ranges,
118 ArrayRef<CharSourceRange> Ranges, ArrayRef<FixItHint> Hints,
122 ArrayRef<CharSourceRange> Ranges,
126 ArrayRef<CharSourceRange> Ranges,
145 StringRef Message, ArrayRef<CharSourceRange> Ranges,
DTextDiagnostic.h81 ArrayRef<CharSourceRange> Ranges,
87 ArrayRef<CharSourceRange> Ranges,
92 SmallVectorImpl<CharSourceRange>& Ranges, in emitCodeContext()
111 SmallVectorImpl<CharSourceRange>& Ranges,
/external/clang/lib/Edit/
DCommit.cpp26 CharSourceRange Commit::Edit::getFileRange(SourceManager &SM) const { in getFileRange()
28 return CharSourceRange::getCharRange(Loc, Loc.getLocWithOffset(Length)); in getFileRange()
31 CharSourceRange Commit::Edit::getInsertFromRange(SourceManager &SM) const { in getInsertFromRange()
35 return CharSourceRange::getCharRange(Loc, Loc.getLocWithOffset(Length)); in getInsertFromRange()
60 CharSourceRange range, in insertFromRange()
86 bool Commit::remove(CharSourceRange range) { in remove()
98 bool Commit::insertWrap(StringRef before, CharSourceRange range, in insertWrap()
111 bool Commit::replace(CharSourceRange range, StringRef text) { in replace()
127 bool Commit::replaceWithInner(CharSourceRange range, in replaceWithInner()
128 CharSourceRange replacementRange) { in replaceWithInner()
[all …]
DRewriteObjCFoundationAPI.cpp193 commit.replaceWithInner(CharSourceRange::getCharRange(MsgRange.getBegin(), in rewriteToSubscriptGetCommon()
195 CharSourceRange::getTokenRange(RecRange)); in rewriteToSubscriptGetCommon()
242 commit.replaceWithInner(CharSourceRange::getCharRange(MsgRange.getBegin(), in rewriteToArraySubscriptSet()
244 CharSourceRange::getTokenRange(RecRange)); in rewriteToArraySubscriptSet()
245 commit.replaceWithInner(CharSourceRange::getCharRange(Arg0Range.getBegin(), in rewriteToArraySubscriptSet()
247 CharSourceRange::getTokenRange(Arg0Range)); in rewriteToArraySubscriptSet()
250 commit.insertWrap("[", CharSourceRange::getCharRange(Arg0Range.getBegin(), in rewriteToArraySubscriptSet()
281 commit.replaceWithInner(CharSourceRange::getCharRange(MsgRange.getBegin(), in rewriteToDictionarySubscriptSet()
283 CharSourceRange::getTokenRange(RecRange)); in rewriteToDictionarySubscriptSet()
515 CharSourceRange::getTokenRange(KeyRange), in rewriteToDictionaryLiteral()
[all …]
DEditedSource.cpp22 void EditsReceiver::remove(CharSourceRange range) { in remove()
375 CharSourceRange range = CharSourceRange::getCharRange(Loc, in applyRewrite()
441 return Lexer::getSourceText(CharSourceRange::getCharRange(BLoc, ELoc), in getSourceText()
/external/clang/include/clang/Basic/
DSourceLocation.h226 class CharSourceRange {
230 CharSourceRange() : IsTokenRange(false) {} in CharSourceRange() function
231 CharSourceRange(SourceRange R, bool ITR) : Range(R), IsTokenRange(ITR) {} in CharSourceRange() function
233 static CharSourceRange getTokenRange(SourceRange R) { in getTokenRange()
234 return CharSourceRange(R, true); in getTokenRange()
237 static CharSourceRange getCharRange(SourceRange R) { in getCharRange()
238 return CharSourceRange(R, false); in getCharRange()
241 static CharSourceRange getTokenRange(SourceLocation B, SourceLocation E) { in getTokenRange()
244 static CharSourceRange getCharRange(SourceLocation B, SourceLocation E) { in getCharRange()
DDiagnostic.h56 CharSourceRange RemoveRange;
60 CharSourceRange InsertFromRange;
83 CharSourceRange::getCharRange(InsertionLoc, InsertionLoc);
92 CharSourceRange FromRange,
96 CharSourceRange::getCharRange(InsertionLoc, InsertionLoc);
104 static FixItHint CreateRemoval(CharSourceRange RemoveRange) { in CreateRemoval()
110 return CreateRemoval(CharSourceRange::getTokenRange(RemoveRange)); in CreateRemoval()
115 static FixItHint CreateReplacement(CharSourceRange RemoveRange, in CreateReplacement()
125 return CreateReplacement(CharSourceRange::getTokenRange(RemoveRange), Code); in CreateReplacement()
767 SmallVector<CharSourceRange, 8> DiagRanges;
[all …]
DPartialDiagnostic.h69 SmallVector<CharSourceRange, 8> DiagRanges;
160 void AddSourceRange(const CharSourceRange &R) const { in AddSourceRange()
303 for (const CharSourceRange &Range : DiagStorage->DiagRanges) in Emit()
381 PD.AddSourceRange(CharSourceRange::getTokenRange(R));
386 const CharSourceRange &R) {
/external/clang/include/clang/Lex/
DLexer.h330 static CharSourceRange getAsCharRange(SourceRange Range, in getAsCharRange()
334 return End.isInvalid() ? CharSourceRange() in getAsCharRange()
335 : CharSourceRange::getCharRange( in getAsCharRange()
338 static CharSourceRange getAsCharRange(CharSourceRange Range, in getAsCharRange()
392 static CharSourceRange makeFileCharRange(CharSourceRange Range,
397 static StringRef getSourceText(CharSourceRange Range,
/external/clang/lib/Frontend/
DDiagnosticRenderer.cpp85 void replace(CharSourceRange range, StringRef text) override { in replace()
126 ArrayRef<CharSourceRange> Ranges, in emitDiagnostic()
139 SmallVector<CharSourceRange, 20> MutableRanges(Ranges.begin(), in emitDiagnostic()
396 ArrayRef<CharSourceRange> Ranges, in mapDiagnosticRanges()
397 SmallVectorImpl<CharSourceRange> &SpellingRanges, in mapDiagnosticRanges()
445 SpellingRanges.push_back(CharSourceRange(SourceRange(Begin, End), in mapDiagnosticRanges()
452 ArrayRef<CharSourceRange> Ranges, in emitCaret()
455 SmallVector<CharSourceRange, 4> SpellingRanges; in emitCaret()
465 ArrayRef<CharSourceRange> Ranges, in emitSingleMacroExpansion()
472 SmallVector<CharSourceRange, 4> SpellingRanges; in emitSingleMacroExpansion()
[all …]
DSerializedDiagnosticPrinter.cpp72 ArrayRef<CharSourceRange> Ranges,
78 ArrayRef<CharSourceRange> Ranges, in emitDiagnosticLoc()
86 SmallVectorImpl<CharSourceRange>& Ranges,
206 void EmitCodeContext(SmallVectorImpl<CharSourceRange> &Ranges,
211 void EmitCharSourceRange(CharSourceRange R, const SourceManager &SM);
239 void AddCharSourceRangeToRecord(CharSourceRange R, RecordDataImpl &Record,
375 void SDiagsWriter::AddCharSourceRangeToRecord(CharSourceRange Range, in AddCharSourceRangeToRecord()
406 void SDiagsWriter::EmitCharSourceRange(CharSourceRange R, in EmitCharSourceRange()
682 ArrayRef<clang::CharSourceRange> Ranges, in emitDiagnosticMessage()
710 void SDiagsWriter::EmitCodeContext(SmallVectorImpl<CharSourceRange> &Ranges, in EmitCodeContext()
[all …]
DDependencyGraph.cpp51 CharSourceRange FilenameRange, const FileEntry *File,
72 CharSourceRange FilenameRange, in InclusionDirective()
DDependencyFile.cpp64 CharSourceRange FilenameRange, const FileEntry *File, in InclusionDirective()
190 CharSourceRange FilenameRange, const FileEntry *File,
298 CharSourceRange FilenameRange, in InclusionDirective()
/external/clang/lib/ARCMigrate/
DTransformActions.cpp68 CharRange(CharSourceRange range, SourceManager &srcMgr, Preprocessor &PP) { in CharRange()
100 return CharRange(CharSourceRange::getTokenRange(LHS), SrcMgr, PP) in compare()
101 .compareWith(CharRange(CharSourceRange::getTokenRange(RHS), in compare()
167 void addRemoval(CharSourceRange range);
446 addRemoval(CharSourceRange::getTokenRange(range)); in commitRemove()
471 addRemoval(CharSourceRange::getCharRange(range.getBegin(), in commitReplace()
474 addRemoval(CharSourceRange::getTokenRange( in commitReplace()
487 addRemoval(CharSourceRange::getCharRange(loc, afterText)); in commitReplaceText()
495 std::make_pair(CharRange(CharSourceRange::getTokenRange(range), in commitIncreaseIndentation()
518 void TransformActionsImpl::addRemoval(CharSourceRange range) { in addRemoval()
[all …]
DInternals.h115 virtual void remove(CharSourceRange range) = 0;
116 virtual void increaseIndentation(CharSourceRange range,
/external/clang/include/clang/Rewrite/Core/
DRewriter.h77 int getRangeSize(const CharSourceRange &Range,
124 bool RemoveText(CharSourceRange range,
156 bool IncreaseIndentation(CharSourceRange range, SourceLocation parentIndent);
158 return IncreaseIndentation(CharSourceRange::getTokenRange(range), in IncreaseIndentation()
/external/clang/include/clang/Tooling/Core/
DReplacement.h90 Replacement(const SourceManager &Sources, const CharSourceRange &Range,
124 const CharSourceRange &Range,
233 const CharSourceRange Range = in Replacement()
234 CharSourceRange::getTokenRange(NodeToReplace->getSourceRange()); in Replacement()
/external/clang/lib/Tooling/
DRefactoringCallbacks.cpp26 return tooling::Replacement(Sources, CharSourceRange::getTokenRange( in replaceStmtWithText()
33 CharSourceRange::getTokenRange(To.getSourceRange()), in replaceStmtWithStmt()
45 CharSourceRange::getTokenRange(FromMatch->getSourceRange()), in run()
/external/clang/tools/libclang/
DCXSourceLocation.h56 const CharSourceRange &R);
63 CharSourceRange::getTokenRange(R)); in translateSourceRange()
/external/clang/lib/Lex/
DLexer.cpp829 static CharSourceRange makeRangeFromFileLocs(CharSourceRange Range, in makeRangeFromFileLocs()
838 return CharSourceRange(); in makeRangeFromFileLocs()
846 return CharSourceRange(); in makeRangeFromFileLocs()
851 return CharSourceRange(); in makeRangeFromFileLocs()
853 return CharSourceRange::getCharRange(Begin, End); in makeRangeFromFileLocs()
856 CharSourceRange Lexer::makeFileCharRange(CharSourceRange Range, in makeFileCharRange()
862 return CharSourceRange(); in makeFileCharRange()
869 return CharSourceRange(); in makeFileCharRange()
879 return CharSourceRange(); in makeFileCharRange()
900 return CharSourceRange(); in makeFileCharRange()
[all …]
/external/clang/tools/arcmt-test/
Darcmt-test.cpp74 static void printSourceRange(CharSourceRange range, ASTContext &Ctx,
97 void remove(CharSourceRange range) override { in remove()
317 static void printSourceRange(CharSourceRange range, ASTContext &Ctx, in printSourceRange()

123