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 expression.



================
Comment at: include/clang/AST/RecursiveASTVisitor.h:2416
   FunctionProtoTypeLoc Proto = TL.getAsAdjusted<FunctionProtoTypeLoc>();
 
+  if (S->hasExplicitParameters()) {
----------------
hokein wrote:
> ilya-biryukov wrote:
> > Could we add a comment on why we can't simply call the `TraverseTypeLoc` 
> > here?
> > Something like:
> > 
> > ```
> > /// We manually deconstruct the TypeLoc for the lambda type to only
> > /// visit the parts of the type that were explicitly specified. 
> > /// We do not call the `TraverseTypeLoc` function to make sure we 
> > /// visit explicitly specified parts of the lambda even when 
> > shouldWalkTypeOfTypeLocs()
> > /// return false.
> > ```
> As discussed, this patch is just to simplify the code, this comment is not 
> needed.
Thanks for clarifying, I had incorrect assumptions about the reasons for the 
original failure in the index library.



Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55820/new/

https://reviews.llvm.org/D55820



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to