[clang] 133b2fc - [clang][Interp][NFC] Use template types instead of auto

Timm Bäder via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 11 02:25:17 PDT 2023


Author: Timm Bäder
Date: 2023-07-11T11:25:00+02:00
New Revision: 133b2fc9cc27d03f3f5f922ec7f058c3b617a1ea

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

LOG: [clang][Interp][NFC] Use template types instead of auto

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/Interp/InterpStack.h b/clang/lib/AST/Interp/InterpStack.h
index fa2f9d5b242de9..e61d8e6dc7daf6 100644
--- a/clang/lib/AST/Interp/InterpStack.h
+++ b/clang/lib/AST/Interp/InterpStack.h
@@ -44,8 +44,8 @@ class InterpStack final {
     assert(ItemTypes.back() == toPrimType<T>());
     ItemTypes.pop_back();
 #endif
-    auto *Ptr = &peekInternal<T>();
-    auto Value = std::move(*Ptr);
+    T *Ptr = &peekInternal<T>();
+    T Value = std::move(*Ptr);
     Ptr->~T();
     shrink(aligned_size<T>());
     return Value;
@@ -57,7 +57,7 @@ class InterpStack final {
     assert(ItemTypes.back() == toPrimType<T>());
     ItemTypes.pop_back();
 #endif
-    auto *Ptr = &peekInternal<T>();
+    T *Ptr = &peekInternal<T>();
     Ptr->~T();
     shrink(aligned_size<T>());
   }


        


More information about the cfe-commits mailing list