[PATCH] D63835: [Syntax] Add nodes for most common statements

2019-11-06 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. Build result: fail - 59843 tests passed, 21 failed and 768 were skipped. failed: lld.ELF/linkerscript/filename-spec.s failed: Clang.Index/index-module-with-vfs.m failed: Clang.Modules/double-quotes.m failed:

[PATCH] D63835: [Syntax] Add nodes for most common statements

2019-11-06 Thread Ilya Biryukov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG58fa50f43701: [Syntax] Add nodes for most common statements (authored by ilya-biryukov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63835/new/

[PATCH] D63835: [Syntax] Add nodes for most common statements

2019-11-06 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang/include/clang/Tooling/Syntax/Nodes.h:193 + syntax::Statement *thenStatement(); + syntax::Leaf *elseKeyword(); + syntax::Statement *elseStatement(); sammccall wrote: > ilya-biryukov wrote: > > sammccall

[PATCH] D63835: [Syntax] Add nodes for most common statements

2019-11-06 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 228023. ilya-biryukov marked 20 inline comments as done. ilya-biryukov added a comment. - Group Traverse* and Walk* together - s/RAT/RAV - Add a comment about nullability of the accessors - Name function for consuming statements and expressions

[PATCH] D63835: [Syntax] Add nodes for most common statements

2019-08-05 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Tooling/Syntax/Nodes.h:99 /// An abstract node for C++ statements, e.g. 'while', 'if', etc. class Statement : public Tree {

[PATCH] D63835: [Syntax] Add nodes for most common statements

2019-07-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. This is ready for another round Comment at: clang/include/clang/Tooling/Syntax/Nodes.h:25 /// A kind of a syntax node, used for implementing casts. enum class NodeKind : uint16_t { Leaf, sammccall wrote: > there are going to

[PATCH] D63835: [Syntax] Add nodes for most common statements

2019-07-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 208995. ilya-biryukov added a comment. - Mark groups of kinds for statements and expressions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63835/new/ https://reviews.llvm.org/D63835 Files:

[PATCH] D63835: [Syntax] Add nodes for most common statements

2019-07-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang/include/clang/Tooling/Syntax/Nodes.h:185 +/// if (cond) else +class IfStatement final : public Statement { +public: sammccall wrote: > I guess the missing cond here (and similar below) are due to

[PATCH] D63835: [Syntax] Add nodes for most common statements

2019-07-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 208937. ilya-biryukov marked 5 inline comments as done. ilya-biryukov added a comment. - Rebase - Address comments - Restructure the roles - Remove the role from tree dumps for now With too many roles it is annoying to update the test outputs on

[PATCH] D63835: [Syntax] Add nodes for most common statements

2019-07-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked 2 inline comments as done. ilya-biryukov added a comment. Submitting a few comments to start up the discussions. The actual changes will follow. Comment at: clang/include/clang/Tooling/Syntax/Nodes.h:99 /// An abstract node for C++ statements, e.g.

[PATCH] D63835: [Syntax] Add nodes for most common statements

2019-07-08 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/include/clang/Tooling/Syntax/Nodes.h:25 /// A kind of a syntax node, used for implementing casts. enum class NodeKind : uint16_t { Leaf, there are going to be many of these. I'd suggest either sorting them

[PATCH] D63835: [Syntax] Add nodes for most common statements

2019-06-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. This change mostly aims to illustrate that `TreeBuilder` seems to be powerful enough to go beyond basic nodes. But it also introduces enough nodes to make the syntax trees minimally useful for traversing statement nodes. Hopefully that could become a good basis to

[PATCH] D63835: [Syntax] Add nodes for most common statements

2019-06-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: sammccall. Herald added a project: clang. ilya-biryukov added a parent revision: D61637: [Syntax] Introduce syntax trees. Most of the statements mirror the ones provided by clang AST. Major differences are: - expressions are