[PATCH] D119363: [clang] Add `ObjCProtocolLoc` to represent protocol references

2022-02-18 Thread David Goldman via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG805f7a4fa4ce: [clang] Add `ObjCProtocolLoc` to represent protocol references (authored by dgoldman). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D119363: [clang] Add `ObjCProtocolLoc` to represent protocol references

2022-02-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Great! This is worth mentioning in the clang release notes. (Along with any matchers that match these new nodes) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D119363: [clang] Add `ObjCProtocolLoc` to represent protocol references

2022-02-15 Thread David Goldman via Phabricator via cfe-commits
dgoldman added a comment. In D119363#3324024 , @sammccall wrote: > In D119363#3323867 , @dgoldman > wrote: > >> In D119363#3323778 , @sammccall >> wrote: >> >>> I'm a

[PATCH] D119363: [clang] Add `ObjCProtocolLoc` to represent protocol references

2022-02-15 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 409005. dgoldman marked 3 inline comments as done. dgoldman added a comment. Template fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119363/new/ https://reviews.llvm.org/D119363 Files:

[PATCH] D119363: [clang] Add `ObjCProtocolLoc` to represent protocol references

2022-02-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D119363#3323867 , @dgoldman wrote: > In D119363#3323778 , @sammccall > wrote: > >> I'm a bit concerned about the parent map vs ASTMatchFinder's view being out >> of sync: we'll

[PATCH] D119363: [clang] Add `ObjCProtocolLoc` to represent protocol references

2022-02-15 Thread David Goldman via Phabricator via cfe-commits
dgoldman added a comment. In D119363#3323778 , @sammccall wrote: > I'm a bit concerned about the parent map vs ASTMatchFinder's view being out > of sync: we'll have a ProtocolLoc node that has a parent but the parent > doesn't have the child. > > I'm

[PATCH] D119363: [clang] Add `ObjCProtocolLoc` to represent protocol references

2022-02-15 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 408970. dgoldman marked 4 inline comments as done. dgoldman added a comment. Template and variable casing fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119363/new/ https://reviews.llvm.org/D119363

[PATCH] D119363: [clang] Add `ObjCProtocolLoc` to represent protocol references

2022-02-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. I'm a bit concerned about the parent map vs ASTMatchFinder's view being out of sync: we'll have a ProtocolLoc node that has a parent but the parent doesn't have the child. I'm not sure this breaks anything immediately, but I think we should also make these nodes

[PATCH] D119363: [clang] Add `ObjCProtocolLoc` to represent protocol references

2022-02-15 Thread David Goldman via Phabricator via cfe-commits
dgoldman added a comment. PTAL, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119363/new/ https://reviews.llvm.org/D119363 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D119363: [clang] Add `ObjCProtocolLoc` to represent protocol references

2022-02-15 Thread David Goldman via Phabricator via cfe-commits
dgoldman added inline comments. Comment at: clang/include/clang/AST/TypeLoc.h:2621 + /// Evaluates true when this protocol loc is valid/non-empty. + explicit operator bool() const { return Protocol; } +}; sammccall wrote: > will we ever have invalid instances?

[PATCH] D119363: [clang] Add `ObjCProtocolLoc` to represent protocol references

2022-02-15 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 408928. dgoldman marked an inline comment as done. dgoldman added a comment. Add tests and public accessors Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119363/new/ https://reviews.llvm.org/D119363 Files:

[PATCH] D119363: [clang] Add `ObjCProtocolLoc` to represent protocol references

2022-02-15 Thread Egor Zhdan via Phabricator via cfe-commits
egorzhdan added a comment. Thank you @dgoldman, this approach looks good to me. I don't have anything to add other than what @sammccall has already commented. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119363/new/

[PATCH] D119363: [clang] Add `ObjCProtocolLoc` to represent protocol references

2022-02-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a subscriber: akyrtzi. sammccall added a comment. Thanks @akyrtzi @egorzhdan I was going to suggest that I think someone at Apple should probably look at changes here first. The goal here is to ensure that any tokens in the code that reference a decl have some AST node (which

[PATCH] D119363: [clang] Add `ObjCProtocolLoc` to represent protocol references

2022-02-09 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 407295. dgoldman added a comment. Minor lint fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119363/new/ https://reviews.llvm.org/D119363 Files: clang/include/clang/AST/ASTFwd.h

[PATCH] D119363: [clang] Add `ObjCProtocolLoc` to represent protocol references

2022-02-09 Thread David Goldman via Phabricator via cfe-commits
dgoldman created this revision. Herald added subscribers: usaxena95, kadircet. dgoldman requested review of this revision. Herald added subscribers: cfe-commits, ilya-biryukov. Herald added a project: clang. Add `ObjCProtocolLoc` which behaves like `TypeLoc` but for `ObjCProtocolDecl` references.