Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6 |
|
#
740861d6 |
| 10-Dec-2024 |
yronglin <yronglin777@gmail.com> |
[clang] Fix a crash issue that caused by handling of fields with initializers in nested anonymous unions (#113049)
Fixes: https://github.com/llvm/llvm-project/issues/112560
This PR create an Reco
[clang] Fix a crash issue that caused by handling of fields with initializers in nested anonymous unions (#113049)
Fixes: https://github.com/llvm/llvm-project/issues/112560
This PR create an RecoveryExpr for invalid in-class-initializer.
---------
Signed-off-by: yronglin <yronglin777@gmail.com>
show more ...
|
Revision tags: llvmorg-19.1.5, llvmorg-19.1.4 |
|
#
834dfd23 |
| 18-Nov-2024 |
Kazu Hirata <kazu@google.com> |
[Parse] Remove ParseDiagnostic.h (#116496)
This patch removes clang/Parse/ParseDiagnostic.h because it just
forwards to clang/Basic/DiagnosticParse.h.
|
Revision tags: llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2 |
|
#
708a9a06 |
| 29-Jul-2024 |
Krystian Stasiowski <sdkrystian@gmail.com> |
[Clang][Parse] Fix ambiguity with nested-name-specifiers that may declarative (#96364)
Consider the following:
```
template<typename T>
struct A { };
template<typename T>
int A<T>::B::* f();
[Clang][Parse] Fix ambiguity with nested-name-specifiers that may declarative (#96364)
Consider the following:
```
template<typename T>
struct A { };
template<typename T>
int A<T>::B::* f(); // error: no member named 'B' in 'A<T>'
```
Although this is clearly valid, clang rejects it because the
_nested-name-specifier_ `A<T>::` is parsed as-if it was declarative,
meaning, we parse it as-if it was the _nested-name-specifier_ in a
redeclaration/specialization. However, we don't (and can't) know whether
the _nested-name-specifier_ is declarative until we see the '`*`' token,
but at that point we have already complained that `A` has no member
named `B`! This patch addresses this bug by adding support for _fully_
unannotated _and_ unbounded tentative parsing, which allows for us to
parse past tokens without having to cache them until we reach a point
where we can guarantee to be past the construct we are disambiguating.
I don't know where the approach taken here is ideal -- alternatives are
welcome. However, the performance impact (as measured by
llvm-compile-time-tracker (https://llvm-compile-time-tracker.com/?config=Overview&stat=instructions%3Au&remote=sdkrystian)
is quite minimal (0.09%, which I plan to further improve).
show more ...
|
Revision tags: llvmorg-19.1.0-rc1, llvmorg-20-init |
|
#
f52a4679 |
| 12-Jul-2024 |
Younan Zhang <zyn7109@gmail.com> |
[Clang] Ensure the method scope at the late parsing of noexcept specifiers (#98023)
Previously, we only pushed the function scope once we entered the
function definition, whereas tryCaptureVariable
[Clang] Ensure the method scope at the late parsing of noexcept specifiers (#98023)
Previously, we only pushed the function scope once we entered the
function definition, whereas tryCaptureVariable() requires at least one
function scope available when ParmVarDecls being captured have been
owned by a function. This led to problems parsing the noexcept
specifiers, as the DeclRefExprs inside them were improperly computed.
Fixes https://github.com/llvm/llvm-project/issues/97453
show more ...
|
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6 |
|
#
30d0850e |
| 17-May-2024 |
Vlad Serebrennikov <serebrennikov.vladislav@gmail.com> |
[clang][NFC] Improve const-correctness in `ParseLexedMethodDeclaration`
|
Revision tags: llvmorg-18.1.5 |
|
#
a0462420 |
| 23-Apr-2024 |
Serge Pavlov <sepavloff@gmail.com> |
[clang] Set correct FPOptions if attribute 'optnone' presents (#85605)
Attribute `optnone` must turn off all optimizations including fast-math
ones. Actually AST nodes in the 'optnone' function sti
[clang] Set correct FPOptions if attribute 'optnone' presents (#85605)
Attribute `optnone` must turn off all optimizations including fast-math
ones. Actually AST nodes in the 'optnone' function still had fast-math
flags. This change implements fixing FP options before function body is
parsed.
show more ...
|
Revision tags: llvmorg-18.1.4 |
|
#
ef164cee |
| 14-Apr-2024 |
Sirraide <aeternalmail@gmail.com> |
[Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (#86526)
This implements support for the `= delete("message")` syntax that was
only just added to C++26
([P2573R2](https://is
[Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (#86526)
This implements support for the `= delete("message")` syntax that was
only just added to C++26
([P2573R2](https://isocpp.org/files/papers/P2573R2.html#proposal-scope)).
show more ...
|
Revision tags: 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 |
|
#
ad1a65fc |
| 27-Jan-2024 |
cor3ntin <corentinjabot@gmail.com> |
[Clang][C++26] Implement Pack Indexing (P2662R3). (#72644)
Implements https://isocpp.org/files/papers/P2662R3.pdf
The feature is exposed as an extension in older language modes.
Mangling is not
[Clang][C++26] Implement Pack Indexing (P2662R3). (#72644)
Implements https://isocpp.org/files/papers/P2662R3.pdf
The feature is exposed as an extension in older language modes.
Mangling is not yet supported and that is something we will have to do before release.
show more ...
|
Revision tags: 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 |
|
#
373fcd5d |
| 14-Aug-2023 |
Kadir Cetinkaya <kadircet@google.com> |
[clang] Use RecoveryExprs for broken defaultargs, instead of OpaqueValueExprs
This makes sure we can preserve invalid-ness for consumers of this node, it prevents crashes. It also aligns better with
[clang] Use RecoveryExprs for broken defaultargs, instead of OpaqueValueExprs
This makes sure we can preserve invalid-ness for consumers of this node, it prevents crashes. It also aligns better with rest of the places that store invalid expressions.
Differential Revision: https://reviews.llvm.org/D157868
show more ...
|
Revision tags: 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 |
|
#
247fa041 |
| 16-May-2023 |
Jun Zhang <jun@junz.org> |
[clang] Add a new annotation token: annot_repl_input_end
This patch is the first part of the below RFC: https://discourse.llvm.org/t/rfc-handle-execution-results-in-clang-repl/68493
It adds an anno
[clang] Add a new annotation token: annot_repl_input_end
This patch is the first part of the below RFC: https://discourse.llvm.org/t/rfc-handle-execution-results-in-clang-repl/68493
It adds an annotation token which will replace the original EOF token when we are in the incremental C++ mode. In addition, when we're parsing an ExprStmt and there's a missing semicolon after the expression, we set a marker in the annotation token and continue parsing.
Eventually, we propogate this info in ParseTopLevelStmtDecl and are able to mark this Decl as something we want to do value printing. Below is a example:
clang-repl> int x = 42; clang-repl> x // `x` is a TopLevelStmtDecl and without a semicolon, we should set // it's IsSemiMissing bit so we can do something interesting in // ASTConsumer::HandleTopLevelDecl.
The idea about annotation toke is proposed by Richard Smith, thanks!
Signed-off-by: Jun Zhang <jun@junz.org>
Differential Revision: https://reviews.llvm.org/D148997
show more ...
|
#
6d688055 |
| 04-May-2023 |
David Stone <davidfromonline@gmail.com> |
[clang][Sema][NFC] Move `EnterExpressionEvaluationContext` to its own file
Sema.h is huge. This makes a small reduction to it by moving EnterExpressionEvaluationContext into a new header, since it i
[clang][Sema][NFC] Move `EnterExpressionEvaluationContext` to its own file
Sema.h is huge. This makes a small reduction to it by moving EnterExpressionEvaluationContext into a new header, since it is an independent component.
Differential Revision: https://reviews.llvm.org/D149796
show more ...
|
Revision tags: llvmorg-16.0.3, llvmorg-16.0.2 |
|
#
aec3f951 |
| 11-Apr-2023 |
Richard Sandiford <richard.sandiford@arm.com> |
[clang] Type safety tweak for AttributeCommonInfo::Form
This patch adds static functions for constructing most AttributeCommonInfo::Forms. Direct construction is only retained where all fields (cur
[clang] Type safety tweak for AttributeCommonInfo::Form
This patch adds static functions for constructing most AttributeCommonInfo::Forms. Direct construction is only retained where all fields (currently the syntax and spelling) are specified explicitly.
This is a wash on its own. The purpose is to allow extra fields to be added to Form without disrupting all callers. In particular, it allows extra information to be stored about keywords without affecting non-keyword uses.
No functional change intended.
Differential Revision: https://reviews.llvm.org/D148104
show more ...
|
Revision tags: 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 |
|
#
ca619613 |
| 23-Oct-2022 |
Corentin Jabot <corentinjabot@gmail.com> |
Implement CWG2631
Implement https://cplusplus.github.io/CWG/issues/2631.html.
Immediate calls in default arguments and defaults members are not evaluated.
Instead, we evaluate them when constructi
Implement CWG2631
Implement https://cplusplus.github.io/CWG/issues/2631.html.
Immediate calls in default arguments and defaults members are not evaluated.
Instead, we evaluate them when constructing a `CXXDefaultArgExpr`/`BuildCXXDefaultInitExpr`.
The immediate calls are executed by doing a transform on the initializing expression.
Note that lambdas are not considering subexpressions so we do not need to transform them.
As a result of this patch, unused default member initializers are not considered odr-used, and errors about members binding to local variables in an outer scope only surface at the point where a constructor is defined.
Reviewed By: aaron.ballman, #clang-language-wg, rupprecht
Differential Revision: https://reviews.llvm.org/D136554
show more ...
|
#
339a7687 |
| 14-Dec-2022 |
Krasimir Georgiev <krasimir@google.com> |
Revert "Implement CWG2631"
This reverts commit f1f1b60c7ba607e9ffe3bc012161d43ef95ac773.
Temporary revert, possibly triggers a new assertion failure on QualType::getCommonPtr. We're working on a re
Revert "Implement CWG2631"
This reverts commit f1f1b60c7ba607e9ffe3bc012161d43ef95ac773.
Temporary revert, possibly triggers a new assertion failure on QualType::getCommonPtr. We're working on a reproducer, to follow-up on https://reviews.llvm.org/D136554.
show more ...
|
#
f1f1b60c |
| 23-Oct-2022 |
Corentin Jabot <corentinjabot@gmail.com> |
Implement CWG2631
Implement https://cplusplus.github.io/CWG/issues/2631.html.
Immediate calls in default arguments and defaults members are not evaluated.
Instead, we evaluate them when constructi
Implement CWG2631
Implement https://cplusplus.github.io/CWG/issues/2631.html.
Immediate calls in default arguments and defaults members are not evaluated.
Instead, we evaluate them when constructing a `CXXDefaultArgExpr`/`BuildCXXDefaultInitExpr`.
The immediate calls are executed by doing a transform on the initializing expression.
Note that lambdas are not considering subexpressions so we do not need to transform them.
As a result of this patch, unused default member initializers are not considered odr-used, and errors about members binding to local variables in an outer scope only surface at the point where a constructor is defined.
Reviewed By: aaron.ballman, #clang-language-wg
Differential Revision: https://reviews.llvm.org/D136554
show more ...
|
#
be305674 |
| 09-Dec-2022 |
Arthur Eubanks <aeubanks@google.com> |
Revert "Implement CWG2631"
This reverts commit c9a6713b4788f10b81202b70993068e475b392f7.
Causes crashes, see D136554.
|
#
c9a6713b |
| 23-Oct-2022 |
Corentin Jabot <corentinjabot@gmail.com> |
Implement CWG2631
Implement https://cplusplus.github.io/CWG/issues/2631.html.
Immediate calls in default arguments and defaults members are not evaluated.
Instead, we evaluate them when constructi
Implement CWG2631
Implement https://cplusplus.github.io/CWG/issues/2631.html.
Immediate calls in default arguments and defaults members are not evaluated.
Instead, we evaluate them when constructing a `CXXDefaultArgExpr`/`BuildCXXDefaultInitExpr`.
The immediate calls are executed by doing a transform on the initializing expression.
Note that lambdas are not considering subexpressions so we do not need to transform them.
As a result of this patch, unused default member initializers are not considered odr-used, and errors about members binding to local variables in an outer scope only surface at the point where a constructor is defined.
Reviewed By: aaron.ballman, #clang-language-wg
Differential Revision: https://reviews.llvm.org/D136554
show more ...
|
#
49c86eab |
| 08-Dec-2022 |
Corentin Jabot <corentinjabot@gmail.com> |
Revert "Implement CWG2631"
This patch causes another link error, reverting until I can investigate.
This reverts commit a96a6ed83230265f3eab09a94f0e9525d05f8a74.
|
#
a96a6ed8 |
| 23-Oct-2022 |
Corentin Jabot <corentinjabot@gmail.com> |
Implement CWG2631
Implement https://cplusplus.github.io/CWG/issues/2631.html.
Immediate calls in default arguments and defaults members are not evaluated.
Instead, we evaluate them when constructi
Implement CWG2631
Implement https://cplusplus.github.io/CWG/issues/2631.html.
Immediate calls in default arguments and defaults members are not evaluated.
Instead, we evaluate them when constructing a `CXXDefaultArgExpr`/`BuildCXXDefaultInitExpr`.
The immediate calls are executed by doing a transform on the initializing expression.
Note that lambdas are not considering subexpressions so we do not need to transform them.
As a result of this patch, unused default member initializers are not considered odr-used, and errors about members binding to local variables in an outer scope only surface at the point where a constructor is defined.
Reviewed By: aaron.ballman, #clang-language-wg
Differential Revision: https://reviews.llvm.org/D136554
show more ...
|
#
9221bedf |
| 30-Nov-2022 |
Corentin Jabot <corentinjabot@gmail.com> |
Revert "Implement CWG2631"
This reverts commit 26fa17ed2914bd80c066d36b325fd3104e45554c. This reverts commit 4403c4f9e77e673a2771edfc7ab0ebb234e97485.
There is still an ODR issue causing linker err
Revert "Implement CWG2631"
This reverts commit 26fa17ed2914bd80c066d36b325fd3104e45554c. This reverts commit 4403c4f9e77e673a2771edfc7ab0ebb234e97485.
There is still an ODR issue causing linker errors, investigating.
show more ...
|
#
26fa17ed |
| 23-Oct-2022 |
Corentin Jabot <corentinjabot@gmail.com> |
Implement CWG2631
Implement https://cplusplus.github.io/CWG/issues/2631.html.
Immediate calls in default arguments and defaults members are not evaluated.
Instead, we evaluate them when constructi
Implement CWG2631
Implement https://cplusplus.github.io/CWG/issues/2631.html.
Immediate calls in default arguments and defaults members are not evaluated.
Instead, we evaluate them when constructing a `CXXDefaultArgExpr`/`BuildCXXDefaultInitExpr`.
The immediate calls are executed by doing a transform on the initializing expression.
Note that lambdas are not considering subexpressions so we do not need to transform them.
As a result of this patch, unused default member initializers are not considered odr-used, and errors about members binding to local variables in an outer scope only surface at the point where a constructor is defined.
Reviewed By: aaron.ballman, #clang-language-wg
Differential Revision: https://reviews.llvm.org/D136554
show more ...
|
#
35a870c3 |
| 04-Nov-2022 |
Corentin Jabot <corentinjabot@gmail.com> |
Revert "Implement CWG2631"
This reverts commit 7acfe3629479c8489fc2d7f629994dc200be990c. This reverts commit 5f87a892a7bed9cb0599573b9aaf387bc1df9c14. This reverts commit 6875ac69279a3a02fab382a2c8d
Revert "Implement CWG2631"
This reverts commit 7acfe3629479c8489fc2d7f629994dc200be990c. This reverts commit 5f87a892a7bed9cb0599573b9aaf387bc1df9c14. This reverts commit 6875ac69279a3a02fab382a2c8d121558ecbfa91.
show more ...
|
#
7acfe362 |
| 23-Oct-2022 |
Corentin Jabot <corentinjabot@gmail.com> |
Implement CWG2631
Implement https://cplusplus.github.io/CWG/issues/2631.html.
Immediate calls in default arguments and defaults members are not evaluated.
Instead, we evaluate them when constructi
Implement CWG2631
Implement https://cplusplus.github.io/CWG/issues/2631.html.
Immediate calls in default arguments and defaults members are not evaluated.
Instead, we evaluate them when constructing a `CXXDefaultArgExpr`/`BuildCXXDefaultInitExpr`.
The immediate calls are executed by doing a transform on the initializing expression.
Note that lambdas are not considering subexpressions so we do not need to transform them.
As a result of this patch, unused default member initializers are not considered odr-used, and errors about members binding to local variables in an outer scope only surface at the point where a constructor is defined.
Reviewed By: aaron.ballman, #clang-language-wg
Differential Revision: https://reviews.llvm.org/D136554
show more ...
|
#
722a0efe |
| 04-Nov-2022 |
Corentin Jabot <corentinjabot@gmail.com> |
Revert "Implement CWG2631"
Breaks the build on some platforms.
This reverts commit bf1e235695a7acdc3e868217e69d5b31ada06cb3.
|
#
bf1e2356 |
| 23-Oct-2022 |
Corentin Jabot <corentinjabot@gmail.com> |
Implement CWG2631
Implement https://cplusplus.github.io/CWG/issues/2631.html.
Immediate calls in default arguments and defaults members are not evaluated.
Instead, we evaluate them when constructi
Implement CWG2631
Implement https://cplusplus.github.io/CWG/issues/2631.html.
Immediate calls in default arguments and defaults members are not evaluated.
Instead, we evaluate them when constructing a `CXXDefaultArgExpr`/`BuildCXXDefaultInitExpr`.
The immediate calls are executed by doing a transform on the initializing expression.
Note that lambdas are not considering subexpressions so we do not need to transform them.
As a result of this patch, unused default member initializers are not considered odr-used, and errors about members binding to local variables in an outer scope only surface at the point where a constructor is defined.
Reviewed By: aaron.ballman, #clang-language-wg
Differential Revision: https://reviews.llvm.org/D136554
show more ...
|