[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-22 Thread via cfe-commits
martinboehme wrote: First of all, a followup: I should of course have noticed the failling CI tests, but a contributing factor was that I was locally running tests in `Release` mode, i.e. with `assert()` compiled out. I've now looked at why tests fail, and it is because when using

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-18 Thread via cfe-commits
martinboehme wrote: Didn't notice that there were failing tests in CI. Reverting. https://github.com/llvm/llvm-project/pull/88865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-18 Thread via cfe-commits
https://github.com/martinboehme closed https://github.com/llvm/llvm-project/pull/88865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-17 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/88865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-17 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/88865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-17 Thread via cfe-commits
martinboehme wrote: Ready for review. https://github.com/llvm/llvm-project/pull/88865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-17 Thread via cfe-commits
https://github.com/martinboehme updated https://github.com/llvm/llvm-project/pull/88865 >From 69f444532a9dd1da4c8018684fbf24edacfc91fd Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Tue, 16 Apr 2024 09:52:35 + Subject: [PATCH] [clang][dataflow] Refactor `PropagateResultObject()` with

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-17 Thread via cfe-commits
martinboehme wrote: > > It's unfortunate that the enum syntax is so bulky (the need for `Stmt::` > > and the `Class` suffix). > > Once we can use C++20, it could get a bit better thanks to > https://en.cppreference.com/w/cpp/language/enum#Using-enum-declaration. Good point, thanks. > > I'm

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-16 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: > It's unfortunate that the enum syntax is so bulky (the need for `Stmt::` and > the `Class` suffix). Once we can use C++20, it could get a bit better thanks to https://en.cppreference.com/w/cpp/language/enum#Using-enum-declaration. > I'm making this a non-draft PR and will

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-16 Thread via cfe-commits
martinboehme wrote: > Clearly, this is a matter of taste, so I would defer to your opinion, since > you are the primary maintainer of this code. But, personally, I prefer this > style since it makes clear that the body of the function is a single case > analysis, which is not obvious from the

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-analysis Author: None (martinboehme) Changes See also discussion in #88726. --- Full diff: https://github.com/llvm/llvm-project/pull/88865.diff 1 Files Affected: - (modified)

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-16 Thread via cfe-commits
https://github.com/martinboehme ready_for_review https://github.com/llvm/llvm-project/pull/88865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-16 Thread Yitzhak Mandelbaum via cfe-commits
ymand wrote: Clearly, this is a matter of taste, so I would defer to your opinion, since you are the primary maintainer of this code. But, personally, I prefer this style since it makes clear that the body of the function is a single case analysis, which is not obvious from the series of if

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-16 Thread via cfe-commits
https://github.com/martinboehme updated https://github.com/llvm/llvm-project/pull/88865 >From 440ace1337ed7a06286a4455e3e6e428d14d847d Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Tue, 16 Apr 2024 09:52:35 + Subject: [PATCH] [clang][dataflow] Refactor `PropagateResultObject()` with

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-16 Thread via cfe-commits
martinboehme wrote: Here's a draft that shows what `PropagateResultObject()` looks like when refactored using a switch statement. I'm not sure if this is an improvement or not. I do see how this makes the case distinction clearer -- OTOH, we have one more level of indentation now (though

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-16 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 3c6f91e5b671321c95259dabecdbdfe4a6d69ce1 3da6980d1957c19bdb821c6059c032b1e1c55863 --

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-16 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/88865 See also discussion in #88726. >From 3da6980d1957c19bdb821c6059c032b1e1c55863 Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Tue, 16 Apr 2024 09:52:35 + Subject: [PATCH] [clang][dataflow]