Home
last modified time | relevance | path

Searched refs:SourceRange (Results 1 – 25 of 498) sorted by relevance

12345678910>>...20

/llvm-project/clang/lib/ARCMigrate/
H A DInternals.h33 bool clearDiagnostic(ArrayRef<unsigned> IDs, SourceRange range);
34 bool hasDiagnostic(ArrayRef<unsigned> IDs, SourceRange range) const;
65 void remove(SourceRange range);
67 void replace(SourceRange range, StringRef text);
68 void replace(SourceRange range, SourceRange replacementRange);
72 void increaseIndentation(SourceRange range,
75 bool clearDiagnostic(ArrayRef<unsigned> IDs, SourceRange range);
76 bool clearAllDiagnostics(SourceRange range) { in clearAllDiagnostics()
79 bool clearDiagnostic(unsigned ID1, unsigned ID2, SourceRange rang in clearAllDiagnostics()
[all...]
H A DTransformActions.cpp46 SourceRange R1, R2;
97 static RangeComparison compare(SourceRange LHS, SourceRange RHS, in compare()
135 void remove(SourceRange range);
137 void replace(SourceRange range, StringRef text);
138 void replace(SourceRange range, SourceRange replacementRange);
142 void increaseIndentation(SourceRange range,
145 bool clearDiagnostic(ArrayRef<unsigned> IDs, SourceRange range);
152 bool canRemoveRange(SourceRange range);
153 bool canReplaceRange(SourceRange range, SourceRange replacementRange);
158 void commitRemove(SourceRange range);
[all …]
/llvm-project/clang/include/clang/AST/
H A DTypeLoc.h153 SourceRange getSourceRange() const LLVM_READONLY { in getSourceRange()
154 return SourceRange(getBeginLoc(), getEndLoc()); in getSourceRange()
159 SourceRange getLocalSourceRange() const { in getLocalSourceRange()
247 static SourceRange getLocalSourceRangeImpl(TypeLoc TL);
291 SourceRange getLocalSourceRange() const { return {}; } in getLocalSourceRange()
544 SourceRange getLocalSourceRange() const { in getLocalSourceRange()
545 return SourceRange(getNameLoc(), getNameLoc()); in getLocalSourceRange()
559 SourceRange BuiltinRange;
576 void expandBuiltinRange(SourceRange Range) { in expandBuiltinRange()
577 SourceRange in expandBuiltinRange()
[all...]
H A DComment.h71 SourceRange Range;
212 void setSourceRange(SourceRange SR) {
222 SourceRange Range;
229 Loc(LocBegin), Range(SourceRange(LocBegin, LocEnd)) {
243 SourceRange getSourceRange() const LLVM_READONLY { return Range; }
367 SourceRange getCommandNameRange() const {
368 return SourceRange(getBeginLoc().getLocWithOffset(-1), getEndLoc());
384 SourceRange getArgRange(unsigned Idx) const {
394 SourceRange TagNameRange;
417 SourceRange getTagNameSourceRange() const LLVM_READONLY {
[all …]
/llvm-project/clang-tools-extra/clang-tidy/modernize/
H A DConcatNestedNamespacesCheck.cpp26 static StringRef getRawStringRef(const SourceRange &Range, in getRawStringRef()
33 std::optional<SourceRange>
48 return SourceRange{front()->getBeginLoc(), Tok->getEndLoc()}; in getCleanedNamespaceFrontRange()
50 SourceRange NS::getReplacedNamespaceFrontRange() const { in getReplacedNamespaceFrontRange()
51 return SourceRange{front()->getBeginLoc(), back()->getLocation()}; in getReplacedNamespaceFrontRange()
54 SourceRange NS::getDefaultNamespaceBackRange() const { in getDefaultNamespaceBackRange()
55 return SourceRange{front()->getRBraceLoc(), front()->getRBraceLoc()}; in getDefaultNamespaceBackRange()
57 SourceRange NS::getNamespaceBackRange(const SourceManager &SM, in getNamespaceBackRange()
67 SourceRange TokRange = SourceRange{Tok->getLocation(), Tok->getEndLoc()}; in getNamespaceBackRange()
77 return SourceRange{front()->getRBraceLoc(), Tok->getEndLoc()}; in getNamespaceBackRange()
[all …]
H A DMakeSmartPtrCheck.cpp200 SourceRange BraceRange = Construct->getParenOrBraceRange(); in checkConstruct()
279 SourceRange NewRange = SkipParensParents(New)->getSourceRange(); in replaceNew()
328 Diag << FixItHint::CreateRemoval(SourceRange(NewStart, NewEnd)); in replaceNew()
332 Diag << FixItHint::CreateReplacement(SourceRange(NewStart, NewEnd), in replaceNew()
360 SourceRange InitRange = New->getDirectInitRange(); in replaceNew()
362 SourceRange(NewStart, InitRange.getBegin())); in replaceNew()
363 Diag << FixItHint::CreateRemoval(SourceRange(InitRange.getEnd(), NewEnd)); in replaceNew()
369 Diag << FixItHint::CreateReplacement(SourceRange(NewStart, NewEnd), in replaceNew()
376 SourceRange InitRange; in replaceNew()
402 InitRange = SourceRange( in replaceNew()
[all …]
H A DConcatNestedNamespacesCheck.h22 std::optional<SourceRange>
25 SourceRange getReplacedNamespaceFrontRange() const;
26 SourceRange getNamespaceBackRange(const SourceManager &SM,
28 SourceRange getDefaultNamespaceBackRange() const;
/llvm-project/clang/include/clang/Lex/
H A DPreprocessingRecord.h89 SourceRange Range;
94 PreprocessedEntity(EntityKind Kind, SourceRange Range) in PreprocessedEntity()
103 SourceRange getSourceRange() const LLVM_READONLY { return Range; } in getSourceRange()
135 PreprocessingDirective(EntityKind Kind, SourceRange Range) in PreprocessingDirective()
152 SourceRange Range) in MacroDefinitionRecord()
174 MacroExpansion(IdentifierInfo *BuiltinName, SourceRange Range) in MacroExpansion()
178 MacroExpansion(MacroDefinitionRecord *Definition, SourceRange Range) in MacroExpansion()
251 OptionalFileEntryRef File, SourceRange Range);
292 findPreprocessedEntitiesInRange(SourceRange Range) = 0;
302 virtual SourceRange ReadSkippedRang
[all...]
H A DPPEmbedParameters.h28 PPEmbedParameterOffset(size_t Offset, SourceRange R) in PPEmbedParameterOffset()
38 PPEmbedParameterLimit(size_t Limit, SourceRange R) in PPEmbedParameterLimit()
48 PPEmbedParameterPrefix(SmallVectorImpl<Token> &&Tokens, SourceRange R) in PPEmbedParameterPrefix()
58 PPEmbedParameterSuffix(SmallVectorImpl<Token> &&Tokens, SourceRange R) in PPEmbedParameterSuffix()
68 PPEmbedParameterIfEmpty(SmallVectorImpl<Token> &&Tokens, SourceRange R) in PPEmbedParameterIfEmpty()
H A DPPConditionalDirectiveRecord.h75 bool rangeIntersectsConditionalDirective(SourceRange Range) const;
88 void If(SourceLocation Loc, SourceRange ConditionRange,
90 void Elif(SourceLocation Loc, SourceRange ConditionRange,
98 void Elifdef(SourceLocation Loc, SourceRange ConditionRange,
102 void Elifndef(SourceLocation Loc, SourceRange ConditionRange,
/llvm-project/clang/unittests/Lex/
H A DPPConditionalDirectiveRecordTest.cpp96 SourceRange(toks[0].getLocation(), toks[1].getLocation()))); in TEST_F()
98 SourceRange(toks[0].getLocation(), toks[2].getLocation()))); in TEST_F()
100 SourceRange(toks[3].getLocation(), toks[4].getLocation()))); in TEST_F()
102 SourceRange(toks[1].getLocation(), toks[5].getLocation()))); in TEST_F()
104 SourceRange(toks[2].getLocation(), toks[6].getLocation()))); in TEST_F()
106 SourceRange(toks[2].getLocation(), toks[5].getLocation()))); in TEST_F()
108 SourceRange(toks[0].getLocation(), toks[6].getLocation()))); in TEST_F()
110 SourceRange(toks[2].getLocation(), toks[8].getLocation()))); in TEST_F()
112 SourceRange(toks[0].getLocation(), toks[9].getLocation()))); in TEST_F()
/llvm-project/clang/include/clang/ASTMatchers/Dynamic/
H A DDiagnostics.h36 struct SourceRange { struct
45 SourceRange Range; argument
111 SourceRange MatcherRange);
115 SourceRange MatcherRange, unsigned ArgNumber);
144 ArgStream addError(SourceRange Range, ErrorType Error);
149 SourceRange Range;
157 SourceRange Range;
179 ArgStream pushContextFrame(ContextType Type, SourceRange Range);
/llvm-project/clang/lib/StaticAnalyzer/Core/
H A DBugSuppression.cpp18 using Ranges = llvm::SmallVectorImpl<SourceRange>;
38 template <class NodeType> inline SourceRange getRange(const NodeType *Node) { in getRange()
41 template <> inline SourceRange getRange(const AttributedStmt *S) { in getRange()
65 inline bool fullyContains(SourceRange Larger, SourceRange Smaller, in fullyContains()
112 void addRange(SourceRange R) { in addRange()
184 SourceRange BugRange = Location.asRange(); in isSuppressed()
188 [BugRange, &SM](SourceRange Suppression) { in isSuppressed()
/llvm-project/clang-tools-extra/clang-tidy/readability/
H A DQualifiedAutoCheck.cpp60 std::optional<SourceRange>
63 SourceRange TypeSpecifier( in getTypeSpecifierLocation()
75 std::optional<SourceRange> mergeReplacementRange(SourceRange &TypeSpecifier, in mergeReplacementRange()
85 return SourceRange(ConstToken.getLocation(), ConstToken.getEndLoc()); in mergeReplacementRange()
161 SourceRange TypeSpecifier; in check()
162 if (std::optional<SourceRange> TypeSpec = in check()
168 llvm::SmallVector<SourceRange, 4> RemoveQualifiersRange; in check()
174 if (std::optional<SourceRange> Result = in check()
199 for (SourceRange &Range : RemoveQualifiersRange) { in check()
220 for (SourceRange &Range : RemoveQualifiersRange) { in check()
[all …]
H A DElseAfterReturnCheck.cpp32 SmallVectorImpl<SourceRange> &Collection = Collections[SM.getFileID(Loc)]; in Endif()
146 SourceRange(ElseExpandedLoc, EndLoc), Repl); in removeElseAndBrackets()
205 const SmallVectorImpl<SourceRange> &ConditionalBranches = Iter->getSecond(); in hasPreprocessorBranchEndBetweenLocations()
208 [](const SourceRange &LHS, const SourceRange &RHS) { in hasPreprocessorBranchEndBetweenLocations()
215 [](const SourceRange &LHS, const SourceLocation &RHS) { in hasPreprocessorBranchEndBetweenLocations()
268 << SourceRange(ElseLoc); in check()
271 SourceRange(If->getIfLoc()), in check()
284 Diag << tooling::fixit::createReplacement(SourceRange(If->getIfLoc()), in check()
304 << SourceRange(ElseLoc); in check()
306 SourceRange(If->getIfLoc()), in check()
[all …]
/llvm-project/llvm/lib/CodeGen/MIRParser/
H A DMIRParser.cpp89 bool error(const SMDiagnostic &Error, SMRange SourceRange);
177 SMRange SourceRange);
182 SMRange SourceRange);
223 bool MIRParserImpl::error(const SMDiagnostic &Error, SMRange SourceRange) { in reportDiagnostic()
225 reportDiagnostic(diagFromMIStringDiag(Error, SourceRange)); in reportDiagnostic()
504 return error(Error, ArgRegPair.Reg.SourceRange); in initializeMachineFunction()
597 diagFromBlockStringDiag(Error, YamlMF.Body.Value.SourceRange)); in initializeMachineFunction()
625 diagFromBlockStringDiag(Error, YamlMF.Body.Value.SourceRange)); in parseRegisterInfo()
684 return error(VReg.ID.SourceRange.Start, in parseRegisterInfo()
701 VReg.Class.SourceRange in setupRegisterInfo()
216 error(const SMDiagnostic & Error,SMRange SourceRange) error() argument
1064 diagFromMIStringDiag(const SMDiagnostic & Error,SMRange SourceRange) diagFromMIStringDiag() argument
1080 diagFromBlockStringDiag(const SMDiagnostic & Error,SMRange SourceRange) diagFromBlockStringDiag() argument
[all...]
/llvm-project/clang/unittests/Tooling/
H A DRefactoringActionRulesTest.cpp61 std::pair<SourceRange, int> Selection; in TEST_F()
64 ReplaceAWithB(std::pair<SourceRange, int> Selection) in TEST_F() argument
69 std::pair<SourceRange, int> Selection) { in TEST_F() argument
88 Expected<std::pair<SourceRange, int>> in TEST_F()
90 Expected<SourceRange> R = in TEST_F()
152 SourceRange R) { in TEST_F()
156 ErrorRule(SourceRange R) {} in TEST_F()
201 SourceRange Selection; in TEST_F()
204 FindOccurrences(SourceRange Selection) : Selection(Selection) {} in TEST_F()
207 SourceRange Selection) { in TEST_F()
[all …]
H A DASTSelectionTest.cpp32 llvm::function_ref<void(SourceRange SelectionRange,
39 llvm::function_ref<void(SourceRange SelectionRange, in SelectionFinderVisitor()
49 SourceRange SelRange; in VisitTranslationUnitDecl()
51 SelRange = SourceRange(SelectionRange->first.translate(SM), in VisitTranslationUnitDecl()
55 SelRange = SourceRange(Loc, Loc); in VisitTranslationUnitDecl()
70 llvm::function_ref<void(SourceRange SelectionRange, in findSelectedASTNodesWithRange()
87 [&](SourceRange, std::optional<SelectedASTNode> Selection) { in findSelectedASTNodes() argument
696 [](SourceRange SelectionRange, std::optional<SelectedASTNode> Node) { in TEST()
704 [](SourceRange SelectionRange, std::optional<SelectedASTNode> Node) { in TEST()
713 [](SourceRange SelectionRang in TEST()
[all...]
/llvm-project/clang/include/clang/Basic/
H A DSourceLocation.h213 class SourceRange {
218 SourceRange() = default;
219 SourceRange(SourceLocation loc) : B(loc), E(loc) {}
220 SourceRange(SourceLocation begin, SourceLocation end) : B(begin), E(end) {}
231 bool operator==(const SourceRange &X) const {
235 bool operator!=(const SourceRange &X) const {
240 bool fullyContains(const SourceRange &other) const {
257 SourceRange Range;
262 CharSourceRange(SourceRange R, bool ITR) : Range(R), IsTokenRange(ITR) {}
264 static CharSourceRange getTokenRange(SourceRange R) {
[all …]
/llvm-project/clang/lib/Edit/
H A DRewriteObjCFoundationAPI.cpp176 SourceRange RecRange = Receiver->getSourceRange(); in maybePutParensOnReceiver()
189 SourceRange MsgRange = Msg->getSourceRange(); in rewriteToSubscriptGetCommon()
190 SourceRange RecRange = Rec->getSourceRange(); in rewriteToSubscriptGetCommon()
191 SourceRange ArgRange = Msg->getArg(0)->getSourceRange(); in rewriteToSubscriptGetCommon()
196 commit.replaceWithInner(SourceRange(ArgRange.getBegin(), MsgRange.getEnd()), in rewriteToSubscriptGetCommon()
237 SourceRange MsgRange = Msg->getSourceRange(); in rewriteToArraySubscriptSet()
238 SourceRange RecRange = Rec->getSourceRange(); in rewriteToArraySubscriptSet()
239 SourceRange Arg0Range = Msg->getArg(0)->getSourceRange(); in rewriteToArraySubscriptSet()
240 SourceRange Arg1Range = Msg->getArg(1)->getSourceRange(); in rewriteToArraySubscriptSet()
248 commit.replaceWithInner(SourceRange(Arg1Range.getBegin(), MsgRange.getEnd()), in rewriteToArraySubscriptSet()
[all …]
/llvm-project/clang/include/clang/Rewrite/Core/
H A DRewriter.h89 int getRangeSize(SourceRange Range,
106 std::string getRewrittenText(SourceRange Range) const { in getRewrittenText()
152 bool RemoveText(SourceRange range, RewriteOptions opts = RewriteOptions()) {
172 bool ReplaceText(SourceRange range, StringRef NewStr) { in ReplaceText()
179 bool ReplaceText(SourceRange range, SourceRange replacementRange);
186 bool IncreaseIndentation(SourceRange range, SourceLocation parentIndent) { in IncreaseIndentation()
/llvm-project/clang/lib/Lex/
H A DPreprocessingRecord.cpp43 SourceRange Range) in InclusionDirective()
57 PreprocessingRecord::getPreprocessedEntitiesInRange(SourceRange Range) {
134 PreprocessingRecord::getPreprocessedEntitiesInRangeSlow(SourceRange Range) {
165 SourceRange Range) const {
177 template <SourceLocation (SourceRange::*getRangeLoc)() const>
200 SourceRange Range = PPE->getSourceRange(); in operator ()()
244 PPEntityComp<&SourceRange::getBegin>(SourceMgr)); in findEndLocalPreprocessedEntity()
304 PPEntityComp<&SourceRange::getBegin>(SourceMgr)); in addPreprocessedEntity()
374 PreprocessedEntity(PreprocessedEntity::InvalidKind, SourceRange()); in getLoadedPreprocessedEntity()
386 SourceRange Rang in findMacroDefinition()
[all...]
/llvm-project/clang/lib/AST/
H A DMicrosoftMangle.cpp399 void mangleAddressSpaceType(QualType T, Qualifiers Quals, SourceRange Range);
400 void mangleType(QualType T, SourceRange Range,
440 void mangleFunctionArgumentType(QualType T, SourceRange Range);
450 SourceRange Range);
460 void mangleCallingConvention(CallingConv CC, SourceRange Range);
461 void mangleCallingConvention(const FunctionType *T, SourceRange Range);
477 SourceRange Range);
479 SourceRange Range); in MicrosoftMangleContextImpl()
687 SourceRange SR = VD->getSourceRange(); in mangleMemberDataPointer()
761 mangleType(TemplateArgType, SourceRange(), QMM_Dro in mangleMemberDataPointerInClassNTTP()
2754 mangleType(const FunctionProtoType * T,Qualifiers,SourceRange) mangleType() argument
2767 mangleType(const FunctionNoProtoType * T,Qualifiers,SourceRange) mangleType() argument
3118 mangleType(const EnumType * T,Qualifiers,SourceRange) mangleType() argument
3122 mangleType(const RecordType * T,Qualifiers,SourceRange) mangleType() argument
3161 mangleType(const ConstantArrayType * T,Qualifiers,SourceRange) mangleType() argument
3165 mangleType(const VariableArrayType * T,Qualifiers,SourceRange) mangleType() argument
3169 mangleType(const DependentSizedArrayType * T,Qualifiers,SourceRange) mangleType() argument
3173 mangleType(const IncompleteArrayType * T,Qualifiers,SourceRange) mangleType() argument
3218 mangleType(const ArrayParameterType * T,Qualifiers,SourceRange) mangleType() argument
3450 mangleType(const ObjCInterfaceType * T,Qualifiers,SourceRange) mangleType() argument
3510 mangleType(const InjectedClassNameType *,Qualifiers,SourceRange) mangleType() argument
[all...]
/llvm-project/clang/lib/CodeGen/
H A DCoverageMappingGen.h45 SourceRange Range;
57 SkippedRange(SourceRange Range, Kind K,
84 void AddSkippedRange(SourceRange Range, SkippedRange::Kind RangeKind);
86 void SourceRangeSkipped(SourceRange Range, SourceLocation EndifLoc) override;
88 void HandleEmptyline(SourceRange Range) override;
90 bool HandleComment(Preprocessor &PP, SourceRange Range) override;
/llvm-project/clang/unittests/AST/
H A DSourceLocationTest.cpp9 // This file contains tests for SourceLocation and SourceRange fields
122 SourceRange getRange(const LabelStmt &Node) override { in getRange()
179 SourceRange getRange(const MemberExpr &Node) override { in getRange()
241 auto verify = [&](SourceRange ActualRange, in TEST()
401 SourceRange getRange(const TypeLoc &Node) override { in getRange()
405 return SourceRange(T.getLAngleLoc(), T.getRAngleLoc()); in getRange()
426 SourceRange getRange(const TypeLoc &Node) override { in getRange()
430 return SourceRange(T.getLParenLoc(), T.getRParenLoc()); in getRange()
486 TEST(CXXFunctionalCastExpr, SourceRange) { in TEST() argument
496 TEST(CXXConstructExpr, SourceRange) { in TEST() argument
506 TEST(CXXTemporaryObjectExpr,SourceRange) TEST() argument
515 TEST(CXXUnresolvedConstructExpr,SourceRange) TEST() argument
528 TEST(UsingDecl,SourceRange) TEST() argument
537 TEST(UnresolvedUsingValueDecl,SourceRange) TEST() argument
[all...]

12345678910>>...20