Use getAsCXXRecordDecl to shorten some gets and casts