forked from OSchip/llvm-project
[clang-tidy] Rewrite a for-range loop in the old style.
Haven't thought that I ever needed to do this, but in this case comparing the index using pointer arithmetic turns out to be really ugly. It also generates nasty sign-compare warnings on 32 bit targets. llvm-svn: 214705
This commit is contained in:
parent
1cd57ebb6b
commit
f5847cf84c
|
@ -86,10 +86,10 @@ ArgumentCommentCheck::isLikelyTypo(llvm::ArrayRef<ParmVarDecl *> Params,
|
|||
if (ThisED >= UpperBound)
|
||||
return false;
|
||||
|
||||
for (const auto &Param : Params) {
|
||||
if (&Param - Params.begin() == ArgIndex)
|
||||
for (unsigned I = 0, E = Params.size(); I != E; ++I) {
|
||||
if (I == ArgIndex)
|
||||
continue;
|
||||
IdentifierInfo *II = Param->getIdentifier();
|
||||
IdentifierInfo *II = Params[I]->getIdentifier();
|
||||
if (!II)
|
||||
continue;
|
||||
|
||||
|
|
Loading…
Reference in New Issue