[PATCH] D85898: [SyntaxTree] Clean `#includes` in `TreeTestBase.h`

2020-08-13 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 285342. eduucaldas added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85898/new/ https://reviews.llvm.org/D85898 Files: clang/unittests/Tooling/Syntax/MutationsTest.cpp clang/unittests/Too

[PATCH] D85897: [SyntaxTree] Split `TreeTest.cpp`

2020-08-13 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added a comment. We can further split `BuildTreeTest.cpp` for instance in `BuildStatementTest.cpp` and `BuildDeclTest.cpp`, I can't see many arguments towards that though. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85897/new/ https:

[PATCH] D85898: [SyntaxTree] Clean `#includes` in `TreeTestBase.h`

2020-08-13 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added a reviewer: gribozavr2. eduucaldas added inline comments. Comment at: clang/unittests/Tooling/Syntax/TreeTestBase.h:14 #include "clang/AST/ASTConsumer.h" -#include "clang/AST/Decl.h" -#include "clang/AST/Stmt.h" #include "clang/Basic/LLVM.h" #include "clang/Fr

[PATCH] D85898: [SyntaxTree] Clean `#includes` in `TreeTestBase.h`

2020-08-13 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG9c2e708f0dc5: [SyntaxTree] Clean `#includes` in `TreeTestBase.h` (authored by eduucaldas). Changed prior to commit: https://reviews.llvm.org/D8589

[PATCH] D85913: [SyntaxTree] Split `TreeTestBase` into header and source

2020-08-13 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. eduucaldas requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D85913 Files: clang/unittests/Tooling/Syntax/BuildTreeTest.cpp clang/un

[PATCH] D85913: [SyntaxTree] Split `TreeTestBase` into header and source

2020-08-13 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 285401. eduucaldas added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85913/new/ https://reviews.llvm.org/D85913 Files: clang/unittests/Tooling/Syntax/BuildTreeTest.cpp clang/unittests/Too

[PATCH] D85913: [SyntaxTree] Split `TreeTestBase` into header and source

2020-08-13 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 285413. eduucaldas added a comment. Switch to using directive on source files Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85913/new/ https://reviews.llvm.org/D85913 Files: clang/unittests/Tooling/Syntax

[PATCH] D85913: [SyntaxTree] Split `TreeTestBase` into header and source

2020-08-13 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 285416. eduucaldas added a comment. Fix the diff base Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85913/new/ https://reviews.llvm.org/D85913 Files: clang/unittests/Tooling/Syntax/BuildTreeTest.cpp cla

[PATCH] D85913: [SyntaxTree] Split `TreeTestBase` into header and source

2020-08-13 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 285421. eduucaldas added a comment. Remove unused `SyntaxTreeTest::addFile` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85913/new/ https://reviews.llvm.org/D85913 Files: clang/unittests/Tooling/Syntax/B

[PATCH] D85913: [SyntaxTree] Split `TreeTestBase` into header and source

