#
466e8b7e |
| 25-Jun-2020 |
Eduardo Caldas <ecaldas@google.com> |
Add StringLiteral to SyntaxTree
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82360
|
#
221d7bbe |
| 25-Jun-2020 |
Eduardo Caldas <ecaldas@google.com> |
Add `CharLiteral` to SyntaxTree
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82312
|
#
7f7f8564 |
| 22-Jun-2020 |
Eduardo Caldas <ecaldas@google.com> |
Add `BoolLiteralExpression` to SyntaxTree
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82310
|
#
1b2f6b4a |
| 18-Jun-2020 |
Eduardo Caldas <ecaldas@google.com> |
Add support for DeclRefExpr in SyntaxTree, by generating IdExpressions
Reviewers: gribozavr2
Reviewed By: gribozavr2
Subscribers: hlopko, gribozavr2, cfe-commits
Tags: #clang
Differential Revisi
Add support for DeclRefExpr in SyntaxTree, by generating IdExpressions
Reviewers: gribozavr2
Reviewed By: gribozavr2
Subscribers: hlopko, gribozavr2, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D81168
show more ...
|
#
2c63ea6e |
| 08-Jun-2020 |
Shengchen Kan <shengchen.kan@intel.com> |
[TEST] TreeTest.cpp - Add a comma to avoid build error with -werror
Summary: The macro `INSTANTIATE_TEST_CASE_P` is defined as ``` \# define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator
[TEST] TreeTest.cpp - Add a comma to avoid build error with -werror
Summary: The macro `INSTANTIATE_TEST_CASE_P` is defined as ``` \# define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator, ...) \ ... ```
If we build the test case with -werror, we will get an error like ``` error: ISO C++11 requires at least one argument for the "..." in a variadic macro
testing::ValuesIn(TestClangConfig::allConfigs())); ^ ``` This patch fixes that.
Reviewers: gribozavr, hlopko, eduucaldas, gribozavr2
Reviewed By: gribozavr2
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D81388
show more ...
|
#
3b739690 |
| 04-Jun-2020 |
Eduardo Caldas <ecaldas@google.com> |
Add support for IntegerLiteral in SyntaxTree
Reviewers: gribozavr2
Reviewed By: gribozavr2
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D81135
|
#
06cf7adc |
| 04-Jun-2020 |
Dmitri Gribenko <gribozavr@gmail.com> |
Make syntax tree test print the line number when it fails
Summary: The syntax tree test uses a helper function that executes all testing assertions. When an assertion fails, the only line number tha
Make syntax tree test print the line number when it fails
Summary: The syntax tree test uses a helper function that executes all testing assertions. When an assertion fails, the only line number that gets printed to the log refers to the helper function. After this change, we would also get the line number of the EXPECT_TRUE macro invocation (unfortunately, the line number of the last token of it, not the first one, but there's not much I can do about it).
Reviewers: hlopko, eduucaldas
Reviewed By: hlopko, eduucaldas
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D81107
show more ...
|
#
007098d7 |
| 03-Jun-2020 |
Eduardo Caldas <ecaldas@google.com> |
Add support for `nullptr` in SyntaxTrees
Reviewers: gribozavr2
Reviewed By: gribozavr2
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D81092
|
#
d7d5dd31 |
| 03-Jun-2020 |
Dmitri Gribenko <gribozavr@gmail.com> |
Split syntax tree tests into more granular ones
Summary: Doing so allows us to increase test coverage by removing unnecessary language restrictions.
Reviewers: hlopko, eduucaldas
Reviewed By: hlop
Split syntax tree tests into more granular ones
Summary: Doing so allows us to increase test coverage by removing unnecessary language restrictions.
Reviewers: hlopko, eduucaldas
Reviewed By: hlopko, eduucaldas
Subscribers: gribozavr2, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D81040
show more ...
|
#
b34b7691 |
| 03-Jun-2020 |
Dmitri Gribenko <gribozavr@gmail.com> |
Syntax tree: ignore implicit expressions at the top level of statements
Summary: I changed `markStmtChild` to ignore implicit expressions the same way as `markExprChild` does it already. The test th
Syntax tree: ignore implicit expressions at the top level of statements
Summary: I changed `markStmtChild` to ignore implicit expressions the same way as `markExprChild` does it already. The test that I modified crashes without this change.
Reviewers: hlopko, eduucaldas
Reviewed By: hlopko, eduucaldas
Subscribers: gribozavr2, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D81019
show more ...
|
#
53c29a42 |
| 02-Jun-2020 |
Dmitri Gribenko <gribozavr@gmail.com> |
Reinstate the syntax tree test for 'static' in an array subscript
Reviewers: eduucaldas
Reviewed By: eduucaldas
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.
Reinstate the syntax tree test for 'static' in an array subscript
Reviewers: eduucaldas
Reviewed By: eduucaldas
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D81009
show more ...
|
#
d559185a |
| 02-Jun-2020 |
Dmitri Gribenko <gribozavr@gmail.com> |
Renamed Lang_C to Lang_C99, Lang_CXX to Lang_CXX03, and 2a to 20
Summary: I think we would be better off with tests explicitly specifying the language mode. Right now Lang_C means C99, but reads as
Renamed Lang_C to Lang_C99, Lang_CXX to Lang_CXX03, and 2a to 20
Summary: I think we would be better off with tests explicitly specifying the language mode. Right now Lang_C means C99, but reads as "any C version", or as "unspecified C version".
I also changed '-std=c++98' to '-std=c++03' because they are aliases (so there is no difference in practice), because Clang implements C++03 rules in practice, and because 03 makes a nice sortable progression between 03, 11, 14, 17, 20.
Reviewers: shafik, hlopko
Reviewed By: hlopko
Subscribers: jfb, martong, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D81000
show more ...
|
#
44f989e7 |
| 02-Jun-2020 |
Dmitri Gribenko <gribozavr@gmail.com> |
Run syntax tree tests in many language modes
Reviewers: hlopko, eduucaldas
Reviewed By: hlopko, eduucaldas
Subscribers: gribozavr2, mgorny, cfe-commits
Tags: #clang
Differential Revision: https:
Run syntax tree tests in many language modes
Reviewers: hlopko, eduucaldas
Reviewed By: hlopko, eduucaldas
Subscribers: gribozavr2, mgorny, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D80822
show more ...
|
#
3a574a6c |
| 29-May-2020 |
Eduardo Caldas <ecaldas@google.com> |
Add support for Overloaded Binary Operators in SyntaxTree
Reviewers: gribozavr2
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D80812
|
#
eca41919 |
| 28-May-2020 |
Eduardo Caldas <ecaldas@google.com> |
Improve test infrastructure in SyntaxTree
Summary: * Test if the code sourcing the SyntaxTree compiles * Output compiler errors and warnings to err * Fix tests with code that did not compile
Review
Improve test infrastructure in SyntaxTree
Summary: * Test if the code sourcing the SyntaxTree compiles * Output compiler errors and warnings to err * Fix tests with code that did not compile
Reviewers: gribozavr2
Reviewed By: gribozavr2
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D80731
show more ...
|
#
461af57d |
| 27-May-2020 |
Eduardo Caldas <ecaldas@google.com> |
Add support for UnaryOperator in SyntaxTree
Reviewers: gribozavr2
Reviewed By: gribozavr2
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D80624
|
#
3785eb83 |
| 26-May-2020 |
Eduardo Caldas <ecaldas@google.com> |
Add support for binary operators in Syntax Trees
Reviewers: gribozavr2
Reviewed By: gribozavr2
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D80540
|
Revision tags: llvmorg-10.0.1-rc1 |
|
#
1bf055c9 |
| 07-Apr-2020 |
Marcel Hlopko <hlopko@google.com> |
[Syntax] Add mapping from spelled to expanded tokens for TokenBuffer
Summary: Same restrictions apply as in the other direction: macro arguments are not supported yet, only full macro expansions can
[Syntax] Add mapping from spelled to expanded tokens for TokenBuffer
Summary: Same restrictions apply as in the other direction: macro arguments are not supported yet, only full macro expansions can be mapped.
Taking over from https://reviews.llvm.org/D72581.
Reviewers: gribozavr2, sammccall
Reviewed By: gribozavr2
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D77209
show more ...
|
#
cdce2fe5 |
| 31-Mar-2020 |
Marcel Hlopko <hlopko@google.com> |
[Syntax] Remove delayed folding from tree building.
Summary: This patch removes delayed folding and replaces it with forward peeking.
Delayed folding was previously used as a solution to the proble
[Syntax] Remove delayed folding from tree building.
Summary: This patch removes delayed folding and replaces it with forward peeking.
Delayed folding was previously used as a solution to the problem that declaration doesn't have a representation in the AST. For example following code:
``` int a,b; ```
is expressed in the AST as:
``` TranslationUnitDecl |-... |-VarDecl `int a` `-VarDecl `int b` ```
And in the syntax tree we need:
``` *: TranslationUnit `-SimpleDeclaration |-int |-SimpleDeclarator | `-a |-, |-SimpleDeclarator | `-b |-; ```
So in words, we need to create SimpleDeclaration to be a parent of SimpleDeclarator nodes. Previously we used delayed folding to make sure SimpleDeclarations will be eventually created. And in case multiple declarators requested declaration creation, declaration range was extended to cover all declarators.
This design started to be hard to reason about, so we decided to replace it with forward peeking. The last declarator node in the chain is responsible for creating SimpleDeclaration for the whole chain. Range of the declaration corresponds to the source range of the declarator node. Declarator decides whether its the last one by peeking to the next AST node (see `isResponsibleForCreatingDeclaration`).
This patch does following: * Removed delayed folding logic * Tweaks Token.dumpForTests * Moves getQualifiedNameStart inside BuildTreeVisitor * Extracts BuildTreeVisitor.ProcessDeclaratorAndDeclaration * Renames Builder.getDeclRange to Builder.getDeclarationRange and uses the method in all places. * Adds a bunch of tests
Reviewers: gribozavr2
Reviewed By: gribozavr2
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D76922
show more ...
|
Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6 |
|
#
eddede9d |
| 20-Mar-2020 |
Marcel Hlopko <hlopko@google.com> |
[Syntax] Test both the default and windows target platforms in unittests
Summary: This increases the coverage for things that differ between Linux and Windows, such as -fdelayed-template-parsing. Th
[Syntax] Test both the default and windows target platforms in unittests
Summary: This increases the coverage for things that differ between Linux and Windows, such as -fdelayed-template-parsing. This would have prevented the rollback of https://reviews.llvm.org/D76346.
While at it, update -std=c++11 to c++17 for the test.
Reviewers: gribozavr2
Reviewed By: gribozavr2
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D76497
show more ...
|
#
9967352a |
| 20-Mar-2020 |
Dmitri Gribenko <gribozavr@gmail.com> |
Revert "[Syntax] Test both the default and windows target platforms in unittests"
This reverts commit fd7300f717c18c861e77685efe6f16f12fb63ae7. The fix in this patch didn't help and the Windows buil
Revert "[Syntax] Test both the default and windows target platforms in unittests"
This reverts commit fd7300f717c18c861e77685efe6f16f12fb63ae7. The fix in this patch didn't help and the Windows buildbot broke: http://45.33.8.238/win/10881/step_7.txt
show more ...
|
#
fd7300f7 |
| 20-Mar-2020 |
Marcel Hlopko <hlopko@google.com> |
[Syntax] Test both the default and windows target platforms in unittests
Summary: This increases the coverage for things that differ between Linux and Windows, such as `-fdelayed-template-parsing`.
[Syntax] Test both the default and windows target platforms in unittests
Summary: This increases the coverage for things that differ between Linux and Windows, such as `-fdelayed-template-parsing`. This would have prevented the rollback of https://reviews.llvm.org/D76346.
While at it, update -std=c++11 to c++17 for the test.
Reviewers: gribozavr2
Reviewed By: gribozavr2
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D76433
show more ...
|
#
e9630630 |
| 20-Mar-2020 |
Marcel Hlopko <hlopko@google.com> |
[Syntax] Split syntax tests
Summary: This patch split Basic test into multple individual tests to allow simpler filtering and clearer signal into what's broken when it's broken.
Reviewers: gribozav
[Syntax] Split syntax tests
Summary: This patch split Basic test into multple individual tests to allow simpler filtering and clearer signal into what's broken when it's broken.
Reviewers: gribozavr2
Reviewed By: gribozavr2
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D76366
show more ...
|
#
88bf9b3d |
| 19-Mar-2020 |
Marcel Hlopko <hlopko@google.com> |
[Syntax] Build template declaration nodes
Summary: Rollforward of https://reviews.llvm.org/rGdd12826808f9079e164b82e64b0697a077379241 after temporarily adding -fno-delayed-template-parsing to the Tr
[Syntax] Build template declaration nodes
Summary: Rollforward of https://reviews.llvm.org/rGdd12826808f9079e164b82e64b0697a077379241 after temporarily adding -fno-delayed-template-parsing to the TreeTest.
Original summary:
> Copy of https://reviews.llvm.org/D72334, submitting with Ilya's permission. > > Handles template declaration of all kinds. > > Also builds template declaration nodes for specializations and explicit > instantiations of classes. > > Some missing things will be addressed in the follow-up patches: > > * specializations of functions and variables, > * template parameters.
Reviewers: gribozavr2
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D76418
show more ...
|
Revision tags: llvmorg-10.0.0-rc5 |
|
#
881f5b5a |
| 18-Mar-2020 |
Nico Weber <thakis@chromium.org> |
Revert "[Syntax] Build template declaration nodes"
This reverts commit dd12826808f9079e164b82e64b0697a077379241. Breaks tests on Windows, see https://reviews.llvm.org/D76346#1929208
|