[clang] 2347a47 - [clang][Interp][NFC] Make a local variable const

Timm Bäder via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 14 08:34:29 PST 2024


Author: Timm Bäder
Date: 2024-02-14T17:34:07+01:00
New Revision: 2347a47622718259c95993c1cab604ad82854b6c

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

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/Interp/Source.cpp b/clang/lib/AST/Interp/Source.cpp
index 4e032c92d26df1..45cd0ad4fd4273 100644
--- a/clang/lib/AST/Interp/Source.cpp
+++ b/clang/lib/AST/Interp/Source.cpp
@@ -33,7 +33,7 @@ SourceRange SourceInfo::getRange() const {
 }
 
 const Expr *SourceInfo::asExpr() const {
-  if (auto *S = Source.dyn_cast<const Stmt *>())
+  if (const auto *S = Source.dyn_cast<const Stmt *>())
     return dyn_cast<Expr>(S);
   return nullptr;
 }


        


More information about the cfe-commits mailing list