This is an archive of the discontinued LLVM Phabricator instance.

Add support for IntegerLiteral in SyntaxTree
ClosedPublic

Authored by eduucaldas on Jun 4 2020, 12:28 AM.

Diff Detail

Event Timeline

eduucaldas created this revision.Jun 4 2020, 12:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 4 2020, 12:28 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
eduucaldas updated this revision to Diff 268382.Jun 4 2020, 1:22 AM

Add support for IntegerLiteral in SyntaxTree

gribozavr2 added inline comments.Jun 4 2020, 1:41 AM
clang/include/clang/Tooling/Syntax/Nodes.h
193

"literalToken"?

clang/unittests/Tooling/Syntax/TreeTest.cpp
706 ↗(On Diff #268382)

Please add more tests for integers with suffixes (0u, 0ll etc.), different bases (hex, octal etc.), digit separators.

http://eel.is/c++draft/lex.icon
https://en.cppreference.com/w/cpp/language/integer_literal

eduucaldas updated this revision to Diff 268397.Jun 4 2020, 2:34 AM

answer comments

eduucaldas updated this revision to Diff 268420.Jun 4 2020, 4:31 AM

answering comments

eduucaldas marked 2 inline comments as done.Jun 4 2020, 4:33 AM
gribozavr2 accepted this revision.Jun 4 2020, 4:44 AM
gribozavr2 added inline comments.
clang/unittests/Tooling/Syntax/TreeTest.cpp
718 ↗(On Diff #268420)

Could you remove the whitespace in front of )cpp" for consistency with the rest of the file?

758 ↗(On Diff #268420)

IntegerLiteralLongLong

792 ↗(On Diff #268420)

IntegerLiteralBinary

821 ↗(On Diff #268420)

IntegerLiteralWithDigitSeparators

This revision is now accepted and ready to land.Jun 4 2020, 4:44 AM
gribozavr2 added inline comments.Jun 4 2020, 4:45 AM
clang/include/clang/Tooling/Syntax/Nodes.h
645

Could you move this change to a separate patch?

eduucaldas updated this revision to Diff 268428.Jun 4 2020, 4:58 AM
eduucaldas marked 4 inline comments as done.

Fix nits

eduucaldas marked an inline comment as done.Jun 4 2020, 4:59 AM
gribozavr2 accepted this revision.Jun 4 2020, 5:02 AM
This revision was automatically updated to reflect the committed changes.