/llvm-project/clang/lib/Tooling/Refactoring/Rename/ |
H A D | USRFindingAction.cpp | 71 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/clang/examples/CallSuperAttribute/ |
H A D | CallSuperAttrInfo.cpp | 80 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() 90 // Now find if the superclass method is called in `MethodDecl`. 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 in lateDiagAppertainsToDecl() [all...] |
/llvm-project/clang-tools-extra/clang-tidy/utils/ |
H A D | ExceptionSpecAnalyzer.cpp | 32 const CXXMethodDecl *MethodDecl, const FunctionProtoType *FuncProto) { in analyzeUnresolvedOrDefaulted() argument 33 if (!FuncProto || !MethodDecl) in analyzeUnresolvedOrDefaulted() 36 const DefaultableMemberKind Kind = getDefaultableMemberKind(MethodDecl); in analyzeUnresolvedOrDefaulted() 41 return analyzeRecord(MethodDecl->getParent(), Kind, SkipMethods::Yes); in analyzeUnresolvedOrDefaulted() 85 for (const auto *MethodDecl : RecordDecl->methods()) in analyzeRecord() local 86 if (getDefaultableMemberKind(MethodDecl) == Kind) in analyzeRecord() 87 return analyze(MethodDecl); in analyzeRecord() 231 if (const auto *MethodDecl = dyn_cast<CXXMethodDecl>(FuncDecl)) { in getDefaultableMemberKind() local 243 if (MethodDecl->isCopyAssignmentOperator()) in getDefaultableMemberKind() 246 if (MethodDecl->isMoveAssignmentOperator()) in getDefaultableMemberKind()
|
H A D | ExceptionSpecAnalyzer.h | 53 State analyzeUnresolvedOrDefaulted(const CXXMethodDecl *MethodDecl,
|
/llvm-project/clang/lib/StaticAnalyzer/Checkers/ |
H A D | MoveChecker.cpp | 447 const auto MethodDecl = dyn_cast_or_null<CXXMethodDecl>(AFC->getDecl()); in checkPostCall() 448 if (!MethodDecl) in checkPostCall() 454 const auto *ConstructorDecl = dyn_cast<CXXConstructorDecl>(MethodDecl); in checkPostCall() 458 if (!ConstructorDecl && !MethodDecl->isMoveAssignmentOperator()) in checkPostCall() 484 const CXXRecordDecl *RD = MethodDecl->getParent(); in checkPostCall() 630 const auto MethodDecl = dyn_cast_or_null<CXXMethodDecl>(IC->getDecl()); in checkPreCall() 631 if (!MethodDecl) in checkPreCall() 635 if (isa<CXXDestructorDecl>(MethodDecl)) in checkPreCall() 642 if (isStateResetMethod(MethodDecl)) { in checkPreCall() 648 if (isMoveSafeMethod(MethodDecl)) in checkPreCall() 446 const auto MethodDecl = dyn_cast_or_null<CXXMethodDecl>(AFC->getDecl()); checkPostCall() local 629 const auto MethodDecl = dyn_cast_or_null<CXXMethodDecl>(IC->getDecl()); checkPreCall() local [all...] |
H A D | SmartPtrModeling.cpp | 128 const auto *MethodDecl = dyn_cast_or_null<CXXMethodDecl>(Call.getDecl()); in isStdSmartPtrCall() local 129 if (!MethodDecl || !MethodDecl->getParent()) in isStdSmartPtrCall() 131 return isStdSmartPtr(MethodDecl->getParent()); in isStdSmartPtrCall() 216 const auto *MethodDecl = dyn_cast_or_null<CXXMethodDecl>(Call.getDecl()); in getInnerPointerType() local 217 if (!MethodDecl || !MethodDecl->getParent()) in getInnerPointerType() 220 const auto *RecordDecl = MethodDecl->getParent(); in getInnerPointerType()
|
/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/ |
H A D | RefCntblBaseVirtualDtorChecker.cpp | 365 for (auto *MethodDecl : C->methods()) { in reportBug() 366 if (safeGetName(MethodDecl) == "deref") { in reportBug() 369 auto Result = Visitor.HasSpecializedDelete(MethodDecl); in reportBug() 376 for (auto *MethodDecl : C->methods()) { in reportBug() 377 if (safeGetName(MethodDecl) == "deref") { in reportBug() 379 auto Result = Visitor.HasSpecializedDelete(MethodDecl); in reportBug() 333 for (auto *MethodDecl : C->methods()) { isClassWithSpecializedDelete() local 344 for (auto *MethodDecl : C->methods()) { isClassWithSpecializedDelete() local
|
H A D | PtrTypesSemantics.cpp | 319 if (auto *MethodDecl = dyn_cast<CXXMethodDecl>(F)) { in VisitCompoundStmt() 320 if (!MethodDecl->isStatic()) in VisitCompoundStmt() 230 if (auto *MethodDecl = dyn_cast<CXXMethodDecl>(F)) { isSingleton() local
|
/llvm-project/clang-tools-extra/clang-tidy/bugprone/ |
H A D | AssertSideEffectCheck.cpp | 44 if (const auto *MethodDecl = in AST_MATCHER_P2() local 46 if (MethodDecl->isConst()) in AST_MATCHER_P2() 79 if (const auto *MethodDecl = dyn_cast<CXXMethodDecl>(FuncDecl)) in AST_MATCHER_P2() local 80 return !MethodDecl->isConst(); in AST_MATCHER_P2()
|
/llvm-project/clang-tools-extra/clang-tidy/google/ |
H A D | AvoidNSObjectNewCheck.cpp | 40 for (const auto *MethodDecl : ClassDecl->instance_methods()) { in isInitMethodAvailable() local 41 if (MethodDecl->getSelector().getAsString() == "init") in isInitMethodAvailable() 42 return !MethodDecl->isUnavailable(); in isInitMethodAvailable()
|
/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ |
H A D | ASTResultSynthesizer.cpp | 153 ObjCMethodDecl *MethodDecl) { in SynthesizeFunctionResult() 159 if (!MethodDecl) in SynthesizeObjCMethodResult() 166 MethodDecl->print(os); in SynthesizeObjCMethodResult() 171 Stmt *method_body = MethodDecl->getBody(); in SynthesizeObjCMethodResult() 178 bool ret = SynthesizeBodyResult(compound_stmt, MethodDecl); in SynthesizeObjCMethodResult() 184 MethodDecl->print(os); in SynthesizeObjCMethodResult() 157 SynthesizeObjCMethodResult(ObjCMethodDecl * MethodDecl) SynthesizeObjCMethodResult() argument
|
H A D | ASTResultSynthesizer.h | 118 bool SynthesizeObjCMethodResult(clang::ObjCMethodDecl *MethodDecl);
|
/llvm-project/clang/lib/Sema/ |
H A D | HLSLExternalSemaSource.cpp | 245 auto *MethodDecl = CXXMethodDecl::Create( addArraySubscriptOperator() local
|
H A D | SemaDeclObjC.cpp | 2353 ObjCMethodDecl *MethodDecl, in CheckMethodOverrideReturn() 2358 objcModifiersConflict(MethodDecl->getObjCDeclQualifier(), in CheckMethodOverrideReturn() 2367 S.Diag(MethodDecl->getLocation(), diag::note_previous_declaration) in CheckMethodOverrideReturn() 2368 << MethodDecl->getReturnTypeSourceRange(); in CheckMethodOverrideReturn() 2376 MethodDecl->getReturnType(), in CheckMethodOverrideReturn() 2379 auto nullabilityMethodDecl = *MethodDecl->getReturnType()->getNullability(); in CheckMethodOverrideReturn() 2386 ((MethodDecl->getObjCDeclQualifier() & in CheckMethodOverrideReturn() 2388 S.Diag(MethodDecl->getLocation(), diag::note_previous_declaration); in CheckMethodOverrideReturn() 2392 MethodDecl->getReturnType())) in CheckMethodOverrideReturn() 2406 MethodDecl in CheckMethodOverrideReturn() 2355 CheckMethodOverrideReturn(Sema & S,ObjCMethodDecl * MethodImpl,ObjCMethodDecl * MethodDecl,bool IsProtocolMethodDecl,bool IsOverridingMode,bool Warn) CheckMethodOverrideReturn() argument 2435 CheckMethodOverrideParam(Sema & S,ObjCMethodDecl * MethodImpl,ObjCMethodDecl * MethodDecl,ParmVarDecl * ImplVar,ParmVarDecl * IfaceVar,bool IsProtocolMethodDecl,bool IsOverridingMode,bool Warn) CheckMethodOverrideParam() argument 2587 WarnConflictingTypedMethods(ObjCMethodDecl * ImpMethodDecl,ObjCMethodDecl * MethodDecl,bool IsProtocolMethodDecl) WarnConflictingTypedMethods() argument 2636 WarnExactTypedMethods(ObjCMethodDecl * ImpMethodDecl,ObjCMethodDecl * MethodDecl,bool IsProtocolMethodDecl) WarnExactTypedMethods() argument [all...] |
/llvm-project/clang/lib/ARCMigrate/ |
H A D | ObjCMT.cpp | 73 const ObjCMethodDecl *MethodDecl, bool ResultAnnotated); 83 const ObjCMethodDecl *MethodDecl); 1566 const ObjCMethodDecl *MethodDecl, in AddCFAnnotations() 1580 ObjCMethodFamily OMF = MethodDecl->getMethodFamily(); in AddCFAnnotations() 1598 commit.insertBefore(MethodDecl->getEndLoc(), AnnotationString); in AddCFAnnotations() 1603 for (ObjCMethodDecl::param_const_iterator pi = MethodDecl->param_begin(), in AddCFAnnotations() 1604 pe = MethodDecl->param_end(); pi != pe; ++pi, ++i) { in AddCFAnnotations() 1620 const ObjCMethodDecl *MethodDecl) { in migrateAddMethodAnnotation() 1621 if (MethodDecl->hasBody() || MethodDecl in migrateAddMethodAnnotation() 1565 AddCFAnnotations(ASTContext & Ctx,const RetainSummary * RS,const ObjCMethodDecl * MethodDecl,bool ResultAnnotated) AddCFAnnotations() argument 1619 migrateAddMethodAnnotation(ASTContext & Ctx,const ObjCMethodDecl * MethodDecl) migrateAddMethodAnnotation() argument [all...] |
/llvm-project/clang-tools-extra/clang-tidy/performance/ |
H A D | UnnecessaryCopyInitialization.cpp | 86 const auto MethodDecl = in AST_MATCHER_FUNCTION_P() local 101 anyOf(cxxMemberCallExpr(callee(MethodDecl), on(OnExpr), in AST_MATCHER_FUNCTION_P() 103 cxxOperatorCallExpr(callee(MethodDecl), hasArgument(0, OnExpr), in AST_MATCHER_FUNCTION_P() 223 const auto *MethodDecl = Nodes.getNodeAs<CXXMethodDecl>(MethodDeclId); 224 return MethodDecl->getReturnType(); 220 const auto *MethodDecl = Nodes.getNodeAs<CXXMethodDecl>(MethodDeclId); constructorArgumentType() local
|
/llvm-project/clang-tools-extra/clang-tidy/llvmlibc/ |
H A D | InlineFunctionDeclCheck.cpp | 80 if (const auto *MethodDecl = dyn_cast<CXXMethodDecl>(FuncDecl)) in check() local 81 if (MethodDecl->getParent()->isLambda()) in check()
|
/llvm-project/clang-tools-extra/clang-tidy/cppcoreguidelines/ |
H A D | SpecialMemberFunctionsCheck.cpp | 147 if (const auto *MethodDecl = in check() local 150 {KV.second, MethodDecl->isDeleted(), MethodDecl->isImplicit()}); in check()
|
/llvm-project/clang/lib/AST/ |
H A D | DeclObjC.cpp | 708 ObjCMethodDecl *MethodDecl = nullptr; in lookupMethod() 715 if ((MethodDecl = ClassDecl->getMethod(Sel, isInstance))) in lookupMethod() 716 return MethodDecl; in lookupMethod() 720 if ((MethodDecl = Cat->getMethod(Sel, isInstance))) in lookupMethod() 721 if (C != Cat || !MethodDecl->isImplicit()) in lookupMethod() 722 return MethodDecl; in lookupMethod() 726 if ((MethodDecl = I->lookupMethod(Sel, isInstance))) in lookupMethod() 727 return MethodDecl; in lookupMethod() 736 if ((MethodDecl = Protocol->lookupMethod(Sel, isInstance))) in lookupMethod() 737 if (C != Cat || !MethodDecl in lookupMethod() 710 ObjCMethodDecl *MethodDecl = nullptr; lookupMethod() local 1999 ObjCMethodDecl *MethodDecl = nullptr; lookupMethod() local [all...] |
/llvm-project/clang/lib/Analysis/FlowSensitive/ |
H A D | ASTOps.cpp | 190 const auto *MethodDecl = dyn_cast_or_null<CXXMethodDecl>(C.getCalleeDecl()); in getMemberForAccessor() 191 if (!MethodDecl) in getMemberForAccessor() 193 auto *Body = dyn_cast_or_null<CompoundStmt>(MethodDecl->getBody()); 182 const auto *MethodDecl = dyn_cast_or_null<CXXMethodDecl>(C.getCalleeDecl()); getMemberForAccessor() local
|
H A D | DataflowEnvironment.cpp | 518 if (const auto *MethodDecl = dyn_cast<CXXMethodDecl>(InitialTargetFunc)) { in initialize() 519 auto *Parent = MethodDecl->getParent(); in initialize() 546 } else if (MethodDecl->isImplicitObjectMemberFunction()) { in initialize() 547 QualType ThisPointeeType = MethodDecl->getFunctionObjectParameterType(); in initialize() 554 if (!isa<CXXConstructorDecl>(MethodDecl)) in initFieldsGlobalsAndFuncs() 510 if (const auto *MethodDecl = dyn_cast<CXXMethodDecl>(InitialTargetFunc)) { initialize() local
|
/llvm-project/clang/include/clang/Sema/ |
H A D | Attr.h | 121 if (const auto *MethodDecl = dyn_cast<CXXMethodDecl>(D)) in isInstanceMethod() local 122 return MethodDecl->isInstance(); in isInstanceMethod()
|
H A D | Initialization.h | 190 ObjCMethodDecl *MethodDecl; member 366 Result.MethodDecl = MD; in InitializeRelatedResult() 468 ObjCMethodDecl *getMethodDecl() const { return MethodDecl; } in getMethodDecl()
|
/llvm-project/clang-tools-extra/clang-tidy/modernize/ |
H A D | AvoidBindCheck.cpp | 691 const auto *MethodDecl = dyn_cast<CXXMethodDecl>(LP.Callable.Decl); in check() local 694 if (MethodDecl->getOverloadedOperator() == OO_Call) { in check() 701 Stream << MethodDecl->getNameAsString(); in check()
|
/llvm-project/clang-tools-extra/clang-tidy/readability/ |
H A D | SuspiciousCallArgumentCheck.cpp | 642 if (const auto *MethodDecl = dyn_cast<CXXMethodDecl>(CalleeFuncDecl)) { in check() 643 if (MethodDecl->getParent()->isLambda()) in check() 646 else if (MethodDecl->getOverloadedOperator() == OO_Call) in check() 639 if (const auto *MethodDecl = dyn_cast<CXXMethodDecl>(CalleeFuncDecl)) { check() local
|