It turns out llvm::isa<> is variadic, and we could have used this at a
lot of places.
The following patterns:
x && isa<T1>(x) || isa<T2>(x) ...
Will be replaced by:
isa_and_non_null<T1, T2, ...>(x)
Sometimes it caused further simplifications when it would cause even
more code smell.
Aside from this, keep in mind that within assert() or any macro
functions, we need to wrap the isa<> expression within a parenthesis,
due to the parsing of the comma.
Note: This is an NFC change!
Please, review accordingly. I hope I did not mess up anything.
Hrm, I didn't know about isa_and_nonnull either...