donat.nagy added a comment.

By the way, I'm fed up with the hack that ElementRegion is used for three 
separate things ("real" array indexing, casts and pointer arithmetic) and I'm 
thinking about introducing a subclass hierarchy where a base class 
`ElementLikeRegion` has three subclasses called `ElementRegion` (represents one 
element), `CastRegion` (represents the same memory area, but with a different 
type)  and `OffsetRegion` (represents the same memory area, but through 
different starting point). Most old references to ElementRegion could be 
replaced by references to ElementLikeRegion, but functions like `stripCasts()` 
would be able to distinguish between the subclasses and do the intuitive thing.

What do you think about this idea? Do you see any problem with it?

(By the way I'm not satisfied with these quickly picked class names -- feel 
free to suggest better ones!)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150446

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to