Skip to content

Commit dd6f7ee

Browse files
committed
[Syntax] DeclaratorList is a List
I think this was just an oversight. Differential Revision: https://reviews.llvm.org/D90541
1 parent 8a626f1 commit dd6f7ee

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

clang/lib/Tooling/Syntax/Tree.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ bool syntax::List::classof(const syntax::Node *N) {
305305
case syntax::NodeKind::NestedNameSpecifier:
306306
case syntax::NodeKind::CallArguments:
307307
case syntax::NodeKind::ParameterDeclarationList:
308+
case syntax::NodeKind::DeclaratorList:
308309
return true;
309310
default:
310311
return false;
@@ -405,6 +406,7 @@ clang::tok::TokenKind syntax::List::getDelimiterTokenKind() const {
405406
return clang::tok::coloncolon;
406407
case NodeKind::CallArguments:
407408
case NodeKind::ParameterDeclarationList:
409+
case NodeKind::DeclaratorList:
408410
return clang::tok::comma;
409411
default:
410412
llvm_unreachable("This is not a subclass of List, thus "
@@ -418,6 +420,7 @@ syntax::List::TerminationKind syntax::List::getTerminationKind() const {
418420
return TerminationKind::Terminated;
419421
case NodeKind::CallArguments:
420422
case NodeKind::ParameterDeclarationList:
423+
case NodeKind::DeclaratorList:
421424
return TerminationKind::Separated;
422425
default:
423426
llvm_unreachable("This is not a subclass of List, thus "
@@ -433,6 +436,8 @@ bool syntax::List::canBeEmpty() const {
433436
return true;
434437
case NodeKind::ParameterDeclarationList:
435438
return true;
439+
case NodeKind::DeclaratorList:
440+
return true;
436441
default:
437442
llvm_unreachable("This is not a subclass of List, thus canBeEmpty() "
438443
"cannot be called");

0 commit comments

Comments
 (0)