[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2024-01-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/71315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2024-01-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM though we can clean some bits up in follow-ups https://github.com/llvm/llvm-project/pull/71315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2024-01-18 Thread Aaron Ballman via cfe-commits
@@ -54,36 +44,90 @@ bool Context::isPotentialConstantExpr(State , const FunctionDecl *FD) { bool Context::evaluateAsRValue(State , const Expr *E, APValue ) { assert(Stk.empty()); ByteCodeExprGen C(*this, *P, Parent, Stk, Result); - if (Check(Parent, C.interpretExpr(E)))

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2024-01-18 Thread Aaron Ballman via cfe-commits
@@ -54,36 +44,90 @@ bool Context::isPotentialConstantExpr(State , const FunctionDecl *FD) { bool Context::evaluateAsRValue(State , const Expr *E, APValue ) { assert(Stk.empty()); ByteCodeExprGen C(*this, *P, Parent, Stk, Result); - if (Check(Parent, C.interpretExpr(E)))

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2024-01-18 Thread Timm Baeder via cfe-commits
@@ -54,36 +44,90 @@ bool Context::isPotentialConstantExpr(State , const FunctionDecl *FD) { bool Context::evaluateAsRValue(State , const Expr *E, APValue ) { assert(Stk.empty()); ByteCodeExprGen C(*this, *P, Parent, Stk, Result); - if (Check(Parent, C.interpretExpr(E)))

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2024-01-18 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/71315 >From b549c6aaa47b4b6b90e03cb2b4a59f323e95888d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 31 Oct 2023 14:57:51 +0100 Subject: [PATCH] EvaluationResult ---

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2024-01-18 Thread Timm Baeder via cfe-commits
@@ -54,36 +44,90 @@ bool Context::isPotentialConstantExpr(State , const FunctionDecl *FD) { bool Context::evaluateAsRValue(State , const Expr *E, APValue ) { assert(Stk.empty()); ByteCodeExprGen C(*this, *P, Parent, Stk, Result); - if (Check(Parent, C.interpretExpr(E)))

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2024-01-16 Thread Timm Baeder via cfe-commits
@@ -183,11 +178,7 @@ int32_t ByteCodeEmitter::getOffset(LabelTy Label) { return 0ull; } -bool ByteCodeEmitter::bail(const SourceLocation ) { - if (!BailLocation) -BailLocation = Loc; - return false; -} +bool ByteCodeEmitter::bail(const SourceLocation ) { return false;

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2024-01-15 Thread Aaron Ballman via cfe-commits
@@ -54,36 +44,90 @@ bool Context::isPotentialConstantExpr(State , const FunctionDecl *FD) { bool Context::evaluateAsRValue(State , const Expr *E, APValue ) { assert(Stk.empty()); ByteCodeExprGen C(*this, *P, Parent, Stk, Result); - if (Check(Parent, C.interpretExpr(E)))

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2024-01-15 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Looks mostly reasonable to me. https://github.com/llvm/llvm-project/pull/71315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2024-01-15 Thread Aaron Ballman via cfe-commits
@@ -54,36 +44,90 @@ bool Context::isPotentialConstantExpr(State , const FunctionDecl *FD) { bool Context::evaluateAsRValue(State , const Expr *E, APValue ) { assert(Stk.empty()); ByteCodeExprGen C(*this, *P, Parent, Stk, Result); - if (Check(Parent, C.interpretExpr(E)))

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2024-01-15 Thread Aaron Ballman via cfe-commits
@@ -183,11 +178,7 @@ int32_t ByteCodeEmitter::getOffset(LabelTy Label) { return 0ull; } -bool ByteCodeEmitter::bail(const SourceLocation ) { - if (!BailLocation) -BailLocation = Loc; - return false; -} +bool ByteCodeEmitter::bail(const SourceLocation ) { return false;

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2024-01-15 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/71315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2024-01-15 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/71315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2024-01-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/71315 >From c4c9473b8be62028f204e85066ad7b0cf7dda29b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 31 Oct 2023 14:57:51 +0100 Subject: [PATCH] EvaluationResult ---

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2023-12-08 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/71315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2023-11-27 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/71315 >From 047249032d70e486380e8790915a8edeb70add56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 27 Nov 2023 12:10:48 +0100 Subject:

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2023-11-19 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/71315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2023-11-13 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/71315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2023-11-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Add an `EvaluationResult` class. This contains the result either as a `Pointer` or as a `APValue`. This way, we can inspect the result of the evaluation and diagnose problems with it (e.g. uninitialized

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2023-11-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/71315 >From b102c7d258e5538ad9f4a851191656243b913523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 31 Oct 2023 14:57:51 +0100 Subject: [PATCH] EvaluationResult ---

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2023-11-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/71315 Add an `EvaluationResult` class. This contains the result either as a `Pointer` or as a `APValue`. This way, we can inspect the result of the evaluation and diagnose problems with it (e.g. uninitialized