2020-08-13 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added a reviewer: gribozavr2. eduucaldas added inline comments. Comment at: clang/unittests/Tooling/Syntax/BuildTreeTest.cpp:15-17 +using namespace clang; +using namespace clang::syntax; + Following the [[ https://llvm.org/docs/CodingStandards.html#us

[PATCH] D85913: [SyntaxTree] Split `TreeTestBase` into header and source

2020-08-14 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 285566. eduucaldas added a comment. remove static inside anonymous namespace Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85913/new/ https://reviews.llvm.org/D85913 Files: clang/unittests/Tooling/Syntax/

[PATCH] D85913: [SyntaxTree] Split `TreeTestBase` into header and source

2020-08-14 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG2e4a20fd7062: [SyntaxTree] Split `TreeTestBase` into header and source (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D85962: [SyntaxTree] Create annotations infrastructure and apply it in expression tests.

2020-08-14 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. eduucaldas requested review of this revision. In this process we also create some other tests, in order to not lose coverage when focusing on the annotated code. Repository: rG LLVM Github

[PATCH] D85962: [SyntaxTree] Create annotations infrastructure and apply it in expression tests.

2020-08-14 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 285613. eduucaldas added a comment. Previous diff had only the last commit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85962/new/ https://reviews.llvm.org/D85962 Files: clang/unittests/Tooling/Syntax/Bu

[PATCH] D85962: [SyntaxTree] Create annotations infrastructure and apply it in expression tests.

2020-08-14 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 285629. eduucaldas added a comment. Move added Declaration tests to an appropriate place Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85962/new/ https://reviews.llvm.org/D85962 Files: clang/unittests/Too

[PATCH] D85962: [SyntaxTree] Create annotations infrastructure and apply it in expression tests.

2020-08-14 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 285632. eduucaldas added a comment. Add annotations to the last missing tests in expressions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85962/new/ https://reviews.llvm.org/D85962 Files: clang/unittest

[PATCH] D85962: [SyntaxTree] Create annotations infrastructure and apply it in expression tests.

2020-08-18 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 286248. eduucaldas marked 7 inline comments as done. eduucaldas added a comment. Answering comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85962/new/ https://reviews.llvm.org/D85962 Files: clang/un

[PATCH] D85962: [SyntaxTree] Create annotations infrastructure and apply it in expression tests.

2020-08-18 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added inline comments. Comment at: clang/unittests/Tooling/Syntax/BuildTreeTest.cpp:477 struct X { friend X operator+(const X&, const X&); }; A test for this part was created below Comment at: clang/unittests/Tooling/Syntax/Tree

[PATCH] D85962: [SyntaxTree] Create annotations infrastructure and apply it in expression tests.

2020-08-18 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 286251. eduucaldas added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85962/new/ https://reviews.llvm.org/D85962 Files: clang/unittests/Tooling/Syntax/BuildTreeTest.cpp clang/unittests/Too

[PATCH] D85962: [SyntaxTree] Create annotations infrastructure and apply it in expression tests.

2020-08-18 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 286258. eduucaldas added a comment. Fail on non-matching number of tree dumps and annotations Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85962/new/ https://reviews.llvm.org/D85962 Files: clang/unittest

[PATCH] D85962: [SyntaxTree] Create annotations infrastructure and apply it in expression tests.

2020-08-18 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added inline comments. Comment at: clang/unittests/Tooling/Syntax/TreeTestBase.cpp:199 + auto AnnotatedRanges = AnnotatedCode.ranges(); + assert(AnnotatedRanges.size() == TreeDumps.size()); + for (auto i = 0ul; i < AnnotatedRanges.size(); i++) { edu

[PATCH] D85962: [SyntaxTree] Create annotations infrastructure and apply it in expression tests.

2020-08-18 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 286259. eduucaldas added a comment. Nit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85962/new/ https://reviews.llvm.org/D85962 Files: clang/unittests/Tooling/Syntax/BuildTreeTest.cpp clang/unittests/T

[PATCH] D85962: [SyntaxTree] Create annotations infrastructure and apply it in expression tests.

2020-08-18 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc8c92b54d74c: [SyntaxTree] Use Annotations based tests for expressions (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D86139: [SyntaxTree] Split tests related to Namespace

2020-08-18 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. eduucaldas requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D86139 Files: clang/unittests/Tooling/Syntax/BuildTreeTest.cpp Index: clang/uni

[PATCH] D87495: [SyntaxTree][Synthesis] Add support for simple Leafs and test based on tree dump

2020-09-11 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. eduucaldas requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D87495 Files: clang/include/clang/Tooling/Syntax/BuildTree.h clang/lib/Tooling

[PATCH] D87495: [SyntaxTree][Synthesis] Add support for simple Leafs and test based on tree dump

2020-09-11 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 291152. eduucaldas added a comment. Remove unused include Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87495/new/ https://reviews.llvm.org/D87495 Files: clang/include/clang/Tooling/Syntax/BuildTree.h c

[PATCH] D87498: [SyntaxTree] Rename functions to start with verb

2020-09-11 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. eduucaldas added a reviewer: gribozavr2. Herald added a project: clang. Herald added a subscriber: cfe-commits. eduucaldas requested review of this revision. According to LLVM coding standards: https://llvm.org/docs/CodingStandards.html#name-types-functions-variab

[PATCH] D87495: [SyntaxTree][Synthesis] Add support for simple Leafs and test based on tree dump

2020-09-11 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 291190. eduucaldas marked 5 inline comments as done. eduucaldas added a comment. Answer inline comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87495/new/ https://reviews.llvm.org/D87495 Files: clan

[PATCH] D87495: [SyntaxTree][Synthesis] Add support for simple Leafs and test based on tree dump

2020-09-11 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added inline comments. Comment at: clang/lib/Tooling/Syntax/Synthesis.cpp:51 + return createLeaf(A, tok::getKeywordSpelling(K), K); +} + gribozavr2 wrote: > Could we make a combined function that does not require the user to make a > distinction betw

[PATCH] D87498: [SyntaxTree][NFC] Rename functions to start with verb

2020-09-11 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG4c14ee61b737: [SyntaxTree] Rename functions to start with verb (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D87495: [SyntaxTree][Synthesis] Add support for simple Leafs and test based on tree dump

2020-09-11 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 291229. eduucaldas marked an inline comment as done. eduucaldas added a comment. `createPunctuation`, `createKeyword` -> `createLeaf` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87495/new/ https://reviews.

[PATCH] D87495: [SyntaxTree][Synthesis] Add support for simple Leafs and test based on tree dump

2020-09-11 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added inline comments. Comment at: clang/lib/Tooling/Syntax/Synthesis.cpp:51 + return createLeaf(A, tok::getKeywordSpelling(K), K); +} + gribozavr2 wrote: > eduucaldas wrote: > > gribozavr2 wrote: > > > Could we make a combined function that does not

[PATCH] D87495: [SyntaxTree][Synthesis] Add support for simple Leafs and test based on tree dump

2020-09-11 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 291239. eduucaldas added a comment. fix clang-tidy warning Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87495/new/ https://reviews.llvm.org/D87495 Files: clang/include/clang/Tooling/Syntax/BuildTree.h

[PATCH] D87522: [SyntaxTree] Add const qualifiers, from [llvm-qualified-auto]

2020-09-11 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. eduucaldas added a reviewer: gribozavr2. Herald added a project: clang. Herald added a subscriber: cfe-commits. eduucaldas requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D87522 Files: clang/lib/Tooling/Syntax/

[PATCH] D87523: [SyntaxTree] Reduce visibility of `Arena::lexBuffer`.

2020-09-11 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. eduucaldas added a reviewer: gribozavr2. Herald added a project: clang. Herald added a subscriber: cfe-commits. eduucaldas requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D87523 Files: clang/include/clang/Tooli

[PATCH] D87526: [SyntaxTree][Synthesis] Add support for Tree.

2020-09-11 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. eduucaldas requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D87526 Files: clang/include/clang/Tooling/Syntax/BuildTree.h clang/lib/Tooling

[PATCH] D87526: [SyntaxTree][Synthesis] Add support for Tree.

2020-09-11 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 291261. eduucaldas added a comment. add previous patch to allow pre-merge checks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87526/new/ https://reviews.llvm.org/D87526 Files: clang/include/clang/Tooling

[PATCH] D87533: [SyntaxTree][Synthesis] Add support for Tree.

2020-09-11 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. eduucaldas requested review of this revision. In a future patch - Implement helper function to generate Trees for tests - and test Tree methods, namely `findFirstLeaf` and `findLastLeaf` Rep

[PATCH] D87495: [SyntaxTree][Synthesis] Add support for simple Leafs and test based on tree dump

2020-09-11 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 291280. eduucaldas marked 2 inline comments as done. eduucaldas added a comment. Remove `createLeafLowLevel` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87495/new/ https://reviews.llvm.org/D87495 Files:

[PATCH] D87533: [SyntaxTree][Synthesis] Add support for Tree.

2020-09-11 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 291284. eduucaldas added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87533/new/ https://reviews.llvm.org/D87533 Files: clang/include/clang/Tooling/Syntax/BuildTree.h clang/lib/Toolin

[PATCH] D87495: [SyntaxTree][Synthesis] Add support for simple Leafs and test based on tree dump

2020-09-11 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG5d152127d48f: [SyntaxTree][Synthesis] Add support for simple Leafs and test based on tree dump (authored by eduucaldas). Repository: rG LLVM Githu

[PATCH] D87523: [SyntaxTree] Reduce visibility of `Arena::lexBuffer`.

2020-09-11 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 291293. eduucaldas added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87523/new/ https://reviews.llvm.org/D87523 Files: clang/include/clang/Tooling/Syntax/Tree.h clang/lib/Tooling/Syn

[PATCH] D87523: [SyntaxTree] Reduce visibility of `Arena::lexBuffer`.

2020-09-11 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG515238d5b113: [SyntaxTree] Reduce visibility of `Arena::lexBuffer`. (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D87522: [SyntaxTree] Add const qualifiers, from [llvm-qualified-auto]

2020-09-11 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG238ae4eee051: [SyntaxTree] Add const qualifiers, from [llvm-qualified-auto] (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87522/new

[PATCH] D87533: [SyntaxTree][Synthesis] Add support for Tree.

2020-09-11 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 291320. eduucaldas marked an inline comment as done. eduucaldas added a comment. Add argument names to function declaration Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87533/new/ https://reviews.llvm.org/D

[PATCH] D87533: [SyntaxTree][Synthesis] Add support for Tree.

2020-09-11 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7c37b82f5ba5: [SyntaxTree][Synthesis] Add support for Tree. (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87533/new/ https://revie

[PATCH] D87598: [SyntaxTree][List] Fix: `ParameterDeclarationList` is the `List` inside `ParametersAndQualifiers`

2020-09-14 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. eduucaldas added a reviewer: gribozavr2. Herald added a project: clang. Herald added a subscriber: cfe-commits. eduucaldas requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D87598 Files: clang/lib/Tooling/Syntax/

[PATCH] D87599: [SyntaxTree] Provide `List::classof`

2020-09-14 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. eduucaldas added a reviewer: gribozavr2. Herald added a project: clang. Herald added a subscriber: cfe-commits. eduucaldas requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D87599 Files: clang/include/clang/Tooli

[PATCH] D87600: [SyntaxTree][List] `assertInvariants` for `List`s

2020-09-14 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. eduucaldas added a reviewer: gribozavr2. Herald added a project: clang. Herald added a subscriber: cfe-commits. eduucaldas requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D87600 Files: clang/include/clang/Tooli

[PATCH] D87600: [SyntaxTree][List] `assertInvariants` for `List`s

2020-09-14 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 291522. eduucaldas marked 2 inline comments as done. eduucaldas added a comment. Fix build error and clang-tidy lint error Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87600/new/ https://reviews.llvm.org/D8

[PATCH] D87598: [SyntaxTree][List] Fix: `ParameterDeclarationList` is the `List` inside `ParametersAndQualifiers`

2020-09-14 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG12232dc181cb: [SyntaxTree][List] Fix: `ParameterDeclarationList` is the `List` inside… (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D87599: [SyntaxTree] Provide `List::classof`

2020-09-14 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0f4cc64fd747: [SyntaxTree] Provide `List::classof` (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87599/new/ https://reviews.llvm.o

[PATCH] D87600: [SyntaxTree][List] `assertInvariants` for `List`s

2020-09-14 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 291532. eduucaldas added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87600/new/ https://reviews.llvm.org/D87600 Files: clang/include/clang/Tooling/Syntax/Tree.h clang/lib/Tooling/Syn

[PATCH] D87600: [SyntaxTree][List] `assertInvariants` for `List`s

2020-09-14 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGceb0128509c5: [SyntaxTree][List] `assertInvariants` for `List`s (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D87749: [SyntaxTree][Synthesis] Implement `deepCopy`

2020-09-16 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. eduucaldas added a reviewer: gribozavr2. Herald added a project: clang. Herald added a subscriber: cfe-commits. eduucaldas requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D87749 Files: clang/include/clang/Tooli

[PATCH] D87749: [SyntaxTree][Synthesis] Implement `deepCopy`

2020-09-16 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 292145. eduucaldas added a comment. Remove extraneous qualifiers in `createTree` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87749/new/ https://reviews.llvm.org/D87749 Files: clang/include/clang/Tooling

[PATCH] D87779: [SyntaxTree] Test `findFirstLeaf` and `findLastLeaf`

2020-09-16 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. eduucaldas requested review of this revision. - Introduce `TreeTest.cpp` to unit test `Tree.h` - Add `generateAllTreesWithShape` to generating test cases - Add tests for `findFirstLeaf`

[PATCH] D87820: [SyntaxTree][Synthesis] Fix allocation in `createTree` for more general use

2020-09-17 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. eduucaldas added a reviewer: gribozavr2. Herald added a project: clang. Herald added a subscriber: cfe-commits. eduucaldas requested review of this revision. Prior to this change `createTree` could not create arbitrary syntax trees. Now it dispatches to the constr

[PATCH] D87820: [SyntaxTree][Synthesis] Fix allocation in `createTree` for more general use

2020-09-17 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 292444. eduucaldas edited the summary of this revision. eduucaldas added a comment. Fix comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87820/new/ https://reviews.llvm.org/D87820 Files: clang/includ

[PATCH] D87820: [SyntaxTree][Synthesis] Fix allocation in `createTree` for more general use

2020-09-17 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1e19165bd89d: [SyntaxTree][Synthesis] Fix allocation in `createTree` for more general use (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D87749: [SyntaxTree][Synthesis] Implement `deepCopy`

2020-09-17 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 292539. eduucaldas added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87749/new/ https://reviews.llvm.org/D87749 Files: clang/include/clang/Tooling/Syntax/BuildTree.h clang/lib/Toolin

[PATCH] D87839: [SyntaxTree] Test the List API

2020-09-17 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. eduucaldas requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D87839 Files: clang/include/clang/Tooling/Syntax/Tree.h clang/unittests/Toolin

[PATCH] D87839: [SyntaxTree] Test the List API

2020-09-17 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 292547. eduucaldas added a comment. Apply arc lint patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87839/new/ https://reviews.llvm.org/D87839 Files: clang/include/clang/Tooling/Syntax/Tree.h clang/u

[PATCH] D87895: [SyntaxTree] Test for '\' inside token.

2020-09-18 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. eduucaldas added a reviewer: gribozavr2. Herald added a project: clang. Herald added a subscriber: cfe-commits. eduucaldas requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D87895 Files: clang/unittests/Tooling/S

[PATCH] D87896: [SyntaxTree][Synthesis] Improve testing `createLeaf`

2020-09-18 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. eduucaldas added a reviewer: gribozavr2. Herald added a project: clang. Herald added a subscriber: cfe-commits. eduucaldas requested review of this revision. The new test shows that `createLeaf` depends on the C++ version. Repository: rG LLVM Github Monorepo

[PATCH] D87896: [SyntaxTree][Synthesis] Improve testing `createLeaf`

2020-09-18 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 292831. eduucaldas added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87896/new/ https://reviews.llvm.org/D87896 Files: clang/unittests/Tooling/Syntax/SynthesisTest.cpp Index: clang/u

[PATCH] D87895: [SyntaxTree] Test for '\' inside token.

2020-09-18 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 292832. eduucaldas added a comment. Fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87895/new/ https://reviews.llvm.org/D87895 Files: clang/unittests/Tooling/Syntax/BuildTreeTest.cpp Index: clang

[PATCH] D87925: [Synthesis] Fix: `createTree` only from children that are not backed by source code

2020-09-18 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. eduucaldas requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D87925 Files: clang/include/clang/Tooling/Syntax/BuildTree.h clang/lib/Tooling

[PATCH] D87896: [SyntaxTree][Synthesis] Improve testing `createLeaf`

2020-09-20 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbb5b28f12fbd: [SyntaxTree][Synthesis] Improve testing `createLeaf` (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87896/new/ https:

[PATCH] D87895: [SyntaxTree] Test for '\' inside token.

2020-09-20 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe616a4259889: [SyntaxTree] Test for '\' inside token. (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

[PATCH] D87749: [SyntaxTree][Synthesis] Implement `deepCopy`

2020-09-21 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 293085. eduucaldas marked 3 inline comments as done. eduucaldas added a comment. - `deepCopy` returns `nullptr` if copy code with Macro expansions. - `deepCopy` also deep copies the Tokens. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D87749: [SyntaxTree][Synthesis] Implement `deepCopy`

2020-09-21 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added inline comments. Comment at: clang/lib/Tooling/Syntax/Synthesis.cpp:237 + +syntax::Node *clang::syntax::deepCopy(syntax::Arena &A, const Node *N) { + if (!canModifyAllDescendants(N)) We are ignoring nullability of pointers. The casting machiner

[PATCH] D87749: [SyntaxTree][Synthesis] Implement `deepCopy`

2020-09-21 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 293089. eduucaldas marked 3 inline comments as done. eduucaldas added a comment. Fix canModifyAllDescendants, add tests for it Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87749/new/ https://reviews.llvm.or

[PATCH] D88004: [SyntaxTree][NFC] follow naming convention + remove auto on empty vector declaration

2020-09-21 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. eduucaldas requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D88004 Files: clang/lib/Tooling/Syntax/BuildTree.cpp clang/lib/Tooling/Syntax/

[PATCH] D87749: [SyntaxTree][Synthesis] Implement `deepCopy`

2020-09-21 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 293101. eduucaldas added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87749/new/ https://reviews.llvm.org/D87749 Files: clang/include/clang/Tooling/Syntax/BuildTree.h clang/lib/Tooling/Syn

[PATCH] D87749: [SyntaxTree][Synthesis] Implement `deepCopy`

2020-09-21 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG4a5cc389c51d: [SyntaxTree][Synthesis] Implement `deepCopy` (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D88004: [SyntaxTree][NFC] follow naming convention + remove auto on empty vector declaration

2020-09-21 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG87f0b51d68de: [SyntaxTree][NFC] follow naming convention + remove auto on empty vector… (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D87779: [SyntaxTree] Test `findFirstLeaf` and `findLastLeaf`

2020-09-21 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 293163. eduucaldas marked 3 inline comments as done. eduucaldas added a comment. - Answer Review - Change names in `generateAllTreesWithShape` - `auto x = vector()` -> `vector x;` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D87779: [SyntaxTree] Test `findFirstLeaf` and `findLastLeaf`

2020-09-21 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 293167. eduucaldas added a comment. Comment `generateAllTreesWithShape` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87779/new/ https://reviews.llvm.org/D87779 Files: clang/lib/Tooling/Syntax/Tree.cpp

[PATCH] D88024: [SyntaxTree][Nit] Take `ArrayRef` instead of `std::vector` as argument for `createTree`

2020-09-21 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. eduucaldas added a reviewer: gribozavr2. Herald added a project: clang. Herald added a subscriber: cfe-commits. eduucaldas requested review of this revision. I also assured that there are no other functions unnecessarily using std::vector as argument. Repositor

[PATCH] D88034: [SyntaxTree][Synthesis] Implement `deepCopyExpandingMacros`

2020-09-21 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. eduucaldas requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D88034 Files: clang/include/clang/Tooling/Syntax/BuildTree.h clang/lib/Tooling

[PATCH] D88024: [SyntaxTree][Nit] Take `ArrayRef` instead of `std::vector` as argument for `createTree`

2020-09-21 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1dc7836aed13: [SyntaxTree][Nit] Take `ArrayRef` instead of `std::vector` as argument for… (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D87779: [SyntaxTree] Test `findFirstLeaf` and `findLastLeaf`

2020-09-21 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGaf582c9b0f3a: [SyntaxTree] Test `findFirstLeaf` and `findLastLeaf` (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87779/new/ https:

[PATCH] D88034: [SyntaxTree][Synthesis] Implement `deepCopyExpandingMacros`

2020-09-22 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 293361. eduucaldas added a comment. Remove buggy `deepCopy` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88034/new/ https://reviews.llvm.org/D88034 Files: clang/include/clang/Tooling/Syntax/BuildTree.h

[PATCH] D88034: [SyntaxTree][Synthesis] Implement `deepCopyExpandingMacros`

2020-09-22 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 293363. eduucaldas added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88034/new/ https://reviews.llvm.org/D88034 Files: clang/include/clang/Tooling/Syntax/BuildTree.h clang/lib/Tooling/Syn

[PATCH] D88077: [SyntaxTree] Add tests for the assignment of the `canModify` tag.

2020-09-22 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. eduucaldas requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D88077 Files: clang/unittests/Tooling/Syntax/BuildTreeTest.cpp Index: clang/uni

[PATCH] D88034: [SyntaxTree][Synthesis] Fix: `deepCopy` -> `deepCopyExpandingMacros`.

2020-09-22 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG66bcb14312a0: [SyntaxTree][Synthesis] Fix: `deepCopy` -> `deepCopyExpandingMacros`. (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D8

[PATCH] D87839: [SyntaxTree] Test the List API

2020-09-22 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 293386. eduucaldas added a comment. - [SyntaxTree] Split `TreeTest` and `ListTest` testing fixtures. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87839/new/ https://reviews.llvm.org/D87839 Files: clang/i

[PATCH] D88077: [SyntaxTree] Add tests for the assignment of the `canModify` tag.

2020-09-22 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 293389. eduucaldas added a comment. Add FIXME for `MIN(X, Y)` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88077/new/ https://reviews.llvm.org/D88077 Files: clang/unittests/Tooling/Syntax/BuildTreeTest.c

[PATCH] D88077: [SyntaxTree] Add tests for the assignment of the `canModify` tag.

2020-09-22 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added a reviewer: gribozavr2. eduucaldas added inline comments. Comment at: clang/unittests/Tooling/Syntax/BuildTreeTest.cpp:3858 -TEST_P(BuildSyntaxTreeTest, NonModifiableNodes) { - // Some nodes are non-modifiable, they are marked with 'I:'. +TEST_P(BuildSyntaxTre

[PATCH] D87839: [SyntaxTree] Test the List API

2020-09-22 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added a reviewer: gribozavr2. eduucaldas added a comment. I made a separate class for the tests on Lists, as it didn't share any methods with the tests for Trees. What do you think about that? Should I also put the tests for lists in a different file, even though `TreeTest.cpp` could

[PATCH] D88077: [SyntaxTree] Add tests for the assignment of the `canModify` tag.

2020-09-22 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added a comment. Looking for feedback, specially on the names I used. Also if you have ideas of interesting tests they will be gladly accepted :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88077/new/ https://reviews.llvm.org/D88077

[PATCH] D88077: [SyntaxTree] Add tests for the assignment of the `canModify` tag.

2020-09-22 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6dc06fa09d1a: [SyntaxTree] Add tests for the assignment of the `canModify` tag. (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88077

[PATCH] D87839: [SyntaxTree] Test the List API

2020-09-22 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 293489. eduucaldas marked 3 inline comments as done. eduucaldas added a comment. Answer code review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87839/new/ https://reviews.llvm.org/D87839 Files: clang/i

[PATCH] D87839: [SyntaxTree] Test the List API

2020-09-22 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 293490. eduucaldas added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87839/new/ https://reviews.llvm.org/D87839 Files: clang/include/clang/Tooling/Syntax/Tree.h clang/unittests/Tooling/Sy

[PATCH] D87839: [SyntaxTree] Test the List API

2020-09-22 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas marked an inline comment as done. eduucaldas added inline comments. Comment at: clang/include/clang/Tooling/Syntax/Tree.h:224 + /// "a, b c" <=> [("a", ","), ("b", nul), ("c", nul)] + /// "a, b,"<=> [("a", ","), ("b", ","), (nul, nul)] /// g

[PATCH] D88106: [SyntaxTree] Provide iterator-like functions for Lists

2020-09-22 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. eduucaldas requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D88106 Files: clang/include/clang/Tooling/Syntax/Tree.h clang/lib/Tooling/Synt

[PATCH] D87839: [SyntaxTree] Test the List API

2020-09-22 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc3c08bfdfd62: [SyntaxTree] Test the List API (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87839/new/ https://reviews.llvm.org/D87

[PATCH] D88403: Migrate Declarators to use the List API

2020-09-28 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. eduucaldas requested review of this revision. After this change all nodes that have a delimited-list are using the `List` API. Implementation details: Let's look at a declaration with multiple

[PATCH] D88403: Migrate Declarators to use the List API

2020-09-28 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added a reviewer: gribozavr2. eduucaldas added inline comments. Comment at: clang/lib/Tooling/Syntax/BuildTree.cpp:594 +/// Shrink \p Range to a subrange that only contains tokens of a list. +ArrayRef shrinkToFitList(ArrayRef Range) { + auto BeginChildren

<    1   2   3   4   5   >