[clang] 5191214 - [clang][Interp][NFC] Make some Frame pointers const

Timm Bäder via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 9 06:49:56 PDT 2023


Author: Timm Bäder
Date: 2023-07-09T15:49:33+02:00
New Revision: 51912142381d190dfa56ef13df1a2f7384391c9d

URL: https://github.com/llvm/llvm-project/commit/51912142381d190dfa56ef13df1a2f7384391c9d
DIFF: https://github.com/llvm/llvm-project/commit/51912142381d190dfa56ef13df1a2f7384391c9d.diff

LOG: [clang][Interp][NFC] Make some Frame pointers const

Added: 
    

Modified: 
    clang/lib/AST/Interp/State.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/Interp/State.cpp b/clang/lib/AST/Interp/State.cpp
index f67bde1082fa03..9a327fb810de0e 100644
--- a/clang/lib/AST/Interp/State.cpp
+++ b/clang/lib/AST/Interp/State.cpp
@@ -126,9 +126,9 @@ void State::addCallStack(unsigned Limit) {
 
   // Walk the call stack and add the diagnostics.
   unsigned CallIdx = 0;
-  Frame *Top = getCurrentFrame();
+  const Frame *Top = getCurrentFrame();
   const Frame *Bottom = getBottomFrame();
-  for (Frame *F = Top; F != Bottom; F = F->getCaller(), ++CallIdx) {
+  for (const Frame *F = Top; F != Bottom; F = F->getCaller(), ++CallIdx) {
     SourceLocation CallLocation = F->getCallLocation();
 
     // Skip this call?


        


More information about the cfe-commits mailing list