[clang] dfb8a15 - [clang][Interp][NFC] Make a local variable const

Timm Bäder via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 2 10:17:49 PST 2024


Author: Timm Bäder
Date: 2024-03-02T18:56:35+01:00
New Revision: dfb8a1531c962238a63db199dff973deec47e4ff

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

LOG: [clang][Interp][NFC] Make a local variable const

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/Interp/InterpBuiltin.cpp b/clang/lib/AST/Interp/InterpBuiltin.cpp
index de3d72169432fd..6550a07650c887 100644
--- a/clang/lib/AST/Interp/InterpBuiltin.cpp
+++ b/clang/lib/AST/Interp/InterpBuiltin.cpp
@@ -1237,7 +1237,7 @@ bool InterpretOffsetOf(InterpState &S, CodePtr OpPC, const OffsetOfExpr *E,
       const RecordType *RT = CurrentType->getAs<RecordType>();
       if (!RT)
         return false;
-      RecordDecl *RD = RT->getDecl();
+      const RecordDecl *RD = RT->getDecl();
       if (RD->isInvalidDecl())
         return false;
       const ASTRecordLayout &RL = S.getCtx().getASTRecordLayout(RD);


        


More information about the cfe-commits mailing list