llvm-project/clang/lib/Tooling/Syntax
Sam McCall d4934eb5f8 [Syntax] Add iterators over children of syntax trees.
This gives us slightly nicer syntax (foreach) for idioms currently expressed
as a loop, and the option to use range algorithms where it makes sense
(e.g. llvm::all_of et al encapsulate the needed flow control in a useful way).

It's also a building block for iteration over filtered views (e.g. iterate over
all Stmt children, with the right type):
for (const Statement &S : filter<Statement>(N.children()))
  ...

I realize the recent direction has been mostly towards strongly-typed
node-specific facilities, but I think it's important we have convenient
generic facilities too.

Differential Revision: https://reviews.llvm.org/D90023
2020-10-28 12:37:57 +01:00
..
BuildTree.cpp [clang] Use SourceLocation as key in hash maps, NFCI 2020-10-20 16:24:09 +01:00
CMakeLists.txt [openmp] Base of tablegen generated OpenMP common declaration 2020-06-23 10:32:32 -04:00
ComputeReplacements.cpp [SyntaxTree] Add const qualifiers, from [llvm-qualified-auto] 2020-09-11 18:39:02 +00:00
Mutations.cpp [SyntaxTree] Bug fix in `MutationsImpl::addAfter`. 2020-10-14 09:22:01 +00:00
Nodes.cpp Migrate Declarators to use the List API 2020-10-01 13:56:31 +00:00
Synthesis.cpp Migrate Declarators to use the List API 2020-10-01 13:56:31 +00:00
Tokens.cpp [clang] Use SourceLocation as key in hash maps, NFCI 2020-10-20 16:24:09 +01:00
Tree.cpp [Syntax] Add iterators over children of syntax trees. 2020-10-28 12:37:57 +01:00