Previous changes for the BTF attributes introduced a new sub-tree
visitation. That uncovered that when accessing the typespec location we
would assert that the type specification is either a type declaration or
typename. However, typename was explicitly permitted. This change
predates the introduction of newer deduced type representations such as
__underlying_type from C++ and the addition of the GNU __typeof__
expression.
Thanks to aaron.ballman for the valuable discussion and pointer to
isTypeRep.
I think you've got a test case covering isExprRep() because your __typeof__ names an expression, but can you also add coverage for isTypeRep() where __typeof__ names a type instead, as in: https://godbolt.org/z/hfK8ds9EM