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

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 18 07:06:40 PST 2018


hokein added inline comments.


================
Comment at: include/clang/AST/RecursiveASTVisitor.h:2416
   FunctionProtoTypeLoc Proto = TL.getAsAdjusted<FunctionProtoTypeLoc>();
 
+  if (S->hasExplicitParameters()) {
----------------
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.


Repository:
  rC Clang

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

https://reviews.llvm.org/D55820





More information about the cfe-commits mailing list