Lines Matching defs:BaseMD
36 /// \returns true if the return types of BaseMD and DerivedMD are covariant.
38 const CXXMethodDecl *BaseMD,
40 QualType BaseReturnTy = BaseMD->getType()
63 /// BTy is the class type in return type of BaseMD. For example,
129 static bool checkParamTypes(const CXXMethodDecl *BaseMD,
131 unsigned NumParamA = BaseMD->getNumParams();
137 if (getDecayedType(BaseMD->getParamDecl(I)->getType().getCanonicalType()) !=
148 const CXXMethodDecl *BaseMD,
150 if (BaseMD->isStatic() != DerivedMD->isStatic())
153 if (BaseMD->getType() == DerivedMD->getType())
158 if (!checkOverridingFunctionReturnType(Context, BaseMD, DerivedMD))
160 return checkParamTypes(BaseMD, DerivedMD);
163 /// Check whether BaseMD overrides DerivedMD.
165 /// Prerequisite: the class which BaseMD is in should be a base class of that
167 static bool checkOverrideByDerivedMethod(const CXXMethodDecl *BaseMD,
173 if (BaseMD->getCanonicalDecl() == OverriddenMD->getCanonicalDecl())
181 const CXXMethodDecl *BaseMD) {
182 auto Iter = PossibleMap.find(BaseMD);
186 bool IsPossible = !BaseMD->isImplicit() && !isa<CXXConstructorDecl>(BaseMD) &&
187 !isa<CXXDestructorDecl>(BaseMD) && BaseMD->isVirtual() &&
188 !BaseMD->isOverloadedOperator() &&
189 !isa<CXXConversionDecl>(BaseMD);
190 PossibleMap[BaseMD] = IsPossible;
195 const CXXMethodDecl *BaseMD, const CXXRecordDecl *DerivedRD) {
196 auto Key = std::make_pair(BaseMD, DerivedRD);
206 if (checkOverrideByDerivedMethod(BaseMD, DerivedMD)) {
236 for (const auto *BaseMD : BaseRD->methods()) {
237 if (!isPossibleToBeOverridden(BaseMD))
240 if (isOverriddenByDerivedClass(BaseMD, DerivedRD))
243 unsigned EditDistance = BaseMD->getName().edit_distance(
246 if (checkOverrideWithoutName(Context, BaseMD, DerivedMD)) {
251 bool ApplyFix = !BaseMD->isTemplateInstantiation() &&
258 << BaseMD->getQualifiedNameAsString();
260 Diag << FixItHint::CreateReplacement(Range, BaseMD->getName());