[PATCH] D85528: [analyzer] Fix cast evaluation on scoped enums in ExprEngine

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 1 21:03:57 PDT 2020


NoQ added a comment.

Aha, ok, thanks, I now understand what the problem is because I was able to run the test before the patch and see how the patch changes the behavior.

What do you think about flattening the enum type out entirely? I.e., instead of `(unsigned char) conj_$2{enum ScopedSugared}` have `conj_$2{unsigned char}` from the start. Possibly same for unscoped enums. I don't think we actually extract any value from knowing that a symbol is an enum value. We also don't track enum types for concrete values (i.e., `nonloc::ConcreteInt` doesn't know whether it belongs to an enum).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85528/new/

https://reviews.llvm.org/D85528



More information about the cfe-commits mailing list