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

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 16 07:37:00 PDT 2024


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 add @Xazax-hun for an additional opinion.

I also don't have a strong opinion; I am fine with both styles. That being said, if C++ gets proper pattern matching in the future, the switch might be easier to refactor. 



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


More information about the cfe-commits mailing list