[clang] [ByteCode] Remove a redundant call to std::unique_ptr<T>::get (NFC) (PR #163512)

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 14 23:38:27 PDT 2025


https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/163512

None

>From 57c5789859c278d78e18ba38d2a9425f74c270aa Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sun, 12 Oct 2025 17:17:10 -0700
Subject: [PATCH] [ByteCode] Remove a redundant call to std::unique_ptr<T>::get
 (NFC)

---
 clang/lib/AST/ByteCode/InterpState.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/lib/AST/ByteCode/InterpState.h b/clang/lib/AST/ByteCode/InterpState.h
index a13244bf383ae..e2e4d5c985f93 100644
--- a/clang/lib/AST/ByteCode/InterpState.h
+++ b/clang/lib/AST/ByteCode/InterpState.h
@@ -114,7 +114,7 @@ class InterpState final : public State, public SourceMapper {
       Alloc = std::make_unique<DynamicAllocator>();
     }
 
-    return *Alloc.get();
+    return *Alloc;
   }
 
   /// Diagnose any dynamic allocations that haven't been freed yet.



More information about the cfe-commits mailing list