File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ static void addUsage(RenamerClangTidyCheck::NamingCheckFailureMap &Failures,
133133 const RenamerClangTidyCheck::NamingCheckId &Decl,
134134 SourceRange Range, SourceManager *SourceMgr = nullptr ) {
135135 // Do nothing if the provided range is invalid.
136- if (Range.getBegin (). isInvalid () || Range. getEnd (). isInvalid ())
136+ if (Range.isInvalid ())
137137 return ;
138138
139139 // If we have a source manager, use it to convert to the spelling location for
@@ -290,11 +290,9 @@ void RenamerClangTidyCheck::check(const MatchFinder::MatchResult &Result) {
290290 Value->getReturnType ().getTypePtr ()->getAs <TypedefType>())
291291 addUsage (NamingCheckFailures, Typedef->getDecl (),
292292 Value->getSourceRange ());
293- for (unsigned i = 0 ; i < Value->getNumParams (); ++i) {
294- if (const TypedefType *Typedef = Value->parameters ()[i]
295- ->getType ()
296- .getTypePtr ()
297- ->getAs <TypedefType>())
293+ for (const ParmVarDecl *Param : Value->parameters ()) {
294+ if (const TypedefType *Typedef =
295+ Param->getType ().getTypePtr ()->getAs <TypedefType>())
298296 addUsage (NamingCheckFailures, Typedef->getDecl (),
299297 Value->getSourceRange ());
300298 }
You can’t perform that action at this time.
0 commit comments