Revision tags: llvmorg-21-init |
|
#
12f78e74 |
| 18-Jan-2025 |
Sirraide <aeternalmail@gmail.com> |
[Clang] [NFC] Fix unintended `-Wreturn-type` warnings everywhere in the test suite (#123464)
In preparation of making `-Wreturn-type` default to an error (as there is virtually no situation where yo
[Clang] [NFC] Fix unintended `-Wreturn-type` warnings everywhere in the test suite (#123464)
In preparation of making `-Wreturn-type` default to an error (as there is virtually no situation where you’d *want* to fall off the end of a function that is supposed to return a value), this patch fixes tests that have relied on this being only a warning, of which there seem to be 3 kinds:
1. Tests which for no apparent reason have a function that triggers the warning.
I suspect that a lot of these were on accident (or from before the warning was introduced), since a lot of people will open issues w/ their problematic code in the `main` function (which is the one case where you don’t need to return from a non-void function, after all...), which someone will then copy, possibly into a namespace, possibly renaming it, the end result of that being that you end up w/ something that definitely is not `main` anymore, but which still is declared as returning `int`, and which still has no return statement (another reason why I think this might apply to a lot of these is because usually the actual return type of such problematic functions is quite literally `int`). A lot of these are really old tests that don’t use `-verify`, which is why no-one noticed or had to care about the extra warning that was already being emitted by them until now.
2. Tests which test either `-Wreturn-type`, `[[noreturn]]`, or what codegen and sanitisers do whenever you do fall off the end of a function.
3. Tests where I struggle to figure out what is even being tested (usually because they’re Objective-C tests, and I don’t know Objective-C), whether falling off the end of a function matters in the first place, and tests where actually spelling out an expression to return would be rather cumbersome (e.g. matrix types currently don’t support list initialisation, so I can’t write e.g. `return {}`).
For tests that fall into categories 2 and 3, I just added `-Wno-error=return-type` to the `RUN` lines and called it a day. This was especially necessary for the former since `-Wreturn-type` is an analysis-based warning, meaning that it is currently impossible to test for more than one occurrence of it in the same compilation if it defaults to an error since the analysis pass is skipped for subsequent functions as soon as an error is emitted.
I’ve also added `-Werror=return-type` to a few tests that I had already updated as this patch was previously already making the warning an error by default, but we’ve decided to split that into two patches instead.
show more ...
|
Revision tags: llvmorg-19.1.7, llvmorg-19.1.6 |
|
#
70c1764d |
| 08-Dec-2024 |
Nathan Ridge <zeratul976@hotmail.com> |
[clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (#118236)
Fixes https://github.com/llvm/llvm-project/issues/118198
Fixes https://github.com/clangd/clangd/issues/2235
|
Revision tags: llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1 |
|
#
7dfdca19 |
| 27-Sep-2024 |
Julian Schmidt <git.julian.schmidt@gmail.com> |
[clang][test] add TestLanguage.def to specify all tested language versions (#94243)
Adds a def file to have a single location where tested language versions
are specified. Removes the need to updat
[clang][test] add TestLanguage.def to specify all tested language versions (#94243)
Adds a def file to have a single location where tested language versions
are specified. Removes the need to update multiple locations in the
testing infrastructure to add a new language version to be tested. Test
instatiation can now include all languages without needing to specify
them.
This patch also adds pretty printing for instantiated test names. That
means, that a test instantiated with C++23 will have the name
`...TestSuite/TestName/CXX23` instead ending with some number (index of
the argument for instantiation of the test), which provides a better
experience when encountering a test failure with a specific language
version. The suffix will also contain an `_win` if the target contains
`win`.
---------
Co-authored-by: Sirraide <aeternalmail@gmail.com>
show more ...
|
Revision tags: llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2 |
|
#
c493d49c |
| 20-Sep-2022 |
Matheus Izvekov <mizvekov@gmail.com> |
[clang] Fix missing template arguments in AST of access to member variable template
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Differential Revision: https://reviews.llvm.org/D134295
|
Revision tags: llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
#
263dcf45 |
| 07-Jul-2022 |
Haojian Wu <hokein.wu@gmail.com> |
[syntax] Introduce a TokenManager interface.
TokenManager defines Token interfaces for the clang syntax-tree. This is the level of abstraction that the syntax-tree should use to operate on Tokens.
[syntax] Introduce a TokenManager interface.
TokenManager defines Token interfaces for the clang syntax-tree. This is the level of abstraction that the syntax-tree should use to operate on Tokens.
It decouples the syntax-tree from a particular token implementation (TokenBuffer previously). This enables us to use a different underlying token implementation for the syntax Leaf node -- in clang pseudoparser, we want to produce a syntax-tree with its own pseudo::Token rather than syntax::Token.
Differential Revision: https://reviews.llvm.org/D128411
show more ...
|
Revision tags: llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1 |
|
#
d4d80a29 |
| 14-May-2021 |
Benjamin Kramer <benny.kra@googlemail.com> |
Bump googletest to 1.10.0
|
Revision tags: llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2 |
|
#
780ead41 |
| 18-Feb-2021 |
Haojian Wu <hokein.wu@gmail.com> |
[Syntax] No crash on OpaqueValueExpr.
OpaqueValueExpr doesn't correspond to the concrete syntax, it has invalid source location, ignore them.
Reviewed By: kbobyrev
Differential Revision: https://r
[Syntax] No crash on OpaqueValueExpr.
OpaqueValueExpr doesn't correspond to the concrete syntax, it has invalid source location, ignore them.
Reviewed By: kbobyrev
Differential Revision: https://reviews.llvm.org/D96112
show more ...
|
#
e159a3ce |
| 08-Feb-2021 |
Haojian Wu <hokein.wu@gmail.com> |
[Syntax] Remove a strict valid source location assertion for TypeLoc.
The EndLoc of a type loc can be invalid for broken code.
Also extend the existing test to support error code with `error-ok` an
[Syntax] Remove a strict valid source location assertion for TypeLoc.
The EndLoc of a type loc can be invalid for broken code.
Also extend the existing test to support error code with `error-ok` annotation.
Differential Revision: https://reviews.llvm.org/D96261
show more ...
|
#
35a5e883 |
| 08-Feb-2021 |
Haojian Wu <hokein.wu@gmail.com> |
[Syntax] NFC, Simplify a test with annotations
|
Revision tags: llvmorg-11.1.0, llvmorg-11.1.0-rc3 |
|
#
6c1a2330 |
| 01-Feb-2021 |
Haojian Wu <hokein.wu@gmail.com> |
[Syntax] Support condition for IfStmt.
Differential Revision: https://reviews.llvm.org/D95782
|
Revision tags: llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2 |
|
#
e181a6ae |
| 02-Dec-2020 |
Arthur O'Dwyer <arthur.j.odwyer@gmail.com> |
s/instantate/instantiate/ throughout. NFCI.
The static_assert in "libcxx/include/memory" was the main offender here, but then I figured I might as well `git grep -i instantat` and fix all the instan
s/instantate/instantiate/ throughout. NFCI.
The static_assert in "libcxx/include/memory" was the main offender here, but then I figured I might as well `git grep -i instantat` and fix all the instances I found. One was in user-facing HTML documentation; the rest were in comments or tests.
show more ...
|
Revision tags: llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4 |
|
#
5011d431 |
| 28-Sep-2020 |
Eduardo Caldas <ecaldas@google.com> |
Migrate Declarators to use the List API
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 declarator
Migrate Declarators to use the List API
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 declarators: `int a, b;` To generate a declarator list node we need to have the range of declarators: `a, b`: However, the `ClangAST` actually stores them as separate declarations: `int a ;` `int b;` We solve that by appropriately marking the declarators on each separate declaration in the `ClangAST` and then for the final declarator `int b`, shrinking its range to fit to the already marked declarators.
Differential Revision: https://reviews.llvm.org/D88403
show more ...
|
Revision tags: llvmorg-11.0.0-rc3 |
|
#
6dc06fa0 |
| 22-Sep-2020 |
Eduardo Caldas <ecaldas@google.com> |
[SyntaxTree] Add tests for the assignment of the `canModify` tag.
Differential Revision: https://reviews.llvm.org/D88077
|
#
e616a425 |
| 18-Sep-2020 |
Eduardo Caldas <ecaldas@google.com> |
[SyntaxTree] Test for '\' inside token.
Differential Revision: https://reviews.llvm.org/D87895
|
#
4c14ee61 |
| 11-Sep-2020 |
Eduardo Caldas <ecaldas@google.com> |
[SyntaxTree] Rename functions to start with verb
According to LLVM coding standards: https://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly
Differential
[SyntaxTree] Rename functions to start with verb
According to LLVM coding standards: https://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly
Differential Revision: https://reviews.llvm.org/D87498
show more ...
|
#
c01d28dc |
| 09-Sep-2020 |
Eduardo Caldas <ecaldas@google.com> |
[SyntaxTree] Specialize `TreeTestBase` for `BuildTreeTest`, `MutationsTest` and `SynthesisTest`
Differential Revision: https://reviews.llvm.org/D87374
|
#
f5087d5c |
| 07-Sep-2020 |
Eduardo Caldas <ecaldas@google.com> |
[SyntaxTree] Fix crash on functions with default arguments.
* Do not visit `CXXDefaultArgExpr` * To build `CallArguments` nodes, just go through non-default arguments
Differential Revision: https:/
[SyntaxTree] Fix crash on functions with default arguments.
* Do not visit `CXXDefaultArgExpr` * To build `CallArguments` nodes, just go through non-default arguments
Differential Revision: https://reviews.llvm.org/D87249
show more ...
|
#
134455a0 |
| 07-Sep-2020 |
Eduardo Caldas <ecaldas@google.com> |
[SyntaxTree] Ignore implicit `CXXFunctionalCastExpr` wrapping constructor
Differential Revision: https://reviews.llvm.org/D87229
|
#
46f4439d |
| 27-Aug-2020 |
Eduardo Caldas <ecaldas@google.com> |
[SyntaxTree] Ignore implicit leaf `CXXConstructExpr`
Differential Revision: https://reviews.llvm.org/D86700
|
#
2325d6b4 |
| 27-Aug-2020 |
Eduardo Caldas <ecaldas@google.com> |
[SyntaxTree] Ignore implicit non-leaf `CXXConstructExpr`
Differential Revision: https://reviews.llvm.org/D86699
|
#
a1461953 |
| 28-Aug-2020 |
Eduardo Caldas <ecaldas@google.com> |
[SyntaxTree] Add coverage for declarators and init-declarators
|
#
718e550c |
| 26-Aug-2020 |
Eduardo Caldas <ecaldas@google.com> |
[SyntaxTree] Refactor `NodeRole`s
Previously a NodeRole would generally be prefixed with the `NodeKind`, we remove this prefix, as it we redundant and made tests more noisy.
Differential Revision:
[SyntaxTree] Refactor `NodeRole`s
Previously a NodeRole would generally be prefixed with the `NodeKind`, we remove this prefix, as it we redundant and made tests more noisy.
Differential Revision: https://reviews.llvm.org/D86636
show more ...
|
#
dc3d4743 |
| 26-Aug-2020 |
Eduardo Caldas <ecaldas@google.com> |
[SyntaxTree] Migrate `ParamatersAndQualifiers` to use the new List API
Fix: Add missing `List::getTerminationKind()`, `List::canBeEmpty()`, `List::getDelimiterTokenKind()` for `CallArguments`.
Diff
[SyntaxTree] Migrate `ParamatersAndQualifiers` to use the new List API
Fix: Add missing `List::getTerminationKind()`, `List::canBeEmpty()`, `List::getDelimiterTokenKind()` for `CallArguments`.
Differential Revision: https://reviews.llvm.org/D86600
show more ...
|
#
3b75f65e |
| 26-Aug-2020 |
Eduardo Caldas <ecaldas@google.com> |
[SyntaxTree] Fix C++ versions on tests of `BuildTreeTest.cpp`
Differential Revision: https://reviews.llvm.org/D86591
|
#
2de2ca34 |
| 25-Aug-2020 |
Eduardo Caldas <ecaldas@google.com> |
[SyntaxTree] Add support for `CallExpression`
* Generate `CallExpression` syntax node for all semantic nodes inheriting from `CallExpr` with call-expression syntax - except `CUDAKernelCallExpr`. * I
[SyntaxTree] Add support for `CallExpression`
* Generate `CallExpression` syntax node for all semantic nodes inheriting from `CallExpr` with call-expression syntax - except `CUDAKernelCallExpr`. * Implement all the accessors * Arguments of `CallExpression` have their own syntax node which is based on the `List` base API
Differential Revision: https://reviews.llvm.org/D86544
show more ...
|