[PATCH] D55820: [AST] Unify the code paths of traversing lambda expressions.

2018-12-18 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349494: [AST] Unify the code paths of traversing lambda expressions. (authored by hokein, committed by ). Changed prior to commit: https://reviews.llvm.org/D55820?vs=178667&id=178674#toc Repository:

[PATCH] D55820: [AST] Unify the code paths of traversing lambda expressions.

2018-12-18 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM. The new code looks simpler and it's arguably simpler for the clients, since they'll have a consistent set of callbacks independent of the actual view into the lambda expres

[PATCH] D55820: [AST] Unify the code paths of traversing lambda expressions.

2018-12-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: include/clang/AST/RecursiveASTVisitor.h:2416 FunctionProtoTypeLoc Proto = TL.getAsAdjusted(); + if (S->hasExplicitParameters()) { ilya-biryukov wrote: > Could we add a comment on why we can't simply call the `Traver

[PATCH] D55820: [AST] Unify the code paths of traversing lambda expressions.

2018-12-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 178667. hokein marked an inline comment as done. hokein added a comment. Fix the format. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55820/new/ https://reviews.llvm.org/D55820 Files: include/clang/AST/RecursiveASTVisitor.

[PATCH] D55820: [AST] Unify the code paths of traversing lambda expressions.

2018-12-18 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: include/clang/AST/RecursiveASTVisitor.h:2416 FunctionProtoTypeLoc Proto = TL.getAsAdjusted(); + if (S->hasExplicitParameters()) { Could we add a comment on why we can't simply call the `TraverseTypeLoc` here?

[PATCH] D55820: [AST] Unify the code paths of traversing lambda expressions.

2018-12-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ilya-biryukov. Herald added a subscriber: arphaman. This supposes to be a non-functional change. We have two code paths when traversing lambda expressions: 1. traverse the function proto typeloc when parameters and return type are explicit;