[PATCH] D82360: Add StringLiteral to SyntaxTree

2020-06-23 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. eduucaldas added a reviewer: gribozavr2. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D82360 Files: clang/include/clang/Tooling/Syntax/Nodes.h clang/lib/Tooling/Syntax/B

[PATCH] D82312: Add `CharLiteral` to SyntaxTree

2020-06-23 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas marked 2 inline comments as done. eduucaldas added inline comments. Comment at: clang/unittests/Tooling/Syntax/TreeTest.cpp:1266 + +TEST_P(SyntaxTreeTest, CharacterLiteralCxx11) { + if (!GetParam().isCXX11OrLater()) { Rename to `CharacterLiteralUtf`?

[PATCH] D82302: [Discussion] Interface for nodes related to id-expression

2020-06-24 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 273093. eduucaldas added a comment. remove union. or relation implemented as a parent-child relation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82302/new/ https://reviews.llvm.org/D82302 Files: clang/i

[PATCH] D82302: [Discussion] Interface for nodes related to id-expression

2020-06-24 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 273096. eduucaldas added a comment. Polishing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82302/new/ https://reviews.llvm.org/D82302 Files: clang/include/clang/Tooling/Syntax/Nodes.h Index: clang/inclu

[PATCH] D82485: Add tests for sequences of callbacks that RecursiveASTVisitor produces

2020-06-25 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas marked 2 inline comments as done. eduucaldas added inline comments. Comment at: clang/unittests/Tooling/RecursiveASTVisitorTests/Callbacks.cpp:1 +//===--- clang/unittests/Tooling/RecursiveASTVisitorTests/Callbacks.cpp ---===// +// I find this name too

[PATCH] D82310: Add `BoolLiteralExpression` to SyntaxTree

2020-06-25 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added inline comments. Comment at: clang/unittests/Tooling/Syntax/TreeTest.cpp:1240 + true; + false; +} gribozavr2 wrote: > eduucaldas wrote: > > gribozavr2 wrote: > > > C99 has bool literals, but the program should include stdbool.h. > > > > > > I

[PATCH] D82310: Add `BoolLiteralExpression` to SyntaxTree

2020-06-25 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 273310. eduucaldas marked 2 inline comments as done. eduucaldas added a comment. isC -> hasBoolType Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82310/new/ https://reviews.llvm.org/D82310 Files: clang/in

[PATCH] D82312: Add `CharLiteral` to SyntaxTree

2020-06-25 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 273343. eduucaldas marked 3 inline comments as done. eduucaldas added a comment. Add tests for unicode characters Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82312/new/ https://reviews.llvm.org/D82312 Fil

[PATCH] D82360: Add StringLiteral to SyntaxTree

2020-06-25 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 273346. eduucaldas added a comment. Add unicode tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82360/new/ https://reviews.llvm.org/D82360 Files: clang/include/clang/Tooling/Syntax/Nodes.h clang/lib

[PATCH] D82318: Add `FloatingLiteral` to SyntaxTree

2020-06-25 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 273347. eduucaldas marked an inline comment as done. eduucaldas added a comment. Fix indenting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82318/new/ https://reviews.llvm.org/D82318 Files: clang/include

[PATCH] D82310: Add `BoolLiteralExpression` to SyntaxTree

2020-06-25 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7f7f8564808b: Add `BoolLiteralExpression` to SyntaxTree (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82310/new/ https://reviews.l

[PATCH] D82312: Add `CharLiteral` to SyntaxTree

2020-06-25 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG221d7bbe49cc: Add `CharLiteral` to SyntaxTree (authored by eduucaldas). Changed prior to commit: https://reviews.llvm.org/D82312?vs=273343&id=273436#toc Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D82318: Add `FloatingLiteral` to SyntaxTree

2020-06-25 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7b404b6d0031: Add `FloatingLiteral` to SyntaxTree (authored by eduucaldas). Changed prior to commit: https://reviews.llvm.org/D82318?vs=273347&id=273437#toc Repository: rG LLVM Github Monorepo CHANG

[PATCH] D82360: Add StringLiteral to SyntaxTree

2020-06-25 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG466e8b7ea6e1: Add StringLiteral to SyntaxTree (authored by eduucaldas). Changed prior to commit: https://reviews.llvm.org/D82360?vs=273346&id=273438#toc Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D82312: Add `CharLiteral` to SyntaxTree

2020-06-26 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added a comment. In D82312#2116028 , @vvereschaka wrote: > Hello Eduardo, > > sorry, but one of your these commits break the clang unit tests on the > following builders: > > - http://lab.llvm.org:8011/builders/llvm-clang-x86_64-win-fast/builds

[PATCH] D82485: Add tests for sequences of callbacks that RecursiveASTVisitor produces

2020-06-26 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added a comment. A more general feedback. From our conversation one of the issues was that the tests wre only surfacing overriden methods. For instance, whenever we recorded a WalkUpFromExpr, and thus the callback showed up in the test, we actually did **not** walk up. Now, in all the

[PATCH] D82485: Add tests for sequences of callbacks that RecursiveASTVisitor produces

2020-06-29 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas accepted this revision. eduucaldas added inline comments. Comment at: clang/unittests/Tooling/RecursiveASTVisitorTests/Callbacks.cpp:117 + recordDefaultImplementation( + __func__, [&, this]() { RecordingVisitorBase::WalkUpFromStmt(S); }); + return tr

[PATCH] D82787: Make RecursiveASTVisitor call WalkUpFrom for unary and binary operators in post-order traversal mode

2020-06-30 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added inline comments. Comment at: clang/include/clang/AST/RecursiveASTVisitor.h:649 + case BO_##NAME: \ +if (isSameMethod(&RecursiveASTVisitor::TraverseBin##NAME, \ +

[PATCH] D82875: Added tests for RecursiveASTVisitor for AST nodes that are special cased

2020-06-30 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas accepted this revision. eduucaldas added inline comments. Comment at: clang/unittests/Tooling/RecursiveASTVisitorTests/Callbacks.cpp:501 WalkUpFromStmt IntegerLiteral(1) -WalkUpFromBinaryOperator BinaryOperator(+) - WalkUpFromExpr BinaryOperator(+) -WalkUpFromS

[PATCH] D82937: Fix `isInfixBinaryOp` that returned true for postfix ++

2020-07-01 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D82937 Files: clang/lib/AST/ExprCXX.cpp clang/unittests/Tooling/CMakeLists.txt clang/unittests/Tooling/CXXOperatorC

[PATCH] D82937: Fix `isInfixBinaryOp` that returned true for postfix ++

2020-07-01 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 274720. eduucaldas added a comment. nits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82937/new/ https://reviews.llvm.org/D82937 Files: clang/lib/AST/ExprCXX.cpp clang/unittests/Tooling/CMakeLists.txt

[PATCH] D82937: Fix `isInfixBinaryOp` that returned true for postfix ++

2020-07-01 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added a reviewer: gribozavr2. eduucaldas marked 2 inline comments as done. eduucaldas added inline comments. Comment at: clang/unittests/Tooling/CXXOperatorCallExprTest.cpp:1 +//===- unittests/Tooling/CXXOperatorCallExprTest.cpp --===// +// ---

[PATCH] D85146: [SyntaxTree] Fix crash on pointer to member function

2020-08-03 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/D85146 Files: clang/lib/Tooling/Syntax/BuildTree.cpp clang/unittests/Tooling/S

[PATCH] D85146: [SyntaxTree] Fix crash on pointer to member function

2020-08-03 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added a comment. Additionally deleting TraverseParenTypeLoc changes nothing in the tests. I can also investigate that, I can try to come up with a test that makes this Traverse override relevant and if I'm not able, I would remove this override. Comment at: clang/u

[PATCH] D85146: [SyntaxTree] Fix crash on pointer to member function

2020-08-04 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 282814. eduucaldas marked 2 inline comments as done. eduucaldas added a comment. answer comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85146/new/ https://reviews.llvm.org/D85146 Files: clang/lib/T

[PATCH] D85185: [SyntaxTree] Add test coverage for `->*` operator

2020-08-04 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. This was the last binary operator that we supported but didn't have any test coverage. The recent fix in a crash in member pointers allowed us to a

[PATCH] D85186: [SyntaxTree] Add support for `LiteralExpression`

2020-08-04 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. We use inheritance to model the grammar's disjunction rule: literal: integer-literal character-literal floating-point-literal string-liter

[PATCH] D85186: [SyntaxTree] Add support for `LiteralExpression`

2020-08-04 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 rG860cbbdd6b84: [SyntaxTree] Add support for `LiteralExpression` (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D85146: [SyntaxTree] Fix crash on pointer to member function

2020-08-04 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8ce15f7eeb12: [SyntaxTree] Fix crash on pointer to member function (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85146/new/ https:

[PATCH] D85185: [SyntaxTree] Add test coverage for `->*` operator

2020-08-05 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 283144. eduucaldas added a comment. Answer comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85185/new/ https://reviews.llvm.org/D85185 Files: clang/unittests/Tooling/Syntax/TreeTest.cpp Index: cla

[PATCH] D85185: [SyntaxTree] Add test coverage for `->*` operator

2020-08-05 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 rGc5cdc3e801ad: [SyntaxTree] Add test coverage for `->*` operator (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D85295: [SyntaxTree] Implement the List construct.

2020-08-05 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. We defined a List construct to help with the implementation of list-like grammar rules. This is a first implementation of this API. Repository:

[PATCH] D85295: [SyntaxTree] Implement the List construct.

2020-08-05 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added a reviewer: gribozavr2. eduucaldas added inline comments. Comment at: clang/include/clang/Tooling/Syntax/Tree.h:223 + + // These can't be implemented with the information we have! + As this is a base List, we don't have the necessary informatio

[PATCH] D85305: [SyntaxTree] Remove dead code on dump functions

2020-08-05 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. - `Node::dumpTokens` was never used. - `::dumpTokens(llvm::raw_ostream, ArrayRef, const SourceManager &SM)` was used twice, once by `Node::dumpTok

[PATCH] D85316: [SyntaxTree] Proposition of new tree dump

2020-08-05 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. Some key choices to highlight: - Surround Tokens with "''" - Do not print `UnknownRole`, to reduce noise - Surround Roles with "<", to clarify the

[PATCH] D85330: [SyntaxTree] Extend the syntax tree dump

2020-08-05 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. Functional changes in the dump: - Surround Leaf tokens with `'` - Append `Node` dumps with `NodeRole` information, except for unknown roles Non-

[PATCH] D85316: [SyntaxTree] Proposition of new tree dump

2020-08-05 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 283298. eduucaldas added a comment. Answering comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85316/new/ https://reviews.llvm.org/D85316 Files: clang/unittests/Tooling/Syntax/TreeTest.cpp Index:

[PATCH] D85330: [SyntaxTree] Extend the syntax tree dump

2020-08-05 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 283305. eduucaldas added a comment. Rollback strOfLeaf Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85330/new/ https://reviews.llvm.org/D85330 Files: clang/include/clang/Tooling/Syntax/Tree.h clang/lib

[PATCH] D85330: [SyntaxTree] Extend the syntax tree dump

2020-08-06 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 283506. eduucaldas added a comment. Answer comment. Please suggest more descriptive markers. Options I thought of: `I` -> `unmodifiable` `M` -> `not backed by source code` / `synthesized` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D85316: [SyntaxTree] Proposition of new tree dump

2020-08-06 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 283513. eduucaldas added a comment. Reflect comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85316/new/ https://reviews.llvm.org/D85316 Files: clang/unittests/Tooling/Syntax/TreeTest.cpp Index: cl

[PATCH] D85316: [SyntaxTree] Proposition of new tree dump

2020-08-06 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added inline comments. Comment at: clang/unittests/Tooling/Syntax/TreeTest.cpp:3363 +| |-'if' IntroducerKeyword I +| |-'(' I +| |-BinaryOperatorExpression I Some points to make a decision. What should be the order of these extra informatio

[PATCH] D85295: [SyntaxTree] Implement the List construct.

2020-08-06 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added inline comments. Comment at: clang/include/clang/Tooling/Syntax/Tree.h:197 + MaybeTerminated, + Separated, +}; gribozavr2 wrote: > Add a "WithoutDelimiters" case as well? I think we might want to treat non-delimited-list in another way. as many

[PATCH] D85295: [SyntaxTree] Implement the List construct.

2020-08-06 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 283536. eduucaldas marked 9 inline comments as done. eduucaldas added a comment. Answer comments non-delimited-lists need further discussion Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85295/new/ https://

[PATCH] D85427: [SyntaxTree][NFC] remove redundant namespace-specifiers

2020-08-06 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/D85427 Files: clang/include/clang/Tooling/Syntax/Nodes.h clang/include/clang/T

[PATCH] D84348: WIP: Add complete id-expression support to syntax trees

2020-08-06 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 283622. eduucaldas added a comment. - Update comments to reflect change in API. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84348/new/ https://reviews.llvm.org/D84348 Files: clang/include/clang/Tooling/

[PATCH] D84781: Use PointerUnion instead of inheritance for alternative clauses in NNS

2020-08-06 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 283627. eduucaldas added a comment. - [SyntaxTree] Fix crash on name specifier. This diff revision is based on https://reviews.llvm.org/D84348 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84781/new/ https:

[PATCH] D85439: [SyntaxTree] Expand support for `NestedNameSpecifier`

2020-08-06 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. We want NestedNameSpecifier syntax nodes to be generally supported, not only for `DeclRefExpr` and `DependentScopedDeclRefExpr`. To achieve this w

[PATCH] D85440: [SyntaxTree] Implement `NNS` using the `List` base API

2020-08-06 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/D85440 Files: clang/include/clang/Tooling/Syntax/Nodes.h clang/include/clang/T

[PATCH] D85439: [SyntaxTree] Expand support for `NestedNameSpecifier`

2020-08-06 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:227-254 +namespace llvm { +template <> struct DenseMapInfo { + using FirstInfo = DenseMapInfo; + using SecondInfo = DenseMapInfo; + + static inline Nes

[PATCH] D85440: [SyntaxTree] Implement `NNS` using the `List` base API

2020-08-06 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 283638. eduucaldas added a comment. Clean List specific code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85440/new/ https://reviews.llvm.org/D85440 Files: clang/include/clang/Tooling/Syntax/Nodes.h cl

[PATCH] D85440: [SyntaxTree] Implement `NNS` using the `List` base API

2020-08-06 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 283643. eduucaldas added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85440/new/ https://reviews.llvm.org/D85440 Files: clang/include/clang/Tooling/Syntax/Nodes.h clang/lib/Tooling/Syntax/

[PATCH] D84781: [SyntaxTree] Use PointerUnion instead of inheritance for alternative clauses in NNS

2020-08-06 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added inline comments. Comment at: clang/lib/Tooling/Syntax/BuildTree.cpp:788-789 - -// Remove "::" from the `SourceRange` -SR.setEnd(SR.getEnd().getLocWithOffset(-1)); Newbie mistake causing the crash Comment at: clang/lib

[PATCH] D85427: [SyntaxTree][NFC] remove redundant namespace-specifiers

2020-08-06 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 283659. eduucaldas added a comment. removed namespace specifiers `llvm::` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85427/new/ https://reviews.llvm.org/D85427 Files: clang/include/clang/Tooling/Syntax

[PATCH] D85295: [SyntaxTree] Implement the List construct.

2020-08-06 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added inline comments. Comment at: clang/include/clang/Tooling/Syntax/Tree.h:247 + + TerminationKind getTerminationKind(); + gribozavr2 wrote: > I just realized that the rest of the syntax tree API does not use the `get~` > prefix. However, most of C

[PATCH] D84348: WIP: Add complete id-expression support to syntax trees

2020-08-06 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added inline comments. Comment at: clang/lib/Tooling/Syntax/BuildTree.cpp:789 +// Remove "::" from the `SourceRange` +SR.setEnd(SR.getEnd().getLocWithOffset(-1)); + Newbie mistake. Corrected in latter commit Repository: rG LLVM Github Monor

[PATCH] D85427: [SyntaxTree][NFC] remove redundant namespace-specifiers

2020-08-07 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 rGba41a0f7339c: [SyntaxTree][NFC] remove redundant namespace-specifiers (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D84348: WIP: Add complete id-expression support to syntax trees

2020-08-07 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 283875. eduucaldas added a comment. rebase to add this commit from a further patch - [SyntaxTree] Fix crash on name specifier. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84348/new/ https://reviews.llvm.o

[PATCH] D84781: [SyntaxTree] Use PointerUnion instead of inheritance for alternative clauses in NNS

2020-08-07 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 283876. eduucaldas added a comment. Remove Fix crash on name specifier commit from patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84781/new/ https://reviews.llvm.org/D84781 Files: clang/include/clang

[PATCH] D84348: WIP: Add complete id-expression support to syntax trees

2020-08-07 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 283989. eduucaldas added a comment. Last version sent upstream Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84348/new/ https://reviews.llvm.org/D84348 Files: clang/include/clang/Tooling/Syntax/Nodes.h

[PATCH] D85439: [SyntaxTree] Expand support for `NestedNameSpecifier`

2020-08-10 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 284284. eduucaldas added a comment. Move to using inheritance Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85439/new/ https://reviews.llvm.org/D85439 Files: clang/include/clang/AST/NestedNameSpecifier.h

[PATCH] D85439: [SyntaxTree] Expand support for `NestedNameSpecifier`

2020-08-10 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 284285. eduucaldas added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85439/new/ https://reviews.llvm.org/D85439 Files: clang/include/clang/AST/NestedNameSpecifier.h clang/lib/Tooling/Synt

[PATCH] D85439: [SyntaxTree] Expand support for `NestedNameSpecifier`

2020-08-10 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas marked 2 inline comments as done. eduucaldas added a comment. Now NNS are based on inheritance! Comment at: clang/lib/Tooling/Syntax/BuildTree.cpp:849-850 + const auto TL = NNSLoc.getTypeLoc().castAs(); + if (!RecursiveASTVisitor::TraverseDecltypeTypeLoc(TL

[PATCH] D84348: [SyntaxTree] Use simplified grammar rule for `NestedNameSpecifier` grammar nodes

2020-08-10 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas closed this revision. eduucaldas added a comment. commit hash 8abb5fb68f81b0e42d824bf080b1cef9a61559d6 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84348/new/ https:

[PATCH] D85295: [SyntaxTree] Implement the List construct.

2020-08-10 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 284292. 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/D85295/new/ https://reviews.llvm.org/D85295 Files: clang/in

[PATCH] D85295: [SyntaxTree] Implement the List construct.

2020-08-10 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added inline comments. Comment at: clang/include/clang/Tooling/Syntax/Tree.h:249 + + /// Return whether *under valid code* the list can be empty. + /// gribozavr2 wrote: > "Whether this list can be empty in syntactically and semantically correct > c

[PATCH] D85295: [SyntaxTree] Implement the List construct.

2020-08-10 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 rGa90c78ac5261: [SyntaxTree] Implement the List construct. (authored by eduucaldas). Changed prior to commit: https://reviews.llvm.org/D85295?vs=284

[PATCH] D85440: [SyntaxTree] Implement `NNS` using the `List` base API

2020-08-10 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 284324. eduucaldas added a comment. Implement `canBeEmpty`, `getDelimiterToken`, `getTerminationKind` for `NestedNameSpecifier` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85440/new/ https://reviews.llvm.

[PATCH] D85440: [SyntaxTree] Implement `NNS` using the `List` base API

2020-08-10 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 284342. eduucaldas added a comment. Answer comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85440/new/ https://reviews.llvm.org/D85440 Files: clang/include/clang/Tooling/Syntax/Nodes.h clang/lib/T

[PATCH] D85440: [SyntaxTree] Implement `NNS` using the `List` base API

2020-08-10 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 284344. eduucaldas added a comment. lint Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85440/new/ https://reviews.llvm.org/D85440 Files: clang/include/clang/Tooling/Syntax/Nodes.h clang/lib/Tooling/Synt

[PATCH] D85439: [SyntaxTree] Expand support for `NestedNameSpecifier`

2020-08-10 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added a comment. There are some refinements to do, to generate a complete syntax tree. Namely tag decltype-name-specifier and simple-template-specifier children with roles, to allow for accessors. Comment at: clang/lib/Tooling/Syntax/BuildTree.cpp:838-842 + //

[PATCH] D85439: [SyntaxTree] Expand support for `NestedNameSpecifier`

2020-08-10 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 284387. eduucaldas marked 6 inline comments as done and 2 inline comments as done. eduucaldas added a comment. Answer comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85439/new/ https://reviews.llvm.or

[PATCH] D85713: [SyntaxTree]: Use Annotations in tests to reduce noise

2020-08-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/D85713 Files: clang/unittests/Tooling/Syntax/TreeTest.cpp Index: clang/unittest

[PATCH] D85713: [SyntaxTree]: Use Annotations in tests to reduce noise

2020-08-11 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 284610. eduucaldas added a comment. Use unsigned long in the loop index Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85713/new/ https://reviews.llvm.org/D85713 Files: clang/unittests/Tooling/Syntax/TreeT

[PATCH] D85713: [SyntaxTree]: Use Annotations in tests to reduce noise

2020-08-11 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added a reviewer: gribozavr2. eduucaldas added a comment. A proposition, upon review I'll change other tests. One concern is that we might lose coverage while reducing noise. But I'll take a look into that with calm when changing the tests. Comment at: clang/unitte

[PATCH] D85713: [SyntaxTree]: Use Annotations in tests to reduce noise

2020-08-11 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 284678. eduucaldas added a comment. Use annotations to reduce noise of expression tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85713/new/ https://reviews.llvm.org/D85713 Files: clang/unittests/Tool

[PATCH] D85750: [SyntaxTree] Unbox operators into tokens for nodes generated from `CXXOperatorCallExpr`

2020-08-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. For an user define `<`, `x < y` would yield the syntax tree: BinaryOperatorExpression |-IdExpression | `-UnqualifiedId | `-x |-IdExpre

[PATCH] D85750: [SyntaxTree] Unbox operators into tokens for nodes generated from `CXXOperatorCallExpr`

2020-08-11 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 284794. eduucaldas added a comment. Add explanation comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85750/new/ https://reviews.llvm.org/D85750 Files: clang/lib/Tooling/Syntax/BuildTree.cpp clang/

[PATCH] D85750: [SyntaxTree] Unbox operators into tokens for nodes generated from `CXXOperatorCallExpr`

2020-08-11 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:1024 + // representation of built-in and user-defined operators. + if (child->getBeginLoc() == S->getOperatorLoc()) +continue; -

[PATCH] D85750: [SyntaxTree] Unbox operators into tokens for nodes generated from `CXXOperatorCallExpr`

2020-08-12 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 284988. eduucaldas marked 3 inline comments as done. eduucaldas added a comment. use arguments instead of children Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85750/new/ https://reviews.llvm.org/D85750 Fi

[PATCH] D85750: [SyntaxTree] Unbox operators into tokens for nodes generated from `CXXOperatorCallExpr`

2020-08-12 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added inline comments. Comment at: clang/lib/Tooling/Syntax/BuildTree.cpp:1024 + // representation of built-in and user-defined operators. + if (child->getBeginLoc() == S->getOperatorLoc()) +continue; gribozavr2 wrote: > eduucaldas wr

[PATCH] D85750: [SyntaxTree] Unbox operators into tokens for nodes generated from `CXXOperatorCallExpr`

2020-08-12 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGac37afa65027: [SyntaxTree] Unbox operators into tokens for nodes generated from… (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D8575

[PATCH] D85819: [SyntaxTree] Split tests

2020-08-12 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. We do that because: - Big tests generated big tree dumps that could hardly serve as documentation. - In most cases the tests didn't share setup, t

[PATCH] D85819: [SyntaxTree] Split tests

2020-08-12 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added a comment. Before we had an UnqualifiedId test that tested for everything in the grammar . Now we just split this test and test the alternatives separately. Comment at: clang/unittests/Tooling/Syntax/TreeTest.cpp:6

[PATCH] D85819: [SyntaxTree] Split tests

2020-08-12 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 285035. eduucaldas added a comment. Split tests for `UserDefinedLiteral` Split tests for `NumericUserDefinedLiteral` Split tests for `NestedBinaryOperator` Split tests for `UserDefinedBinaryOperator` Split tests for `UserDefinedPrefixOperator` Repository:

[PATCH] D85819: [SyntaxTree] Split tests

2020-08-12 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 285070. eduucaldas added a comment. - [SyntaxTree] Split tests for `QualifiedId` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85819/new/ https://reviews.llvm.org/D85819 Files: clang/unittests/Tooling/Syn

[PATCH] D85819: [SyntaxTree] Split tests

2020-08-12 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 285071. eduucaldas added a comment. Rename tests following `TestSuite_TestCase` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85819/new/ https://reviews.llvm.org/D85819 Files: clang/unittests/Tooling/Synt

[PATCH] D85819: [SyntaxTree] Split tests

2020-08-12 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added inline comments. Comment at: clang/unittests/Tooling/Syntax/TreeTest.cpp:1005 + +TEST_P(SyntaxTreeTest, QualifiedIdWithNamespace) { + if (!GetParam().isCXX()) { Here I didn't merely split the tests, I also changed them a bit. PTAL. ==

[PATCH] D85842: Fix `NestedNameSpecifierLoc::getLocalSourceRange()`

2020-08-12 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. >From the documentation comment above >`NestedNameSpecifierLoc::getLocalSourceRange()` /// Retrieve the source range covering just the last par

[PATCH] D85842: Fix `NestedNameSpecifierLoc::getLocalSourceRange()`

2020-08-12 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 285122. eduucaldas added a comment. Don't assume the code is completely correct Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85842/new/ https://reviews.llvm.org/D85842 Files: clang/lib/AST/NestedNameSpec

[PATCH] D85842: Fix `NestedNameSpecifierLoc::getLocalSourceRange()`

2020-08-12 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 285129. eduucaldas added a comment. Update comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85842/new/ https://reviews.llvm.org/D85842 Files: clang/lib/AST/NestedNameSpecifier.cpp Index: clang/lib/

[PATCH] D85842: Fix `NestedNameSpecifierLoc::getLocalSourceRange()`

2020-08-12 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added a comment. Unit tests will be provided once we decide that this is the way to go ;) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85842/new/ https://reviews.llvm.org/D85842 ___ cfe-commi

[PATCH] D85842: Fix `NestedNameSpecifierLoc::getLocalSourceRange()`

2020-08-12 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 285265. eduucaldas added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85842/new/ https://reviews.llvm.org/D85842 Files: clang/lib/AST/NestedNameSpecifier.cpp Index: clang/lib/AST/NestedNam

[PATCH] D85819: [SyntaxTree] Split tests

2020-08-13 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 285273. eduucaldas marked 11 inline comments as done. eduucaldas added a comment. Answer review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85819/new/ https://reviews.llvm.org/D85819 Files: cla

[PATCH] D85819: [SyntaxTree] Split tests

2020-08-13 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added inline comments. Comment at: clang/unittests/Tooling/Syntax/TreeTest.cpp:2805 -TEST_P(SyntaxTreeTest, UserDefinedBinaryOperator) { +TEST_P(SyntaxTreeTest, UserDefinedOperator_Assignment) { if (!GetParam().isCXX()) { gribozavr2 wrote: > UserD

[PATCH] D85819: [SyntaxTree] Split tests

2020-08-13 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added inline comments. Comment at: clang/unittests/Tooling/Syntax/TreeTest.cpp:1546-1548 +unsigned operator "" _r(const char*); +template +unsigned operator "" _t(); eduucaldas wrote: > Same setup for `FloatUserDefinedLiteral`. I think it is justified

[PATCH] D85819: [SyntaxTree] Split tests

2020-08-13 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added a comment. We'll split this file in a future change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85819/new/ https://reviews.llvm.org/D85819 ___ cfe-commits mailing list cfe-commits@list

[PATCH] D85819: [SyntaxTree] Split tests

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 rGd1211fd1ec03: [SyntaxTree] Split tests for expressions (authored by eduucaldas). Changed prior to commit: https://reviews.llvm.org/D85819?vs=28527

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

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. We extract the test infrastructure into `TreeTestBase.h` and split the tests into `MutationsTest.cpp` and `BuildTreeTest.cpp` Repository:

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

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. We extract the test infrastructure into `TreeTestBase.h` and split the tests into `MutationsTest.cpp` and `BuildTreeTest.cpp` Repository:

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

2020-08-13 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/D85898 Files: clang/unittests/Tooling/Syntax/BuildTreeTest.cpp clang/unittests

<    1   2   3   4   5   >