[PATCH] D74610: [clang][Index] Visit the default parameter arguements in libindex.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 17 07:03:09 PST 2020


hokein added a comment.

Looking the source code closely,  we also have another code path of indexing the `ParmVarDecl` in `clang/lib/Index/IndexTypeSourceInfo.cpp`,  it was called via `IndexCtx.indexTypeSourceInfo` in `handleDeclarator`.

In summary:

1. default arguments will be visited if this is a non-definition decl, regardless the shouldIndexFunctionLocatl -- this is done in IndexTypeSourceInfo
2. default arguments will be visited if this is a definition decl and shouldIndexFunctionLocal is fasle -- this is done in IndexDecl.
3. default arguments will not be visited if this is a definition decl and shouldIndexFunctionLocal is true

This patch fixes 3).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74610





More information about the cfe-commits mailing list