[clang] f756ddb - [clang][Interp][NFC] InterpFrame: localBlock() can be const

Timm Bäder via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 13 01:41:57 PDT 2022


Author: Timm Bäder
Date: 2022-09-13T10:41:18+02:00
New Revision: f756ddba17c9f0f0ee49b45dd4b15b487aff9b67

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

LOG: [clang][Interp][NFC] InterpFrame: localBlock() can be const

Added: 
    

Modified: 
    clang/lib/AST/Interp/InterpFrame.h

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/Interp/InterpFrame.h b/clang/lib/AST/Interp/InterpFrame.h
index 3769c9a5f5f1..ca9803d48dd1 100644
--- a/clang/lib/AST/Interp/InterpFrame.h
+++ b/clang/lib/AST/Interp/InterpFrame.h
@@ -123,7 +123,7 @@ class InterpFrame final : public Frame {
   }
 
   /// Returns a pointer to a local's block.
-  void *localBlock(unsigned Offset) {
+  void *localBlock(unsigned Offset) const {
     return Locals.get() + Offset - sizeof(Block);
   }
 


        


More information about the cfe-commits mailing list