Files
carbon-lang/toolchain/check/handle_expr_statement.cpp
T
Richard Smith 69b9982e95 Convert discarded calls in thunks. (#5452)
No functionality change right now: we reject thunks where the signature
has no return type and the callee has a return type. But discarding the
expression is still the right thing to do.
2025-05-09 16:35:28 +00:00

19 lines
559 B
C++

// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#include "toolchain/check/context.h"
#include "toolchain/check/convert.h"
#include "toolchain/check/handle.h"
#include "toolchain/sem_ir/inst.h"
namespace Carbon::Check {
auto HandleParseNode(Context& context, Parse::ExprStatementId /*node_id*/)
-> bool {
DiscardExpr(context, context.node_stack().PopExpr());
return true;
}
} // namespace Carbon::Check