[PATCH] D120498: [AST] Test RecursiveASTVisitor's current traversal of templates.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 24 09:35:52 PST 2022


sammccall created this revision.
sammccall added reviewers: hokein, nridge.
Herald added subscribers: usaxena95, kadircet, mgorny.
sammccall requested review of this revision.
Herald added subscribers: cfe-commits, ilya-biryukov.
Herald added a project: clang.

There are several logical inconsistencies and traps in the current traversal.

This doesn't fix any of them, but

- describes the general expectations of how templates should be traversed
- (mostly) exhaustively records current behavior as a baseline for changes
- lists the apparent bugs in current behavior

See https://github.com/clangd/clangd/issues/1034 for an example of reasonable
code that falls into one of the traps, and some discussion.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D120498

Files:
  clang/unittests/Tooling/CMakeLists.txt
  clang/unittests/Tooling/RecursiveASTVisitorTests/Templates.cpp
  clang/unittests/Tooling/TestVisitor.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120498.411166.patch
Type: text/x-patch
Size: 17600 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220224/94cd440e/attachment.bin>


More information about the cfe-commits mailing list