diff options
| author | Ilya Biryukov <ibiryukov@google.com> | 2019-08-06 17:07:58 +0000 |
|---|---|---|
| committer | Ilya Biryukov <ibiryukov@google.com> | 2019-08-06 17:07:58 +0000 |
| commit | bfbf6b6cab9bc4e51bae95e2665bfa1aacdbe174 (patch) | |
| tree | 63428444b9d99fead1fed89161ee3269a7704b23 /clang/unittests/Tooling/Syntax/TreeTest.cpp | |
| parent | 213817327f6974926fab676c42b4fc55d75cae99 (diff) | |
| download | bcm5719-llvm-bfbf6b6cab9bc4e51bae95e2665bfa1aacdbe174.tar.gz bcm5719-llvm-bfbf6b6cab9bc4e51bae95e2665bfa1aacdbe174.zip | |
[Syntax] Do not add a node for 'eof' into the tree
Summary:
While useful as a sentinel value when iterating over tokens, having
'eof' in the tree, seems to do more harm than good.
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: javed.absar, kristof.beyls, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D64576
llvm-svn: 368062
Diffstat (limited to 'clang/unittests/Tooling/Syntax/TreeTest.cpp')
| -rw-r--r-- | clang/unittests/Tooling/Syntax/TreeTest.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/clang/unittests/Tooling/Syntax/TreeTest.cpp b/clang/unittests/Tooling/Syntax/TreeTest.cpp index 1c42d2965a1..e83d2b72728 100644 --- a/clang/unittests/Tooling/Syntax/TreeTest.cpp +++ b/clang/unittests/Tooling/Syntax/TreeTest.cpp @@ -138,15 +138,14 @@ void foo() {} | `-CompoundStatement | |-2: { | `-3: } -|-TopLevelDeclaration -| |-void -| |-foo -| |-( -| |-) -| `-CompoundStatement -| |-2: { -| `-3: } -`-<eof> +`-TopLevelDeclaration + |-void + |-foo + |-( + |-) + `-CompoundStatement + |-2: { + `-3: } )txt"}, }; |

