Home
last modified time | relevance | path

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

12

/llvm-project-15.0.7/clang/unittests/Introspection/
H A DIntrospectionTest.cpp205 auto Result = NodeIntrospection::GetLocations(MethodDecl); in TEST()
214 STRING_LOCATION_STDPAIR(MethodDecl, getBeginLoc()), in TEST()
215 STRING_LOCATION_STDPAIR(MethodDecl, getBodyRBrace()), in TEST()
216 STRING_LOCATION_STDPAIR(MethodDecl, getEndLoc()), in TEST()
217 STRING_LOCATION_STDPAIR(MethodDecl, getInnerLocStart()), in TEST()
218 STRING_LOCATION_STDPAIR(MethodDecl, getLocation()), in TEST()
221 STRING_LOCATION_STDPAIR(MethodDecl, getNameInfo().getLoc()), in TEST()
222 STRING_LOCATION_STDPAIR(MethodDecl, getOuterLocStart()), in TEST()
293 STRING_LOCATION_STDPAIR(MethodDecl, getTypeSpecEndLoc()), in TEST()
294 STRING_LOCATION_STDPAIR(MethodDecl, getTypeSpecStartLoc()) in TEST()
[all …]
/llvm-project-15.0.7/clang/examples/CallSuperAttribute/
H A DCallSuperAttrInfo.cpp80 bool VisitCXXMethodDecl(CXXMethodDecl *MethodDecl) { in VisitCXXMethodDecl() argument
81 if (MethodDecl->isThisDeclarationADefinition() && MethodDecl->hasBody()) { in VisitCXXMethodDecl()
84 for (const auto *Overridden : MethodDecl->overridden_methods()) { in VisitCXXMethodDecl()
92 Visitor.TraverseDecl(MethodDecl); in VisitCXXMethodDecl()
96 Diags.Report(MethodDecl->getLocation(), WarningSuperNotCalled) in VisitCXXMethodDecl()
97 << LeftOverriddens << MethodDecl; in VisitCXXMethodDecl()
129 const CXXMethodDecl *MethodDecl) { in lateDiagAppertainsToDecl() argument
130 if (MethodDecl->hasAttr<FinalAttr>()) { in lateDiagAppertainsToDecl()
134 Diags.Report(MethodDecl->getLocation(), ID); in lateDiagAppertainsToDecl()
/llvm-project-15.0.7/clang/lib/Tooling/Refactoring/Rename/
H A DUSRFindingAction.cpp71 if (const auto *MethodDecl = dyn_cast<CXXMethodDecl>(FoundDecl)) { in Find() local
72 addUSRsOfOverridenFunctions(MethodDecl); in Find()
77 addUSRsOfInstantiatedMethods(MethodDecl); in Find()
107 bool VisitCXXMethodDecl(const CXXMethodDecl *MethodDecl) { in VisitCXXMethodDecl() argument
108 if (MethodDecl->isVirtual()) in VisitCXXMethodDecl()
109 OverriddenMethods.push_back(MethodDecl); in VisitCXXMethodDecl()
110 if (MethodDecl->getInstantiatedFromMemberFunction()) in VisitCXXMethodDecl()
111 InstantiatedMethods.push_back(MethodDecl); in VisitCXXMethodDecl()
179 void addUSRsOfOverridenFunctions(const CXXMethodDecl *MethodDecl) { in addUSRsOfOverridenFunctions() argument
180 USRSet.insert(getUSRForDecl(MethodDecl)); in addUSRsOfOverridenFunctions()
[all …]
/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/
H A DMoveChecker.cpp445 if (!MethodDecl) in checkPostCall()
455 if (!ConstructorDecl && !MethodDecl->isMoveAssignmentOperator()) in checkPostCall()
481 const CXXRecordDecl *RD = MethodDecl->getParent(); in checkPostCall()
631 if (!MethodDecl) in checkPreCall()
638 if (isStateResetMethod(MethodDecl)) { in checkPreCall()
644 if (isMoveSafeMethod(MethodDecl)) in checkPreCall()
648 const CXXRecordDecl *RD = MethodDecl->getParent(); in checkPreCall()
650 if (MethodDecl->isOverloadedOperator()) { in checkPreCall()
651 OverloadedOperatorKind OOK = MethodDecl->getOverloadedOperator(); in checkPreCall()
658 if (MethodDecl->isCopyAssignmentOperator() || in checkPreCall()
[all …]
H A DSmartPtrModeling.cpp127 const auto *MethodDecl = dyn_cast_or_null<CXXMethodDecl>(Call.getDecl()); in isStdSmartPtrCall() local
128 if (!MethodDecl || !MethodDecl->getParent()) in isStdSmartPtrCall()
130 return isStdSmartPtr(MethodDecl->getParent()); in isStdSmartPtrCall()
215 const auto *MethodDecl = dyn_cast_or_null<CXXMethodDecl>(Call.getDecl()); in getInnerPointerType() local
216 if (!MethodDecl || !MethodDecl->getParent()) in getInnerPointerType()
219 const auto *RecordDecl = MethodDecl->getParent(); in getInnerPointerType()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/google/
H A DAvoidNSObjectNewCheck.cpp43 for (const auto *MethodDecl : ClassDecl->instance_methods()) { in isInitMethodAvailable() local
44 if (MethodDecl->getSelector().getAsString() == "init") in isInitMethodAvailable()
45 return !MethodDecl->isUnavailable(); in isInitMethodAvailable()
/llvm-project-15.0.7/lldb/source/Plugins/ExpressionParser/Clang/
H A DASTResultSynthesizer.cpp157 ObjCMethodDecl *MethodDecl) { in SynthesizeObjCMethodResult() argument
163 if (!MethodDecl) in SynthesizeObjCMethodResult()
170 MethodDecl->print(os); in SynthesizeObjCMethodResult()
177 Stmt *method_body = MethodDecl->getBody(); in SynthesizeObjCMethodResult()
184 bool ret = SynthesizeBodyResult(compound_stmt, MethodDecl); in SynthesizeObjCMethodResult()
190 MethodDecl->print(os); in SynthesizeObjCMethodResult()
H A DASTResultSynthesizer.h118 bool SynthesizeObjCMethodResult(clang::ObjCMethodDecl *MethodDecl);
/llvm-project-15.0.7/clang/lib/ARCMigrate/
H A DObjCMT.cpp1625 if (MethodDecl->hasBody() || MethodDecl->isImplicit()) in migrateAddMethodAnnotation()
1632 (MethodDecl->hasAttr<CFReturnsRetainedAttr>() || in migrateAddMethodAnnotation()
1633 MethodDecl->hasAttr<CFReturnsNotRetainedAttr>() || in migrateAddMethodAnnotation()
1634 MethodDecl->hasAttr<NSReturnsRetainedAttr>() || in migrateAddMethodAnnotation()
1635 MethodDecl->hasAttr<NSReturnsNotRetainedAttr>() || in migrateAddMethodAnnotation()
1636 MethodDecl->hasAttr<NSReturnsAutoreleasedAttr>()); in migrateAddMethodAnnotation()
1639 !MethodDecl->hasAttr<NSConsumesSelfAttr>() && in migrateAddMethodAnnotation()
1640 MethodDecl->getMethodFamily() != OMF_init && in migrateAddMethodAnnotation()
1641 MethodDecl->getMethodFamily() != OMF_release && in migrateAddMethodAnnotation()
1650 (MethodDecl->param_begin() == MethodDecl->param_end())) in migrateAddMethodAnnotation()
[all …]
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/performance/
H A DUnnecessaryCopyInitialization.cpp86 const auto MethodDecl = in AST_MATCHER_FUNCTION_P() local
95 cxxMemberCallExpr(callee(MethodDecl), on(ReceiverExpr), in AST_MATCHER_FUNCTION_P()
97 cxxOperatorCallExpr(callee(MethodDecl), hasArgument(0, ReceiverExpr), in AST_MATCHER_FUNCTION_P()
213 const auto *MethodDecl = Nodes.getNodeAs<CXXMethodDecl>(MethodDeclId); in constructorArgumentType() local
214 return MethodDecl->getReturnType(); in constructorArgumentType()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/cert/
H A DPostfixOperatorCheck.cpp31 if (const auto *MethodDecl = dyn_cast<CXXMethodDecl>(FuncDecl)) in check() local
32 HasThis = MethodDecl->isInstance(); in check()
/llvm-project-15.0.7/clang/lib/Analysis/FlowSensitive/
H A DDataflowEnvironment.cpp184 if (const auto *MethodDecl = dyn_cast<CXXMethodDecl>(&DeclCtx)) { in Environment() local
185 auto *Parent = MethodDecl->getParent(); in Environment()
188 MethodDecl = dyn_cast<CXXMethodDecl>(Parent->getDeclContext()); in Environment()
190 if (MethodDecl && !MethodDecl->isStatic()) { in Environment()
191 QualType ThisPointeeType = MethodDecl->getThisObjectType(); in Environment()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/
H A DAssertSideEffectCheck.cpp65 else if (const auto *MethodDecl = dyn_cast<CXXMethodDecl>(FuncDecl)) in AST_MATCHER_P2() local
66 Result &= !MethodDecl->isConst(); in AST_MATCHER_P2()
/llvm-project-15.0.7/clang/lib/AST/
H A DDeclObjC.cpp703 ObjCMethodDecl *MethodDecl = nullptr; in lookupMethod() local
711 return MethodDecl; in lookupMethod()
716 if (C != Cat || !MethodDecl->isImplicit()) in lookupMethod()
717 return MethodDecl; in lookupMethod()
722 return MethodDecl; in lookupMethod()
732 if (C != Cat || !MethodDecl->isImplicit()) in lookupMethod()
733 return MethodDecl; in lookupMethod()
1970 ObjCMethodDecl *MethodDecl = nullptr; in lookupMethod() local
1978 if ((MethodDecl = getMethod(Sel, isInstance))) in lookupMethod()
1979 return MethodDecl; in lookupMethod()
[all …]
H A DASTContext.cpp12045 ASTContext::ObjCMethodsAreEqual(const ObjCMethodDecl *MethodDecl, in ObjCMethodsAreEqual() argument
12048 if (MethodDecl->hasAttr<UnavailableAttr>() in ObjCMethodsAreEqual()
12049 || MethodDecl->hasAttr<DeprecatedAttr>()) in ObjCMethodsAreEqual()
12051 if (MethodDecl->getObjCDeclQualifier() != in ObjCMethodsAreEqual()
12054 if (!hasSameType(MethodDecl->getReturnType(), MethodImpl->getReturnType())) in ObjCMethodsAreEqual()
12057 if (MethodDecl->param_size() != MethodImpl->param_size()) in ObjCMethodsAreEqual()
12061 IF = MethodDecl->param_begin(), EM = MethodImpl->param_end(), in ObjCMethodsAreEqual()
12062 EF = MethodDecl->param_end(); in ObjCMethodsAreEqual()
12072 return (MethodDecl->isVariadic() == MethodImpl->isVariadic()); in ObjCMethodsAreEqual()
/llvm-project-15.0.7/clang/lib/Sema/
H A DSemaDeclObjC.cpp2348 << MethodDecl->getReturnTypeSourceRange(); in CheckMethodOverrideReturn()
2408 S.Diag(MethodDecl->getLocation(), IsOverridingMode in CheckMethodOverrideReturn()
2411 << MethodDecl->getReturnTypeSourceRange(); in CheckMethodOverrideReturn()
2577 CheckMethodOverrideReturn(*this, ImpMethodDecl, MethodDecl, in WarnConflictingTypedMethods()
2583 EF = MethodDecl->param_end(); in WarnConflictingTypedMethods()
2622 ObjCMethodDecl *MethodDecl, in WarnExactTypedMethods() argument
2631 if (MethodDecl->hasAttr<UnavailableAttr>() || in WarnExactTypedMethods()
2632 MethodDecl->hasAttr<DeprecatedAttr>()) in WarnExactTypedMethods()
2640 EF = MethodDecl->param_end(); in WarnExactTypedMethods()
2651 match = !(MethodDecl->isClassMethod() && in WarnExactTypedMethods()
[all …]
H A DSemaAvailability.cpp499 if (const auto *MethodDecl = dyn_cast<ObjCMethodDecl>(ReferringDecl)) { in DoEmitAvailabilityWarning() local
500 Selector Sel = MethodDecl->getSelector(); in DoEmitAvailabilityWarning()
H A DSemaCoroutine.cpp1587 auto *MethodDecl = MbrRef->getMethodDecl(); in noteMemberDeclaredHere() local
1588 S.Diag(MethodDecl->getLocation(), diag::note_member_declared_here) in noteMemberDeclaredHere()
1589 << MethodDecl; in noteMemberDeclaredHere()
H A DSemaExpr.cpp18046 if (MethodDecl->isOverloadedOperator() && in MarkFunctionReferenced()
18047 MethodDecl->getOverloadedOperator() == OO_Equal) { in MarkFunctionReferenced()
18048 MethodDecl = cast<CXXMethodDecl>(MethodDecl->getFirstDecl()); in MarkFunctionReferenced()
18049 if (MethodDecl->isDefaulted() && !MethodDecl->isDeleted()) { in MarkFunctionReferenced()
18050 if (MethodDecl->isCopyAssignmentOperator()) in MarkFunctionReferenced()
18051 DefineImplicitCopyAssignment(Loc, MethodDecl); in MarkFunctionReferenced()
18052 else if (MethodDecl->isMoveAssignmentOperator()) in MarkFunctionReferenced()
18053 DefineImplicitMoveAssignment(Loc, MethodDecl); in MarkFunctionReferenced()
18055 } else if (isa<CXXConversionDecl>(MethodDecl) && in MarkFunctionReferenced()
18056 MethodDecl->getParent()->isLambda()) { in MarkFunctionReferenced()
[all …]
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/cppcoreguidelines/
H A DSpecialMemberFunctionsCheck.cpp126 if (const auto *MethodDecl = in check() local
128 StoreMember({KV.second, MethodDecl->isDeleted()}); in check()
/llvm-project-15.0.7/clang/include/clang/Sema/
H A DInitialization.h186 ObjCMethodDecl *MethodDecl; member
360 Result.MethodDecl = MD; in InitializeRelatedResult()
454 ObjCMethodDecl *getMethodDecl() const { return MethodDecl; } in getMethodDecl()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/readability/
H A DSuspiciousCallArgumentCheck.cpp640 if (const auto *MethodDecl = dyn_cast<CXXMethodDecl>(CalleeFuncDecl)) { in check() local
641 if (MethodDecl->getParent()->isLambda()) in check()
644 else if (MethodDecl->getOverloadedOperator() == OO_Call) in check()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/modernize/
H A DAvoidBindCheck.cpp684 const auto *MethodDecl = dyn_cast<CXXMethodDecl>(LP.Callable.Decl); in check() local
693 Stream << MethodDecl->getName(); in check()
/llvm-project-15.0.7/clang/lib/CodeGen/
H A DItaniumCXXABI.cpp1926 auto *MethodDecl = cast<CXXMethodDecl>(GD.getDecl()); in getVirtualFunctionPointer() local
1928 This, TyPtr->getPointerTo(), MethodDecl->getParent()); in getVirtualFunctionPointer()
1932 if (CGF.ShouldEmitVTableTypeCheckedLoad(MethodDecl->getParent())) { in getVirtualFunctionPointer()
1934 MethodDecl->getParent(), VTable, TyPtr, in getVirtualFunctionPointer()
1937 CGF.EmitTypeMetadataCodeForVCall(MethodDecl->getParent(), VTable, Loc); in getVirtualFunctionPointer()
H A DMicrosoftCXXABI.cpp1932 auto *MethodDecl = cast<CXXMethodDecl>(GD.getDecl()); in getVirtualFunctionPointer() local
1934 MethodDecl->getParent()); in getVirtualFunctionPointer()
1943 ML.VBase ? ML.VBase : MethodDecl->getParent()), in getVirtualFunctionPointer()
1952 if (CGF.ShouldEmitVTableTypeCheckedLoad(MethodDecl->getParent())) { in getVirtualFunctionPointer()

12