[all-commits] [llvm/llvm-project] 58fa50: [Syntax] Add nodes for most common statements
Ilya Biryukov via All-commits
all-commits at lists.llvm.org
Wed Nov 6 02:00:43 PST 2019
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 58fa50f43701097640a4ee5547aee1e4a4eea454
https://github.com/llvm/llvm-project/commit/58fa50f43701097640a4ee5547aee1e4a4eea454
Author: Ilya Biryukov <ibiryukov at google.com>
Date: 2019-11-06 (Wed, 06 Nov 2019)
Changed paths:
M clang/include/clang/Tooling/Syntax/Nodes.h
M clang/lib/Tooling/Syntax/BuildTree.cpp
M clang/lib/Tooling/Syntax/Nodes.cpp
M clang/lib/Tooling/Syntax/Tree.cpp
M clang/unittests/Tooling/Syntax/TreeTest.cpp
Log Message:
-----------
[Syntax] Add nodes for most common statements
Summary:
Most of the statements mirror the ones provided by clang AST.
Major differences are:
- expressions are wrapped into 'ExpressionStatement' instead of being
a subclass of statement,
- semicolons are always consumed by the leaf expressions (return,
expression satement, etc),
- some clang statements are not handled yet, we wrap those into an
UnknownStatement class, which is not present in clang.
We also define an 'Expression' and 'UnknownExpression' classes in order
to produce 'ExpressionStatement' where needed. The actual implementation
of expressions is not yet ready, it will follow later.
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D63835
More information about the All-commits
mailing list