[clang] [clang][ASTVisitor] Visit `HoldingVar` from `BindingDecl`. (PR #117858)

2024-12-12 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle closed https://github.com/llvm/llvm-project/pull/117858 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTVisitor] Visit `HoldingVar` from `BindingDecl`. (PR #117858)

2024-12-12 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle updated https://github.com/llvm/llvm-project/pull/117858 >From f388f19e26bdd7e45e874e4574e7d9196c2eaf0b Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Mon, 25 Nov 2024 15:52:18 + Subject: [PATCH 1/4] [clang][ASTVisitor] Visit `HoldingVar` from `Binding

[clang] [clang][ASTVisitor] Visit `HoldingVar` from `BindingDecl`. (PR #117858)

2024-12-12 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle updated https://github.com/llvm/llvm-project/pull/117858 >From f388f19e26bdd7e45e874e4574e7d9196c2eaf0b Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Mon, 25 Nov 2024 15:52:18 + Subject: [PATCH 1/3] [clang][ASTVisitor] Visit `HoldingVar` from `Binding

[clang] [clang][ASTVisitor] Visit `HoldingVar` from `BindingDecl`. (PR #117858)

2024-12-12 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 67eb05b2928ea707761bb040e6eb824f4ca9ef3a bc26437343450a00c24aff45650bb67c7fc98ea5 --e

[clang] [clang][ASTVisitor] Visit `HoldingVar` from `BindingDecl`. (PR #117858)

2024-12-12 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle updated https://github.com/llvm/llvm-project/pull/117858 >From f388f19e26bdd7e45e874e4574e7d9196c2eaf0b Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Mon, 25 Nov 2024 15:52:18 + Subject: [PATCH 1/2] [clang][ASTVisitor] Visit `HoldingVar` from `Binding

[clang] [clang][ASTVisitor] Visit `HoldingVar` from `BindingDecl`. (PR #117858)

2024-12-12 Thread Clement Courbet via cfe-commits
@@ -143,6 +143,15 @@ const Formula &getFormula(const ValueDecl &D, const Environment &Env) { return cast(Env.getValue(D))->formula(); } +const BindingDecl *findBindingDecl(const char *Name, ASTContext &ASTCtx) { legrosbuffle wrote: Not quite sure why I did

[clang] [clang][ASTVisitor] Visit `HoldingVar` from `BindingDecl`. (PR #117858)

2024-12-12 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle updated https://github.com/llvm/llvm-project/pull/117858 >From f388f19e26bdd7e45e874e4574e7d9196c2eaf0b Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Mon, 25 Nov 2024 15:52:18 + Subject: [PATCH 1/2] [clang][ASTVisitor] Visit `HoldingVar` from `Binding

[clang] [clang][ASTVisitor] Visit `HoldingVar` from `BindingDecl`. (PR #117858)

2024-12-12 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle updated https://github.com/llvm/llvm-project/pull/117858 >From f388f19e26bdd7e45e874e4574e7d9196c2eaf0b Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Mon, 25 Nov 2024 15:52:18 + Subject: [PATCH] [clang][ASTVisitor] Visit `HoldingVar` from `BindingDecl`

[clang] [clang][ASTVisitor] Visit `HoldingVar` from `BindingDecl`. (PR #117858)

2024-12-10 Thread Yitzhak Mandelbaum via cfe-commits
@@ -143,6 +143,15 @@ const Formula &getFormula(const ValueDecl &D, const Environment &Env) { return cast(Env.getValue(D))->formula(); } +const BindingDecl *findBindingDecl(const char *Name, ASTContext &ASTCtx) { ymand wrote: nit: Please use StringRef. htt

[clang] [clang][ASTVisitor] Visit `HoldingVar` from `BindingDecl`. (PR #117858)

2024-12-10 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/117858 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTVisitor] Visit `HoldingVar` from `BindingDecl`. (PR #117858)

2024-12-10 Thread Yitzhak Mandelbaum via cfe-commits
@@ -143,6 +143,15 @@ const Formula &getFormula(const ValueDecl &D, const Environment &Env) { return cast(Env.getValue(D))->formula(); } +const BindingDecl *findBindingDecl(const char *Name, ASTContext &ASTCtx) { ymand wrote: why place this parameter second

[clang] [clang][ASTVisitor] Visit `HoldingVar` from `BindingDecl`. (PR #117858)

2024-11-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Clement Courbet (legrosbuffle) Changes Tuple-like types introduce `VarDecl`s in the AST for their "holding vars", but AST visitors do not visit those. As a result the `VarDecl` for the holding var is orphaned when trying to retreive its p

[clang] [clang][ASTVisitor] Visit `HoldingVar` from `BindingDecl`. (PR #117858)

2024-11-27 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle created https://github.com/llvm/llvm-project/pull/117858 Tuple-like types introduce `VarDecl`s in the AST for their "holding vars", but AST visitors do not visit those. As a result the `VarDecl` for the holding var is orphaned when trying to retreive its parents