https://github.com/tbaederr closed
https://github.com/llvm/llvm-project/pull/106552
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
tbaederr wrote:
Fixed differently by https://github.com/llvm/llvm-project/pull/122871
https://github.com/llvm/llvm-project/pull/106552
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
AaronBallman wrote:
> In this code:
>
> ```c++
> namespace ExplicitThisInTemporary {
> struct B { B *p = this; };
> constexpr bool g(B b) { return &b == b.p; }
> static_assert(g({}), "");
> }
> ```
>
> The AST for the `static_assert` expr is:
>
> ```
> CallExpr 0x5219ed98 '_Bool'
> |-
tbaederr wrote:
In this code:
```c++
namespace ExplicitThisInTemporary {
struct B { B *p = this; };
constexpr bool g(B b) { return &b == b.p; }
static_assert(g({}), "");
}
```
The AST for the `static_assert` expr is:
```
CallExpr 0x5219ed98 '_Bool'
|-ImplicitCastExpr 0x5219ed78 '_Bo
AaronBallman wrote:
> all CXXThisExpr found within that CXXDefaultInitExpr point to the
> InitListExpr and not to the actual instance pointer of the current stack
> frame.
What do you mean "point to"? (They would point to the `this` object for the
class in which the default init expr is foun
tbaederr wrote:
@AaronBallman Can you confirm whether the following behavior is correct?
When a `CXXDefaultInitExpr` is the child node of an `InitListExpr`, all
`CXXThisExpr` found within that `CXXDefaultInitExpr` point to the
`InitListExpr` and not to the actual instance pointer of the curren
https://github.com/shafik commented:
Can you add more details to the summary explaining why the fix is necessary.
https://github.com/llvm/llvm-project/pull/106552
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/ma
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Timm Baeder (tbaederr)
Changes
---
Full diff: https://github.com/llvm/llvm-project/pull/106552.diff
2 Files Affected:
- (modified) clang/lib/AST/ByteCode/Compiler.cpp (+1-3)
- (modified) clang/test/AST/ByteCode/records.cpp (+6)
```
https://github.com/tbaederr created
https://github.com/llvm/llvm-project/pull/106552
None
>From 5d313ed583f9ca8209fbdc04ecb0fd8174e74239 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?=
Date: Thu, 29 Aug 2024 13:46:18 +0200
Subject: [PATCH] [clang][bytecode] Add InitLinkScope for t