From bfbf6b6cab9bc4e51bae95e2665bfa1aacdbe174 Mon Sep 17 00:00:00 2001 From: Ilya Biryukov Date: Tue, 6 Aug 2019 17:07:58 +0000 Subject: [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 --- clang/unittests/Tooling/Syntax/TreeTest.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'clang/unittests/Tooling/Syntax/TreeTest.cpp') 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: } -`- +`-TopLevelDeclaration + |-void + |-foo + |-( + |-) + `-CompoundStatement + |-2: { + `-3: } )txt"}, }; -- cgit v1.2.3