There is no reason to have this here, (since all tests pass) and it isn't even a specifier anyway. We can just treat it as a pointer instead.
Details
Diff Detail
Event Timeline
I'm a bit hesitant to trust lack of tests as proof that old FIXMEs can be resolved safely. Can you add some background information about why this was originally a specifier, and why it's safe to fix it now? (If you don't know, I suggest looking through git-blame to figure it out (unless @ahatanak already knows?).)
clang/lib/AST/DeclPrinter.cpp | ||
---|---|---|
161–163 | Seems unrelated to this commit? | |
clang/lib/AST/TypePrinter.cpp | ||
313 ↗ | (On Diff #373955) | Seems unrelated to this commit? |
clang/lib/AST/DeclPrinter.cpp | ||
---|---|---|
161–163 | Did it to quiet clang-tidy because I modified this function |
This was introduced in 2010, with multiple changes following. The ObjCObjectPointer type was at a time before ObjCObject was defined.
I'm not sure why ObjCObjectPointerType was originally a specifier, but this patch looks safe to me. ObjCObjectPointerType is never passed to TypePrinter::printBefore and QualType GetBaseType, which are the two functions that use isSpecifierType, AFAICT.
John, do you remember why it was necessary to make ObjCObjectPointerType a specifier type?
ObjCObjectPointerType used to have a much weirder representation for the builtin object types like id and Class, and it's possible that this was an artifact of that. Otherwise I'm not sure, sorry.
id is a typedef and @class is an ObjCInterface now, so it looks like it's safe to remove ObjCObjectPointer case then.
Seems unrelated to this commit?