[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-29 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno marked an inline comment as done. riccibruno added a comment. In D57106#1375142 , @steveire wrote: > This was subsequently reverted. Is there a status update? Rebasing and > committing D56959 would unblock trav

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-29 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. This was subsequently reverted. Is there a status update? Rebasing and committing D56959 would unblock traverser work and would allow this to progress separately in parallel. Repository: rL LLVM CHANGES SINCE LAST ACTION https://

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-28 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL352369: [AST] Introduce GenericSelectionExpr::Association (authored by brunoricci, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D57106?vs=18

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-28 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno marked 5 inline comments as done. riccibruno added inline comments. Comment at: include/clang/AST/Expr.h:5122 +AssociationIteratorTy() = default; +AssociationTy operator*() const { + return AssociationTy(cast(*E), *TSI, aaron.ballman wrote

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/AST/Expr.h:5122 +AssociationIteratorTy() = default; +AssociationTy operator*() const { + return AssociationTy(cast(*E), *TSI, riccibruno wrote: > aaron.ballman wrote: > > Can this continu

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-28 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno marked 3 inline comments as done. riccibruno added inline comments. Comment at: include/clang/AST/Expr.h:5122 +AssociationIteratorTy() = default; +AssociationTy operator*() const { + return AssociationTy(cast(*E), *TSI, aaron.ballman wrote

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from some possible minor nits. Thank you for working on this! Comment at: include/clang/AST/Expr.h:5122 +AssociationIteratorTy() = default; +

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-27 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 183755. riccibruno added a comment. Removed duplicated comment in `AssociationIteratorTy` Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57106/new/ https://reviews.llvm.org/D57106 Files: include/clang/AST/Expr.h includ

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-27 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 183752. riccibruno added a comment. Use `iterator_facade_base`. It didn't work the first time because I forgot to bring in the name `operator++` from `iterator_facade_base` into `AssociationIteratorTy`. Since name lookup occurs before overload resolution

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/AST/Expr.h:5084 + /// storage of Stmt * and TypeSourceInfo * in GenericSelectionExpr. + template class AssociationIteratorTy { +friend class GenericSelectionExpr; riccibruno wrote: > aaron.ball

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-26 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno marked an inline comment as done. riccibruno added inline comments. Comment at: include/clang/AST/Expr.h:5084 + /// storage of Stmt * and TypeSourceInfo * in GenericSelectionExpr. + template class AssociationIteratorTy { +friend class GenericSelectionExpr; -

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/AST/Expr.h:5084 + /// storage of Stmt * and TypeSourceInfo * in GenericSelectionExpr. + template class AssociationIteratorTy { +friend class GenericSelectionExpr; riccibruno wrote: > aaron.ball

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-25 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 183658. riccibruno added a comment. Update the comment in the iterator as per Aaron's comments. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57106/new/ https://reviews.llvm.org/D57106 Files: include/clang/AST/Expr.h

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-25 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno marked 3 inline comments as done. riccibruno added inline comments. Comment at: include/clang/AST/Expr.h:5084 + /// storage of Stmt * and TypeSourceInfo * in GenericSelectionExpr. + template class AssociationIteratorTy { +friend class GenericSelectionExpr; -

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/AST/Expr.h:5084 + /// storage of Stmt * and TypeSourceInfo * in GenericSelectionExpr. + template class AssociationIteratorTy { +friend class GenericSelectionExpr; riccibruno wrote: > dblaikie w

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-25 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added inline comments. Comment at: include/clang/AST/Expr.h:5103 +using reference = AssociationTy; +using pointer = AssociationTy; +AssociationIteratorTy() = default; aaron.ballman wrote: > riccibruno wrote: > > dblaikie wrote: > > > aaron.

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-25 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 183552. riccibruno marked 10 inline comments as done. riccibruno added a comment. Moved back to an input iterator. Addressed Aaron's remaining comments. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57106/new/ https://revi

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/AST/Expr.h:5103 +using reference = AssociationTy; +using pointer = AssociationTy; +AssociationIteratorTy() = default; riccibruno wrote: > dblaikie wrote: > > aaron.ballman wrote: > > > ric

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-25 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno marked 2 inline comments as done. riccibruno added inline comments. Comment at: include/clang/AST/Expr.h:5103 +using reference = AssociationTy; +using pointer = AssociationTy; +AssociationIteratorTy() = default; dblaikie wrote: > aaron.ball

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-24 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: include/clang/AST/Expr.h:5103 +using reference = AssociationTy; +using pointer = AssociationTy; +AssociationIteratorTy() = default; aaron.ballman wrote: > riccibruno wrote: > > aaron.ballman wrote: > > > Car

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-24 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 183352. riccibruno added a comment. Rebased on D57104 . No other changes. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57106/new/ https://reviews.llvm.org/D57106 Files: include/clang/AS

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: dblaikie, mclow.lists. aaron.ballman added subscribers: dblaikie, mclow.lists. aaron.ballman added a comment. Adding some additional reviewers to help tease out the iterator design questions. Comment at: include/clang/AST/Expr.h:5103 +using r

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-24 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 183314. riccibruno added a comment. Made `GenericSelectionExpr::AssociationIterator` a random access iterator. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57106/new/ https://reviews.llvm.org/D57106 Files: include/clan

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-24 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno marked an inline comment as done. riccibruno added inline comments. Comment at: include/clang/AST/Expr.h:5103 +using reference = AssociationTy; +using pointer = AssociationTy; +AssociationIteratorTy() = default; aaron.ballman wrote: > Carry

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/AST/Expr.h:5099 + public: +using iterator_category = std::forward_iterator_tag; +using value_type = AssociationTy; Carrying over the conversation from D57098: >> @aaron.ballman It seems like

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-23 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: lib/AST/ASTDumper.cpp:1465 - for (unsigned I = 0, N = E->getNumAssocs(); I != N; ++I) { + for (GenericSelectionExpr::ConstAssociation Assoc : E->associations()) { dumpChild([=] { Range for loops in this file ge

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-23 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. Just in case you didn't know, you could have (and still can!) just update https://reviews.llvm.org/D57098 instead of creating a new PR. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57106/new/ https://reviews.llvm.org/D57106

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added reviewers: aaron.ballman, steveire. riccibruno added a project: clang. Herald added a subscriber: cfe-commits. Introduce a new class `GenericSelectionExpr::Association` which bundle together an association expression and its `TypeSourceInfo`. An