Skip to content

Commit 86e8164

Browse files
[llvm] Qualify auto in range-based for loops (NFC)
Identified with readability-qualified-auto.
1 parent 32aa35b commit 86e8164

File tree

12 files changed

+71
-71
lines changed

12 files changed

+71
-71
lines changed

llvm/include/llvm/Analysis/LoopInfoImpl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ void LoopBase<BlockT, LoopT>::verifyLoop() const {
335335

336336
if (VisitedBBs.size() != getNumBlocks()) {
337337
dbgs() << "The following blocks are unreachable in the loop: ";
338-
for (auto BB : Blocks) {
338+
for (auto *BB : Blocks) {
339339
if (!VisitedBBs.count(BB)) {
340340
dbgs() << *BB << "\n";
341341
}

llvm/include/llvm/DebugInfo/CodeView/SymbolVisitorCallbackPipeline.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,31 @@ class SymbolVisitorCallbackPipeline : public SymbolVisitorCallbacks {
2222
SymbolVisitorCallbackPipeline() = default;
2323

2424
Error visitUnknownSymbol(CVSymbol &Record) override {
25-
for (auto Visitor : Pipeline) {
25+
for (auto *Visitor : Pipeline) {
2626
if (auto EC = Visitor->visitUnknownSymbol(Record))
2727
return EC;
2828
}
2929
return Error::success();
3030
}
3131

3232
Error visitSymbolBegin(CVSymbol &Record, uint32_t Offset) override {
33-
for (auto Visitor : Pipeline) {
33+
for (auto *Visitor : Pipeline) {
3434
if (auto EC = Visitor->visitSymbolBegin(Record, Offset))
3535
return EC;
3636
}
3737
return Error::success();
3838
}
3939

4040
Error visitSymbolBegin(CVSymbol &Record) override {
41-
for (auto Visitor : Pipeline) {
41+
for (auto *Visitor : Pipeline) {
4242
if (auto EC = Visitor->visitSymbolBegin(Record))
4343
return EC;
4444
}
4545
return Error::success();
4646
}
4747

4848
Error visitSymbolEnd(CVSymbol &Record) override {
49-
for (auto Visitor : Pipeline) {
49+
for (auto *Visitor : Pipeline) {
5050
if (auto EC = Visitor->visitSymbolEnd(Record))
5151
return EC;
5252
}

llvm/include/llvm/DebugInfo/CodeView/TypeVisitorCallbackPipeline.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,55 +23,55 @@ class TypeVisitorCallbackPipeline : public TypeVisitorCallbacks {
2323
TypeVisitorCallbackPipeline() = default;
2424

2525
Error visitUnknownType(CVRecord<TypeLeafKind> &Record) override {
26-
for (auto Visitor : Pipeline) {
26+
for (auto *Visitor : Pipeline) {
2727
if (auto EC = Visitor->visitUnknownType(Record))
2828
return EC;
2929
}
3030
return Error::success();
3131
}
3232

3333
Error visitUnknownMember(CVMemberRecord &Record) override {
34-
for (auto Visitor : Pipeline) {
34+
for (auto *Visitor : Pipeline) {
3535
if (auto EC = Visitor->visitUnknownMember(Record))
3636
return EC;
3737
}
3838
return Error::success();
3939
}
4040

4141
Error visitTypeBegin(CVType &Record) override {
42-
for (auto Visitor : Pipeline) {
42+
for (auto *Visitor : Pipeline) {
4343
if (auto EC = Visitor->visitTypeBegin(Record))
4444
return EC;
4545
}
4646
return Error::success();
4747
}
4848

4949
Error visitTypeBegin(CVType &Record, TypeIndex Index) override {
50-
for (auto Visitor : Pipeline) {
50+
for (auto *Visitor : Pipeline) {
5151
if (auto EC = Visitor->visitTypeBegin(Record, Index))
5252
return EC;
5353
}
5454
return Error::success();
5555
}
5656

5757
Error visitTypeEnd(CVType &Record) override {
58-
for (auto Visitor : Pipeline) {
58+
for (auto *Visitor : Pipeline) {
5959
if (auto EC = Visitor->visitTypeEnd(Record))
6060
return EC;
6161
}
6262
return Error::success();
6363
}
6464

6565
Error visitMemberBegin(CVMemberRecord &Record) override {
66-
for (auto Visitor : Pipeline) {
66+
for (auto *Visitor : Pipeline) {
6767
if (auto EC = Visitor->visitMemberBegin(Record))
6868
return EC;
6969
}
7070
return Error::success();
7171
}
7272

7373
Error visitMemberEnd(CVMemberRecord &Record) override {
74-
for (auto Visitor : Pipeline) {
74+
for (auto *Visitor : Pipeline) {
7575
if (auto EC = Visitor->visitMemberEnd(Record))
7676
return EC;
7777
}
@@ -97,7 +97,7 @@ class TypeVisitorCallbackPipeline : public TypeVisitorCallbacks {
9797

9898
private:
9999
template <typename T> Error visitKnownRecordImpl(CVType &CVR, T &Record) {
100-
for (auto Visitor : Pipeline) {
100+
for (auto *Visitor : Pipeline) {
101101
if (auto EC = Visitor->visitKnownRecord(CVR, Record))
102102
return EC;
103103
}
@@ -106,7 +106,7 @@ class TypeVisitorCallbackPipeline : public TypeVisitorCallbacks {
106106

107107
template <typename T>
108108
Error visitKnownMemberImpl(CVMemberRecord &CVMR, T &Record) {
109-
for (auto Visitor : Pipeline) {
109+
for (auto *Visitor : Pipeline) {
110110
if (auto EC = Visitor->visitKnownMember(CVMR, Record))
111111
return EC;
112112
}

llvm/include/llvm/Support/GenericDomTree.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ class DominatorTreeBase {
843843
assert(!PredBlocks.empty() && "No predblocks?");
844844

845845
bool NewBBDominatesNewBBSucc = true;
846-
for (auto Pred : children<Inverse<N>>(NewBBSucc)) {
846+
for (auto *Pred : children<Inverse<N>>(NewBBSucc)) {
847847
if (Pred != NewBB && !dominates(NewBBSucc, Pred) &&
848848
isReachableFromEntry(Pred)) {
849849
NewBBDominatesNewBBSucc = false;

llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3826,7 +3826,7 @@ static bool allUsesExtend(SDValue Compare, SelectionDAG *CurDAG) {
38263826
return true;
38273827
// We want the value in a GPR if it is being extended, used for a select, or
38283828
// used in logical operations.
3829-
for (auto CompareUse : Compare.getNode()->uses())
3829+
for (auto *CompareUse : Compare.getNode()->uses())
38303830
if (CompareUse->getOpcode() != ISD::SIGN_EXTEND &&
38313831
CompareUse->getOpcode() != ISD::ZERO_EXTEND &&
38323832
CompareUse->getOpcode() != ISD::SELECT &&

llvm/tools/bugpoint/CrashDebugger.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1338,7 +1338,7 @@ static Error DebugACrash(BugDriver &BD, BugTester TestFn) {
13381338
// contribute to the crash, bisect the operands of the remaining ones
13391339
std::vector<const MDNode *> NamedMDOps;
13401340
for (auto &NamedMD : BD.getProgram().named_metadata())
1341-
for (auto op : NamedMD.operands())
1341+
for (auto *op : NamedMD.operands())
13421342
NamedMDOps.push_back(op);
13431343
Expected<bool> Result =
13441344
ReduceCrashingNamedMDOps(BD, TestFn).reduceList(NamedMDOps);

llvm/tools/llvm-lipo/llvm-lipo.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,12 @@ static Config parseLipoOptions(ArrayRef<const char *> ArgsArr) {
176176
exit(EXIT_SUCCESS);
177177
}
178178

179-
for (auto Arg : InputArgs.filtered(LIPO_UNKNOWN))
179+
for (auto *Arg : InputArgs.filtered(LIPO_UNKNOWN))
180180
reportError("unknown argument '" + Arg->getAsString(InputArgs) + "'");
181181

182-
for (auto Arg : InputArgs.filtered(LIPO_INPUT))
182+
for (auto *Arg : InputArgs.filtered(LIPO_INPUT))
183183
C.InputFiles.push_back({None, Arg->getValue()});
184-
for (auto Arg : InputArgs.filtered(LIPO_arch)) {
184+
for (auto *Arg : InputArgs.filtered(LIPO_arch)) {
185185
validateArchitectureName(Arg->getValue(0));
186186
assert(Arg->getValue(1) && "file_name is missing");
187187
C.InputFiles.push_back({StringRef(Arg->getValue(0)), Arg->getValue(1)});
@@ -193,7 +193,7 @@ static Config parseLipoOptions(ArrayRef<const char *> ArgsArr) {
193193
if (InputArgs.hasArg(LIPO_output))
194194
C.OutputFile = std::string(InputArgs.getLastArgValue(LIPO_output));
195195

196-
for (auto Segalign : InputArgs.filtered(LIPO_segalign)) {
196+
for (auto *Segalign : InputArgs.filtered(LIPO_segalign)) {
197197
if (!Segalign->getValue(1))
198198
reportError("segalign is missing an argument: expects -segalign "
199199
"arch_type alignment_value");
@@ -237,7 +237,7 @@ static Config parseLipoOptions(ArrayRef<const char *> ArgsArr) {
237237
std::string Buf;
238238
raw_string_ostream OS(Buf);
239239
OS << "only one of the following actions can be specified:";
240-
for (auto Arg : ActionArgs)
240+
for (auto *Arg : ActionArgs)
241241
OS << " " << Arg->getSpelling();
242242
reportError(OS.str());
243243
}
@@ -291,7 +291,7 @@ static Config parseLipoOptions(ArrayRef<const char *> ArgsArr) {
291291
return C;
292292

293293
case LIPO_replace:
294-
for (auto Action : ActionArgs) {
294+
for (auto *Action : ActionArgs) {
295295
assert(Action->getValue(1) && "file_name is missing");
296296
validateArchitectureName(Action->getValue(0));
297297
C.ReplacementFiles.push_back(

0 commit comments

Comments
 (0)