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
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
@@ -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)))
@@ -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)))
@@ -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)))
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
---
@@ -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)))
@@ -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;
@@ -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)))
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
@@ -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)))
@@ -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;
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
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
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
---
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
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:
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
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
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
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
---
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
22 matches
Mail list logo