Skip to content

Conversation

@tbaederr
Copy link
Contributor

Access the Parent state one less time.

@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" clang:bytecode Issues for the clang bytecode constexpr interpreter labels Sep 16, 2025
@llvmbot
Copy link
Member

llvmbot commented Sep 16, 2025

@llvm/pr-subscribers-clang

Author: Timm Baeder (tbaederr)

Changes

Access the Parent state one less time.


Full diff: https://github.com/llvm/llvm-project/pull/158852.diff

1 Files Affected:

  • (modified) clang/lib/AST/ByteCode/InterpState.h (+1-1)
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 {

@tbaederr tbaederr merged commit 10be515 into llvm:main Sep 16, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:bytecode Issues for the clang bytecode constexpr interpreter clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants