Skip to content

Commit 329d997

Browse files
tbaederrcpiaseque
authored andcommitted
[clang][Interp][NFC] Make some local pointers const
1 parent 105daff commit 329d997

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/AST/Interp/Compiler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4033,7 +4033,7 @@ template <class Emitter> bool Compiler<Emitter>::visitLoopBody(const Stmt *S) {
40334033
return true;
40344034

40354035
if (const auto *CS = dyn_cast<CompoundStmt>(S)) {
4036-
for (auto *InnerStmt : CS->body())
4036+
for (const auto *InnerStmt : CS->body())
40374037
if (!visitStmt(InnerStmt))
40384038
return false;
40394039
return true;
@@ -4045,7 +4045,7 @@ template <class Emitter> bool Compiler<Emitter>::visitLoopBody(const Stmt *S) {
40454045
template <class Emitter>
40464046
bool Compiler<Emitter>::visitCompoundStmt(const CompoundStmt *S) {
40474047
BlockScope<Emitter> Scope(this);
4048-
for (auto *InnerStmt : S->body())
4048+
for (const auto *InnerStmt : S->body())
40494049
if (!visitStmt(InnerStmt))
40504050
return false;
40514051
return true;

0 commit comments

Comments
 (0)