mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-19 14:36:39 +00:00
Stop allocating Actions on the Arena (#934)
This enables us to manage local variables in Carbon using C++ RAII. Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>
This commit is contained in:
1 parent
cabba3e93e
commit
a4aff26821
9 files changed
+354
-255
No files matched your search
@@ -51,7 +51,7 @@ struct Stack {
|
||||
// Returns the top element of the stack.
|
||||
//
|
||||
// - Requires: !this->IsEmpty()
|
||||
auto Top() const -> T {
|
||||
auto Top() const -> const T& {
|
||||
CHECK(!IsEmpty()) << "Empty stack has no Top().";
|
||||
return elements_.back();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user