|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, 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, 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, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0 |
|
| #
1c73596d |
| 30-Aug-2022 |
Utkarsh Saxena <[email protected]> |
[clang] Skip re-building lambda expressions in parameters to consteval fns.
As discussed in this [comment](https://github.com/llvm/llvm-project/issues/56183#issuecomment-1224331699), we end up build
[clang] Skip re-building lambda expressions in parameters to consteval fns.
As discussed in this [comment](https://github.com/llvm/llvm-project/issues/56183#issuecomment-1224331699), we end up building the lambda twice: once while parsing the function calls and then again while handling the immediate invocation.
This happens specially during removing nested immediate invocation. Eg: When we have another consteval function as the parameter along with this lambda expression. Eg: `foo(bar([]{}))`, `foo(bar(), []{})`
While removing such nested immediate invocations, we should not rebuild this lambda. (IIUC, rebuilding a lambda would always generate a new type which will never match the original type from parsing)
Fixes: https://github.com/llvm/llvm-project/issues/56183 Fixes: https://github.com/llvm/llvm-project/issues/51695 Fixes: https://github.com/llvm/llvm-project/issues/50455 Fixes: https://github.com/llvm/llvm-project/issues/54872 Fixes: https://github.com/llvm/llvm-project/issues/54587
Differential Revision: https://reviews.llvm.org/D132945
(cherry picked from commit e7eec38246560781e0a4020b19c7eb038a8c5655)
show more ...
|
|
Revision tags: llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2 |
|
| #
2c3f5d71 |
| 02-Aug-2022 |
David Truby <[email protected]> |
[clang][AArch64][SVE] Add unary +/- operators for SVE types
This patch enables the unary promotion and negation operators on SVE types.
Differential Revision: https://reviews.llvm.org/D130984
(che
[clang][AArch64][SVE] Add unary +/- operators for SVE types
This patch enables the unary promotion and negation operators on SVE types.
Differential Revision: https://reviews.llvm.org/D130984
(cherry picked from commit 286d59ef6f7118c8a0600f3d281593700528a5d3)
show more ...
|
|
Revision tags: llvmorg-15.0.0-rc1, llvmorg-16-init |
|
| #
0ba128f7 |
| 23-Jul-2022 |
Corentin Jabot <[email protected]> |
[Clang] De-deprecate volatile compound operations
As per P2327R1,
|=, &= and ^= are no longer deprecated in all languages mode.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.l
[Clang] De-deprecate volatile compound operations
As per P2327R1,
|=, &= and ^= are no longer deprecated in all languages mode.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D130421
show more ...
|
| #
70257fab |
| 22-Jul-2022 |
Kazu Hirata <[email protected]> |
Use any_of (NFC)
|
| #
8b3ed1fa |
| 17-Jul-2022 |
Kazu Hirata <[email protected]> |
Remove redundant return statements (NFC)
Identified with readability-redundant-control-flow.
|
| #
888673b6 |
| 15-Jul-2022 |
Jonas Devlieghere <[email protected]> |
Revert "[clang] Implement ElaboratedType sugaring for types written bare"
This reverts commit 7c51f02effdbd0d5e12bfd26f9c3b2ab5687c93f because it stills breaks the LLDB tests. This was re-landed wi
Revert "[clang] Implement ElaboratedType sugaring for types written bare"
This reverts commit 7c51f02effdbd0d5e12bfd26f9c3b2ab5687c93f because it stills breaks the LLDB tests. This was re-landed without addressing the issue or even agreement on how to address the issue. More details and discussion in https://reviews.llvm.org/D112374.
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 |
|
| #
7c51f02e |
| 11-Oct-2021 |
Matheus Izvekov <[email protected]> |
[clang] Implement ElaboratedType sugaring for types written bare
Without this patch, clang will not wrap in an ElaboratedType node types written without a keyword and nested name qualifier, which go
[clang] Implement ElaboratedType sugaring for types written bare
Without this patch, clang will not wrap in an ElaboratedType node types written without a keyword and nested name qualifier, which goes against the intent that we should produce an AST which retains enough details to recover how things are written.
The lack of this sugar is incompatible with the intent of the type printer default policy, which is to print types as written, but to fall back and print them fully qualified when they are desugared.
An ElaboratedTypeLoc without keyword / NNS uses no storage by itself, but still requires pointer alignment due to pre-existing bug in the TypeLoc buffer handling.
---
Troubleshooting list to deal with any breakage seen with this patch:
1) The most likely effect one would see by this patch is a change in how a type is printed. The type printer will, by design and default, print types as written. There are customization options there, but not that many, and they mainly apply to how to print a type that we somehow failed to track how it was written. This patch fixes a problem where we failed to distinguish between a type that was written without any elaborated-type qualifiers, such as a 'struct'/'class' tags and name spacifiers such as 'std::', and one that has been stripped of any 'metadata' that identifies such, the so called canonical types. Example: ``` namespace foo { struct A {}; A a; }; ``` If one were to print the type of `foo::a`, prior to this patch, this would result in `foo::A`. This is how the type printer would have, by default, printed the canonical type of A as well. As soon as you add any name qualifiers to A, the type printer would suddenly start accurately printing the type as written. This patch will make it print it accurately even when written without qualifiers, so we will just print `A` for the initial example, as the user did not really write that `foo::` namespace qualifier.
2) This patch could expose a bug in some AST matcher. Matching types is harder to get right when there is sugar involved. For example, if you want to match a type against being a pointer to some type A, then you have to account for getting a type that is sugar for a pointer to A, or being a pointer to sugar to A, or both! Usually you would get the second part wrong, and this would work for a very simple test where you don't use any name qualifiers, but you would discover is broken when you do. The usual fix is to either use the matcher which strips sugar, which is annoying to use as for example if you match an N level pointer, you have to put N+1 such matchers in there, beginning to end and between all those levels. But in a lot of cases, if the property you want to match is present in the canonical type, it's easier and faster to just match on that... This goes with what is said in 1), if you want to match against the name of a type, and you want the name string to be something stable, perhaps matching on the name of the canonical type is the better choice.
3) This patch could exposed a bug in how you get the source range of some TypeLoc. For some reason, a lot of code is using getLocalSourceRange(), which only looks at the given TypeLoc node. This patch introduces a new, and more common TypeLoc node which contains no source locations on itself. This is not an inovation here, and some other, more rare TypeLoc nodes could also have this property, but if you use getLocalSourceRange on them, it's not going to return any valid locations, because it doesn't have any. The right fix here is to always use getSourceRange() or getBeginLoc/getEndLoc which will dive into the inner TypeLoc to get the source range if it doesn't find it on the top level one. You can use getLocalSourceRange if you are really into micro-optimizations and you have some outside knowledge that the TypeLocs you are dealing with will always include some source location.
4) Exposed a bug somewhere in the use of the normal clang type class API, where you have some type, you want to see if that type is some particular kind, you try a `dyn_cast` such as `dyn_cast<TypedefType>` and that fails because now you have an ElaboratedType which has a TypeDefType inside of it, which is what you wanted to match. Again, like 2), this would usually have been tested poorly with some simple tests with no qualifications, and would have been broken had there been any other kind of type sugar, be it an ElaboratedType or a TemplateSpecializationType or a SubstTemplateParmType. The usual fix here is to use `getAs` instead of `dyn_cast`, which will look deeper into the type. Or use `getAsAdjusted` when dealing with TypeLocs. For some reason the API is inconsistent there and on TypeLocs getAs behaves like a dyn_cast.
5) It could be a bug in this patch perhaps.
Let me know if you need any help!
Signed-off-by: Matheus Izvekov <[email protected]>
Differential Revision: https://reviews.llvm.org/D112374
show more ...
|
| #
e71fd547 |
| 14-Jul-2022 |
Erich Keane <[email protected]> |
[NFC] Move check for isEqualityOp to CheckFloatComparisons
So callers don't have to. Also, fix a clang-format/use of auto fix in CheckFloatComparisons.
|
| #
3968936b |
| 13-Jul-2022 |
Jonas Devlieghere <[email protected]> |
Revert "[clang] Implement ElaboratedType sugaring for types written bare"
This reverts commit bdc6974f92304f4ed542241b9b89ba58ba6b20aa because it breaks all the LLDB tests that import the std module
Revert "[clang] Implement ElaboratedType sugaring for types written bare"
This reverts commit bdc6974f92304f4ed542241b9b89ba58ba6b20aa because it breaks all the LLDB tests that import the std module.
import-std-module/array.TestArrayFromStdModule.py import-std-module/deque-basic.TestDequeFromStdModule.py import-std-module/deque-dbg-info-content.TestDbgInfoContentDequeFromStdModule.py import-std-module/forward_list.TestForwardListFromStdModule.py import-std-module/forward_list-dbg-info-content.TestDbgInfoContentForwardListFromStdModule.py import-std-module/list.TestListFromStdModule.py import-std-module/list-dbg-info-content.TestDbgInfoContentListFromStdModule.py import-std-module/queue.TestQueueFromStdModule.py import-std-module/stack.TestStackFromStdModule.py import-std-module/vector.TestVectorFromStdModule.py import-std-module/vector-bool.TestVectorBoolFromStdModule.py import-std-module/vector-dbg-info-content.TestDbgInfoContentVectorFromStdModule.py import-std-module/vector-of-vectors.TestVectorOfVectorsFromStdModule.py
https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/45301/
show more ...
|
| #
bdc6974f |
| 11-Oct-2021 |
Matheus Izvekov <[email protected]> |
[clang] Implement ElaboratedType sugaring for types written bare
Without this patch, clang will not wrap in an ElaboratedType node types written without a keyword and nested name qualifier, which go
[clang] Implement ElaboratedType sugaring for types written bare
Without this patch, clang will not wrap in an ElaboratedType node types written without a keyword and nested name qualifier, which goes against the intent that we should produce an AST which retains enough details to recover how things are written.
The lack of this sugar is incompatible with the intent of the type printer default policy, which is to print types as written, but to fall back and print them fully qualified when they are desugared.
An ElaboratedTypeLoc without keyword / NNS uses no storage by itself, but still requires pointer alignment due to pre-existing bug in the TypeLoc buffer handling.
Signed-off-by: Matheus Izvekov <[email protected]>
Differential Revision: https://reviews.llvm.org/D112374
show more ...
|
| #
54f57d38 |
| 09-Jul-2022 |
Nathan James <[email protected]> |
[clang] Add a fixit for warn-self-assign if LHS is a field with the same name as parameter on RHS
Add a fix-it for the common case of setters/constructors using parameters with the same name as fiel
[clang] Add a fixit for warn-self-assign if LHS is a field with the same name as parameter on RHS
Add a fix-it for the common case of setters/constructors using parameters with the same name as fields ```lang=c++ struct A{ int X; A(int X) { /*this->*/X = X; } void setX(int X) { /*this->*/X = X; }; ```
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D129202
show more ...
|
| #
a9a60f20 |
| 28-Jun-2022 |
Corentin Jabot <[email protected]> |
[Clang] Rename StringLiteral::isAscii() => isOrdinary() [NFC]
"Ascii" StringLiteral instances are actually narrow strings that are UTF-8 encoded and do not have an encoding prefix. (UTF8 StringLiter
[Clang] Rename StringLiteral::isAscii() => isOrdinary() [NFC]
"Ascii" StringLiteral instances are actually narrow strings that are UTF-8 encoded and do not have an encoding prefix. (UTF8 StringLiteral are also UTF-8 encoded strings, but with the u8 prefix.
To avoid possible confusion both with actuall ASCII strings, and with future works extending the set of literal encodings supported by clang, this rename StringLiteral::isAscii() to isOrdinary(), matching C++ standard terminology.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D128762
show more ...
|
| #
9c04851c |
| 29-Jun-2022 |
Chuanqi Xu <[email protected]> |
[C++20] [Module] Support reachable definition initially/partially
This patch introduces a new kind of ModuleOwnershipKind as ReachableWhenImported. This intended the status for reachable described a
[C++20] [Module] Support reachable definition initially/partially
This patch introduces a new kind of ModuleOwnershipKind as ReachableWhenImported. This intended the status for reachable described at: https://eel.is/c++draft/module.reach#3.
Note that this patch is not intended to support all semantics about reachable semantics. For example, this patch didn't implement discarded declarations in GMF. (https://eel.is/c++draft/module.global.frag#3).
This fixes: https://bugs.llvm.org/show_bug.cgi?id=52281 and https://godbolt.org/z/81f3ocjfW.
Reviewed By: rsmith, iains
Differential Revision: https://reviews.llvm.org/D113545
show more ...
|
| #
7a541406 |
| 29-Jun-2022 |
Chuanqi Xu <[email protected]> |
Revert "[C++20] [Modules] Implement Reachable initiallly"
This reverts commit a223ba0a697c1598b434cf2495c9cd9ec5640fc7.
The previous commit don't contain additional information, which is bad.
|
| #
a223ba0a |
| 21-Feb-2022 |
Chuanqi Xu <[email protected]> |
[C++20] [Modules] Implement Reachable initiallly
|
| #
80c12bdb |
| 18-Jun-2022 |
Kazu Hirata <[email protected]> |
[clang] Call *set::insert without checking membership first (NFC)
|
| #
711a71d1 |
| 16-Jun-2022 |
Maryam Moghadas <[email protected]> |
PowerPC] Emit warning for incompatible vector types that are currently diagnosed with -fno-lax-vector-conversions
This patch is the last prerequisite to switch the default behaviour to -fno-lax-vect
PowerPC] Emit warning for incompatible vector types that are currently diagnosed with -fno-lax-vector-conversions
This patch is the last prerequisite to switch the default behaviour to -fno-lax-vector-conversions in the future. The first path ;D124093; fixed the altivec implicit castings.
Reviewed By: amyk
Differential Revision: https://reviews.llvm.org/D126540
show more ...
|
| #
48e18298 |
| 14-Jun-2022 |
Shivam Gupta <[email protected]> |
[Diagnostics] Fix inconsistent shift-overflow warnings in C++20
This fixes https://github.com/llvm/llvm-project/issues/52873. Don't warn in C++2A mode (and newer), as signed left shifts always wrap
[Diagnostics] Fix inconsistent shift-overflow warnings in C++20
This fixes https://github.com/llvm/llvm-project/issues/52873. Don't warn in C++2A mode (and newer), as signed left shifts always wrap and never overflow. Ref. - https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1236r1.html.
show more ...
|
| #
b4f2f7be |
| 13-Jun-2022 |
David Truby <[email protected]> |
[clang][AArch64][SVE] Implicit conversions for vector-scalar operations
This patch allows the same implicit conversions for vector-scalar operations in SVE that are allowed for NEON.
Depends on D12
[clang][AArch64][SVE] Implicit conversions for vector-scalar operations
This patch allows the same implicit conversions for vector-scalar operations in SVE that are allowed for NEON.
Depends on D126377
Reviewed By: c-rhodes
Differential Revision: https://reviews.llvm.org/D126380
show more ...
|
| #
133a5f22 |
| 06-Jun-2022 |
David Truby <[email protected]> |
[clang][AArch64][SVE] Improve diagnostics for SVE operators
This patch corrects some diagnostics for the SVE sizeless vector operators, including correctly diagnosing when the vectors are different
[clang][AArch64][SVE] Improve diagnostics for SVE operators
This patch corrects some diagnostics for the SVE sizeless vector operators, including correctly diagnosing when the vectors are different sizes.
Differential Revision: https://reviews.llvm.org/D126377
show more ...
|
| #
a4f85902 |
| 07-Jun-2022 |
Evgeny Shulgin <[email protected]> |
[clang] Allow consteval functions in default arguments
We should not mark a function as "referenced" if we call it within a ConstantExpr, because the expression will be folded to a value in LLVM IR.
[clang] Allow consteval functions in default arguments
We should not mark a function as "referenced" if we call it within a ConstantExpr, because the expression will be folded to a value in LLVM IR. To prevent emitting consteval function declarations, we should not "jump over" a ConstantExpr when it is a top-level ParmVarDecl's subexpression.
Fixes https://github.com/llvm/llvm-project/issues/48230
Reviewed By: erichkeane, aaron.ballman, ChuanqiXu
Differenitial Revision: https://reviews.llvm.org/D119646
show more ...
|
| #
d9372897 |
| 06-Jun-2022 |
Kazu Hirata <[email protected]> |
[clang] Use llvm::is_contained (NFC)
|
| #
efbf0136 |
| 03-Jun-2022 |
Jamie Schmeiser <[email protected]> |
Only issue warning for subtraction involving null pointers on live code paths
Summary: Change the warning produced for subtraction from (or with) a null pointer to only be produced when the code pat
Only issue warning for subtraction involving null pointers on live code paths
Summary: Change the warning produced for subtraction from (or with) a null pointer to only be produced when the code path is live. https://github.com/llvm/llvm-project/issues/54570
Author: Jamie Schmeiser <[email protected]> Reviewed By: anarazel (Andres Freund) Differential Revision: https://reviews.llvm.org/D126816
show more ...
|
| #
85750de6 |
| 26-May-2022 |
Aaron Ballman <[email protected]> |
Use the canonical type when matching a generic selection association
This ensures that a deduced type like __auto_type matches the correct association instead of matching all associations.
This add
Use the canonical type when matching a generic selection association
This ensures that a deduced type like __auto_type matches the correct association instead of matching all associations.
This addresses a regression from e4a42c5b64d044ae28d9483b0ebd12038d5b5917
Fixes #55702
show more ...
|
| #
47b8424a |
| 18-May-2022 |
Aaron Ballman <[email protected]> |
Correct the diagnostic behavior for unreachable _Generic associations in C++
New diagnostics were added for unreachable generic selection expression associations in ca75ac5f04f269def97e6844c2f5c9596
Correct the diagnostic behavior for unreachable _Generic associations in C++
New diagnostics were added for unreachable generic selection expression associations in ca75ac5f04f269def97e6844c2f5c9596b29c84c, but it did not account for a difference in behavior between C and C++ regarding lvalue to rvalue conversions. So we would issue diagnostics about a selection being unreachable and then reach it. This corrects the diagnostic behavior in that case.
Differential Revision: https://reviews.llvm.org/D125882
show more ...
|