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

Timm Bäder via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 24 00:57:04 PDT 2023


Author: Timm Bäder
Date: 2023-09-24T09:56:49+02:00
New Revision: c97c28dfb3608a78cb70e99ecdc798f65941d46e

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

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/Interp/Function.cpp b/clang/lib/AST/Interp/Function.cpp
index e409002171c4b73..0b7cfc4e28883f0 100644
--- a/clang/lib/AST/Interp/Function.cpp
+++ b/clang/lib/AST/Interp/Function.cpp
@@ -44,7 +44,7 @@ SourceInfo Function::getSource(CodePtr PC) const {
 }
 
 bool Function::isVirtual() const {
-  if (auto *M = dyn_cast<CXXMethodDecl>(F))
+  if (const auto *M = dyn_cast<CXXMethodDecl>(F))
     return M->isVirtual();
   return false;
 }


        


More information about the cfe-commits mailing list