[clang] [clang][bytecode][NFC] InterpState: get ASTContext from interp::Context (PR #158852)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 16 02:05:51 PDT 2025
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/158852
Access the Parent state one less time.
>From d5b1847f7019443ebd40543311391b149de45ab7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder at redhat.com>
Date: Tue, 16 Sep 2025 11:03:55 +0200
Subject: [PATCH] [clang][bytecode][NFC] InterpState: get ASTContext from
interp::Context
Access the Parent state one less time.
---
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 e095908bce986..6e0f6aa3f8e1c 100644
--- a/clang/lib/AST/ByteCode/InterpState.h
+++ b/clang/lib/AST/ByteCode/InterpState.h
@@ -67,7 +67,7 @@ class InterpState final : public State, public SourceMapper {
Expr::EvalStatus &getEvalStatus() const override {
return Parent.getEvalStatus();
}
- ASTContext &getASTContext() const override { return Parent.getASTContext(); }
+ ASTContext &getASTContext() const override { return Ctx.getASTContext(); }
// Forward status checks and updates to the walker.
bool keepEvaluatingAfterFailure() const override {
More information about the cfe-commits
mailing list