[PATCH] D73836: [ADT] 'PointerUnion::is' returns 'bool'

Brian Gesiak via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 1 13:56:01 PST 2020


modocache added a comment.

No, my only motivation was reading the interface and doing a double-take. I thought maybe the `int` return type was meant to not only signify whether the pointer was to the given type, but also the index at which that type existed in the union. I had to read the body of the function to learn that this wasn't the case. A `bool` return type, at least in my case, would have prevented that initial confusion.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73836





More information about the llvm-commits mailing list