I wonder if there's a more general place we should be handling this? And what about non-typedefs used in this context? The test case should use filecheck, not grep. The comment in emittypedef is a bit obscure. http://llvm-reviews.chandlerc.com/D2498