summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Tooling/Syntax/TreeTest.cpp
diff options
context:
space:
mode:
authorIlya Biryukov <ibiryukov@google.com>2019-08-06 17:07:58 +0000
committerIlya Biryukov <ibiryukov@google.com>2019-08-06 17:07:58 +0000
commitbfbf6b6cab9bc4e51bae95e2665bfa1aacdbe174 (patch)
tree63428444b9d99fead1fed89161ee3269a7704b23 /clang/unittests/Tooling/Syntax/TreeTest.cpp
parent213817327f6974926fab676c42b4fc55d75cae99 (diff)
downloadbcm5719-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.cpp17
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"},
};
OpenPOWER on IntegriCloud