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

Yitzhak Mandelbaum via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 16 05:19:31 PDT 2024


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 statements. It's unfortunate that the enum syntax is so bulky (the need for `Stmt::` and the `Class` suffix). The casts don't bother me (well, any more than C++'s general lack of built-in datatype and pattern matching support bother me :)).

https://github.com/llvm/llvm-project/pull/88865


More information about the cfe-commits mailing list