[PATCH] D61637: [Syntax] Introduce syntax trees

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 7 10:21:54 PDT 2019


ilya-biryukov added inline comments.


================
Comment at: clang/include/clang/Tooling/Syntax/Tree.h:40
+/// node.
+void traverse(Node *N, llvm::function_ref<void(Node *)> Visit);
+void traverse(const Node *N, llvm::function_ref<void(const Node *)> Visit);
----------------
sammccall wrote:
> I've been burned with adding these APIs without use cases.
> 
> It seems likely you want a way to:
>  - skip traversal of children
>  - abort the traversal entirely
Not having an option to abort traversal protects us against timing attacks...

Agree with both, will address in this patch.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D61637





More information about the cfe-commits mailing list