Author: Timm Bäder Date: 2024-07-02T13:17:06+02:00 New Revision: c5f7f380314c7d290e039e9c35562e1cedc01268
URL: https://github.com/llvm/llvm-project/commit/c5f7f380314c7d290e039e9c35562e1cedc01268 DIFF: https://github.com/llvm/llvm-project/commit/c5f7f380314c7d290e039e9c35562e1cedc01268.diff LOG: [clang][Interp][NFC] Make some local pointers const Added: Modified: clang/lib/AST/Interp/Compiler.cpp Removed: ################################################################################ diff --git a/clang/lib/AST/Interp/Compiler.cpp b/clang/lib/AST/Interp/Compiler.cpp index 739a65070b21d..9ca71e0496989 100644 --- a/clang/lib/AST/Interp/Compiler.cpp +++ b/clang/lib/AST/Interp/Compiler.cpp @@ -4033,7 +4033,7 @@ template <class Emitter> bool Compiler<Emitter>::visitLoopBody(const Stmt *S) { return true; if (const auto *CS = dyn_cast<CompoundStmt>(S)) { - for (auto *InnerStmt : CS->body()) + for (const auto *InnerStmt : CS->body()) if (!visitStmt(InnerStmt)) return false; return true; @@ -4045,7 +4045,7 @@ template <class Emitter> bool Compiler<Emitter>::visitLoopBody(const Stmt *S) { template <class Emitter> bool Compiler<Emitter>::visitCompoundStmt(const CompoundStmt *S) { BlockScope<Emitter> Scope(this); - for (auto *InnerStmt : S->body()) + for (const auto *InnerStmt : S->body()) if (!visitStmt(InnerStmt)) return false; return true; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits