This is an archive of the discontinued LLVM Phabricator instance.

[Clang][AST] Resolve FIXME: Remove ObjCObjectPointer from isSpecifierType
AbandonedPublic

Authored by gAlfonso-bit on Aug 9 2021, 11:36 AM.

Details

Reviewers
riccibruno
JDevlieghere
lhames
dgoldman
marksl
Group Reviewers
Restricted Project
Restricted Project
Summary

ObjCObjectPointer is NOT a type specifier, so remove it from the list

Diff Detail

Event Timeline

gAlfonso-bit requested review of this revision.Aug 9 2021, 11:36 AM
gAlfonso-bit created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptAug 9 2021, 11:36 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
gAlfonso-bit updated this revision to Diff 365501.EditedAug 10 2021, 9:07 AM

Rebased

Not sure about the timing of base patch, but maybe this patch is also candidate for llvm 13 (backport)?

gAlfonso-bit edited reviewers, added: RKSimon; removed: ldionne.Aug 12 2021, 8:15 AM

Add ObjectPointerType to GetBaseType

Rearranged if statements

RKSimon resigned from this revision.Aug 17 2021, 8:39 AM
gAlfonso-bit edited reviewers, added: erik.pilkington; removed: RKSimon.Aug 19 2021, 7:52 AM

Passed every test in check-all!

gAlfonso-bit added a reviewer: lhames.

Rebased

gAlfonso-bit edited reviewers, added: dgoldman; removed: erik.pilkington.Aug 23 2021, 7:37 AM
gAlfonso-bit edited reviewers, added: marksl; removed: rsmith.Aug 24 2021, 8:47 AM

Does this change the behavior of TypePrinter or DeclPrinter - not sure if there are existing tests for those with ObjC code?

Does this change the behavior of TypePrinter or DeclPrinter - not sure if there are existing tests for those with ObjC code?

I put a case for it in the declprinter so it is handled appropriately so it would get the pointee type, whereas before this was neglected.

Other than that, there should be no difference.

I put a case for it in the declprinter so it is handled appropriately so it would get the pointee type, whereas before this was neglected.

Other than that, there should be no difference.

It looks like DeclPrinter only uses that method here - so it shouldn't make a difference.

but TypePrinter does call isSpecifierType() so this changes that behavior, right? Can you add a test to TypePrinterTest for this change?

I put a case for it in the declprinter so it is handled appropriately so it would get the pointee type, whereas before this was neglected.

Other than that, there should be no difference.

It looks like DeclPrinter only uses that method here - so it shouldn't make a difference.

but TypePrinter does call isSpecifierType() so this changes that behavior, right? Can you add a test to TypePrinterTest for this change?

Like for the function itself or an integration test?

@dgoldman May I ask what tests?

Added test to TypePrinter

This comment was removed by gAlfonso-bit.
gAlfonso-bit abandoned this revision.Sep 20 2021, 6:09 AM