This is an archive of the discontinued LLVM Phabricator instance.

[SyntaxTree] Implement `NNS` using the `List` base API
ClosedPublic

Authored by eduucaldas on Aug 6 2020, 9:01 AM.

Diff Detail

Event Timeline

eduucaldas created this revision.Aug 6 2020, 9:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 6 2020, 9:01 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
eduucaldas requested review of this revision.Aug 6 2020, 9:01 AM
eduucaldas updated this revision to Diff 283638.Aug 6 2020, 9:29 AM

Clean List specific code

Please also add appropriate handling to syntax::List::getDelimiterTokenKind, getTerminationKind, and canBeEmpty.

clang/lib/Tooling/Syntax/Nodes.cpp
231

Could you add unit tests for methods in List and NNS? OK if they are in a separate patch.

LGTM after my comments are addressed.

gribozavr2 accepted this revision.Aug 10 2020, 1:12 AM
This revision is now accepted and ready to land.Aug 10 2020, 1:12 AM

Implement canBeEmpty, getDelimiterToken, getTerminationKind for NestedNameSpecifier

gribozavr2 accepted this revision.Aug 10 2020, 5:53 AM
gribozavr2 added inline comments.
clang/lib/Tooling/Syntax/Tree.cpp
362

Please drop the braces within 'case' unless you need them to create a new scope for a variable.

eduucaldas marked 2 inline comments as done.Aug 10 2020, 6:34 AM

Answer comments

eduucaldas closed this revision.Sep 17 2020, 1:12 AM
eduucaldas edited the summary of this revision. (Show Details)