|
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, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2 |
|
| #
b9cd65ff |
| 04-Aug-2022 |
Kadir Cetinkaya <[email protected]> |
Revert "[clang] Pass FoundDecl to DeclRefExpr creator for operator overloads"
This reverts commit 4e94f6653150511de434fa7e29b684ae7f0e52b6. See https://reviews.llvm.org/D129973#3698969 for reasoning
Revert "[clang] Pass FoundDecl to DeclRefExpr creator for operator overloads"
This reverts commit 4e94f6653150511de434fa7e29b684ae7f0e52b6. See https://reviews.llvm.org/D129973#3698969 for reasoning.
(cherry picked from commit df48e3fbcc8be1f4c04bd97517d12e662f54de75)
show more ...
|
|
Revision tags: llvmorg-15.0.0-rc1, llvmorg-16-init |
|
| #
4e94f665 |
| 17-Jul-2022 |
Danny Mösch <[email protected]> |
[clang] Pass FoundDecl to DeclRefExpr creator for operator overloads
Without the "found declaration" it is later not possible to know where the operator declaration was brought into the scope callin
[clang] Pass FoundDecl to DeclRefExpr creator for operator overloads
Without the "found declaration" it is later not possible to know where the operator declaration was brought into the scope calling it.
The initial motivation for this fix came from #55095. However, this also has an influence on `clang -ast-dump` which now prints a `UsingShadow` attribute for operators only visible through `using` statements. Also, clangd now correctly references the `using` statement instead of the operator directly.
Reviewed By: shafik
Differential Revision: https://reviews.llvm.org/D129973
show more ...
|
| #
99daf6b2 |
| 26-Jul-2022 |
Chuanqi Xu <[email protected]> |
[C++20] [Modules] Don't handle no linkage entities when overloading
The original implementation uses `ND->getFormalLinkage() <= Linkage::InternalLinkage`. It is not right since the spec only says in
[C++20] [Modules] Don't handle no linkage entities when overloading
The original implementation uses `ND->getFormalLinkage() <= Linkage::InternalLinkage`. It is not right since the spec only says internal linkage and it doesn't mention 'no linkage'. This matters when we consider constructors. According to [class.ctor.general]p1, constructors have no name so constructors have no linkage too.
show more ...
|
| #
15ddc09e |
| 26-Jul-2022 |
Chuanqi Xu <[email protected]> |
[C++20] [Modules] Handle linkage properly for specializations when overloading
Currently, the semantics of linkage in clang is slightly different from the semantics in C++ spec. In C++ spec, only na
[C++20] [Modules] Handle linkage properly for specializations when overloading
Currently, the semantics of linkage in clang is slightly different from the semantics in C++ spec. In C++ spec, only names have linkage. So that all entities of the same should share one linkage. But in clang, different entities of the same could have different linkage.
It would break a use case where the template have external linkage and its specialization have internal linkage due to its type argument is internal linkage. The root cause is that the semantics of internal linkage in clang is a mixed form of internal linkage and TU-local in C++ spec. It is hard to solve the root problem and I tried to add a workaround inplace.
show more ...
|
| #
25558a1b |
| 06-Jul-2022 |
Iain Sandoe <[email protected]> |
[C++20][Modules] Update ADL to handle basic.lookup.argdep p4 [P1815R2 part 1]
This includes the revised provisions of [basic.lookup.argdep] p4
1. ADL is amended to handle p 4.3 where functions in t
[C++20][Modules] Update ADL to handle basic.lookup.argdep p4 [P1815R2 part 1]
This includes the revised provisions of [basic.lookup.argdep] p4
1. ADL is amended to handle p 4.3 where functions in trasitively imported modules may become visible when they are exported in the same namespace as a visible type.
2. If a function is in a different modular TU, and has internal-linkage, we invalidate its entry in an overload set.
[basic.lookup.argdep] p5 ex 2 now passes.
Differential Revision: https://reviews.llvm.org/D129174
show more ...
|
| #
258c3aee |
| 01-Jul-2022 |
Erich Keane <[email protected]> |
Revert "Re-apply "Deferred Concept Instantiation Implementation"""
This reverts commit befa8cf087dbb8159a4d9dc8fa4d6748d6d5049a.
Apparently this breaks some libc++ builds with an apparent assertion
Revert "Re-apply "Deferred Concept Instantiation Implementation"""
This reverts commit befa8cf087dbb8159a4d9dc8fa4d6748d6d5049a.
Apparently this breaks some libc++ builds with an apparent assertion, so I'm looking into that .
show more ...
|
| #
befa8cf0 |
| 30-Jun-2022 |
Erich Keane <[email protected]> |
Re-apply "Deferred Concept Instantiation Implementation""
This reverts commit d4d47e574ecae562ab32f8ac7fa3f4d424bb6574.
This fixes the lldb crash that was observed by ensuring that our friend-'temp
Re-apply "Deferred Concept Instantiation Implementation""
This reverts commit d4d47e574ecae562ab32f8ac7fa3f4d424bb6574.
This fixes the lldb crash that was observed by ensuring that our friend-'template contains reference to' TreeTransform properly handles a TemplateDecl.
show more ...
|
| #
d4d47e57 |
| 30-Jun-2022 |
Jonas Devlieghere <[email protected]> |
Revert "Deferred Concept Instantiation Implementation"
This reverts commit 2f207439521d62d9551b2884158368e8b34084e5 because it triggers an assertion when building an LLDB test program:
Assertion
Revert "Deferred Concept Instantiation Implementation"
This reverts commit 2f207439521d62d9551b2884158368e8b34084e5 because it triggers an assertion when building an LLDB test program:
Assertion failed: (InstantiatingSpecializations.empty() && "failed to clean up an InstantiatingTemplate?"), function ~Sema, file /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/lib/Sema/Sema.cpp, line 458.
More details in https://reviews.llvm.org/D126907.
show more ...
|
|
Revision tags: llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4 |
|
| #
2f207439 |
| 19-May-2022 |
Erich Keane <[email protected]> |
Deferred Concept Instantiation Implementation
This is a continuation of D119544. Based on @rsmith 's feed back showing me https://eel.is/c++draft/temp#friend-9, We should properly handle friend fun
Deferred Concept Instantiation Implementation
This is a continuation of D119544. Based on @rsmith 's feed back showing me https://eel.is/c++draft/temp#friend-9, We should properly handle friend functions now.
Differential Revision: https://reviews.llvm.org/D126907
show more ...
|
| #
663e47a5 |
| 27-Jun-2022 |
Sven van Haastregt <[email protected]> |
[OpenCL] Reduce emitting candidate notes for builtins
When overload resolution fails, clang emits a note diagnostic for each candidate. For OpenCL builtins this often leads to many repeated note di
[OpenCL] Reduce emitting candidate notes for builtins
When overload resolution fails, clang emits a note diagnostic for each candidate. For OpenCL builtins this often leads to many repeated note diagnostics with no new information. Stop emitting such notes.
Update a test that was relying on counting those notes to check how many builtins are available for certain extension configurations.
Differential Revision: https://reviews.llvm.org/D127961
show more ...
|
| #
ca4af13e |
| 21-Jun-2022 |
Kazu Hirata <[email protected]> |
[clang] Don't use Optional::getValue (NFC)
|
| #
452db157 |
| 20-Jun-2022 |
Kazu Hirata <[email protected]> |
[clang] Don't use Optional::hasValue (NFC)
|
| #
b02d970b |
| 08-Jun-2022 |
Jan Svoboda <[email protected]> |
[clang][sema] Generate builtin operator overloads for (volatile) _Atomic types
We observed a failed assert in overloaded compound-assignment operator resolution:
``` Assertion failed: (Result.isInv
[clang][sema] Generate builtin operator overloads for (volatile) _Atomic types
We observed a failed assert in overloaded compound-assignment operator resolution:
``` Assertion failed: (Result.isInvalid() && "C++ binary operator overloading is missing candidates!"), function CreateOverloadedBinOp, file SemaOverload.cpp, line 13944. ... frame #4: clang` clang::Sema::CreateOverloadedBinOp(..., Opc=BO_OrAssign, ..., PerformADL=true, AllowRewrittenCandidates=false, ...) at SemaOverload.cpp:13943 frame #5: clang` BuildOverloadedBinOp(..., Opc=BO_OrAssign, ...) at SemaExpr.cpp:15228 frame #6: clang` clang::Sema::BuildBinOp(..., Opc=BO_OrAssign, ...) at SemaExpr.cpp:15330 frame #7: clang` clang::Sema::ActOnBinOp(..., Kind=pipeequal, ...) at SemaExpr.cpp:15187 frame #8: clang` clang::Parser::ParseRHSOfBinaryExpression(..., MinPrec=Assignment) at ParseExpr.cpp:629 frame #9: clang` clang::Parser::ParseAssignmentExpression(..., isTypeCast=NotTypeCast) at ParseExpr.cpp:176 frame #10: clang` clang::Parser::ParseExpression(... isTypeCast=NotTypeCast) at ParseExpr.cpp:124 frame #11: clang` clang::Parser::ParseExprStatement(...) at ParseStmt.cpp:464 ```
A simple reproducer is:
``` _Atomic unsigned an_atomic_uint;
enum { an_enum_value = 1 };
void enum1() { an_atomic_uint += an_enum_value; } ```
This patch fixes the issue by generating builtin operator overloads for (volatile) _Atomic types.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D125349
show more ...
|
| #
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 ...
|
| #
017abbb2 |
| 09-May-2022 |
Erich Keane <[email protected]> |
Revert ""Re-apply 4b6c2cd642 "Deferred Concept Instantiation Implementation"""""
This reverts commit a425cac31e2e4cee8e14b7b9a99c8ba17c1ebb52.
There is another libc++ test, that this time causes us
Revert ""Re-apply 4b6c2cd642 "Deferred Concept Instantiation Implementation"""""
This reverts commit a425cac31e2e4cee8e14b7b9a99c8ba17c1ebb52.
There is another libc++ test, that this time causes us to hit an assertion. Reverting, likely for a while this time.
show more ...
|
| #
a425cac3 |
| 05-May-2022 |
Erich Keane <[email protected]> |
"Re-apply 4b6c2cd642 "Deferred Concept Instantiation Implementation""""
This includes a fix for the libc++ issue I ran across with friend declarations not properly being identified as overloads.
Th
"Re-apply 4b6c2cd642 "Deferred Concept Instantiation Implementation""""
This includes a fix for the libc++ issue I ran across with friend declarations not properly being identified as overloads.
This reverts commit 45c07db31cc76802a1a2e41bed1ce9c1b8198181.
show more ...
|
|
Revision tags: llvmorg-14.0.3, llvmorg-14.0.2 |
|
| #
afa20aff |
| 24-Apr-2022 |
Nick Kreeger <[email protected]> |
Reverting accidental git-revert commits.
Revert "Revert "Revert "Revert "[Concepts] Fix overload resolution bug with constrained candidates""""
This reverts commit cfc2c5905ec11a501cdfc9502f503ab49
Reverting accidental git-revert commits.
Revert "Revert "Revert "Revert "[Concepts] Fix overload resolution bug with constrained candidates""""
This reverts commit cfc2c5905ec11a501cdfc9502f503ab494c200b6.
show more ...
|
| #
2d80889b |
| 24-Apr-2022 |
Nick Kreeger <[email protected]> |
Reverting accidental git-revert commits.
Revert "Revert "Revert "[Concepts] Fix overload resolution bug with constrained candidates"""
This reverts commit a0636b5855f5ba1f7033670dc32c956d63baaa51.
|
| #
d1b73f34 |
| 24-Apr-2022 |
Nick Kreeger <[email protected]> |
Reverting accidental git-revert commits.
Revert "Revert "[Concepts] Fix overload resolution bug with constrained candidates""
This reverts commit f6af446b6625657b1b9046273f5b33bc1173a97c.
|
| #
cfc2c590 |
| 24-Apr-2022 |
Nick Kreeger <[email protected]> |
Revert "Revert "Revert "[Concepts] Fix overload resolution bug with constrained candidates"""
This reverts commit a0636b5855f5ba1f7033670dc32c956d63baaa51.
|
| #
a0636b58 |
| 24-Apr-2022 |
Nick Kreeger <[email protected]> |
Revert "Revert "[Concepts] Fix overload resolution bug with constrained candidates""
This reverts commit f6af446b6625657b1b9046273f5b33bc1173a97c.
|
| #
f6af446b |
| 24-Apr-2022 |
Nick Kreeger <[email protected]> |
Revert "[Concepts] Fix overload resolution bug with constrained candidates"
This reverts commit 807e418413a0958ad1ea862093fb262673b2afa1.
|
| #
807e4184 |
| 15-Apr-2022 |
Roy Jacobson <[email protected]> |
[Concepts] Fix overload resolution bug with constrained candidates
When doing overload resolution, we have to check that candidates' parameter types are equal before trying to find a better candidat
[Concepts] Fix overload resolution bug with constrained candidates
When doing overload resolution, we have to check that candidates' parameter types are equal before trying to find a better candidate through checking which candidate is more constrained. This revision adds this missing check and makes us diagnose those cases as ambiguous calls when the types are not equal.
Fixes GitHub issue https://github.com/llvm/llvm-project/issues/53640
Reviewed By: erichkeane
Differential Revision: https://reviews.llvm.org/D123182
show more ...
|
| #
72315d02 |
| 21-Apr-2022 |
Richard Smith <[email protected]> |
Treat `std::move`, `forward`, etc. as builtins.
This is extended to all `std::` functions that take a reference to a value and return a reference (or pointer) to that same value: `move`, `forward`,
Treat `std::move`, `forward`, etc. as builtins.
This is extended to all `std::` functions that take a reference to a value and return a reference (or pointer) to that same value: `move`, `forward`, `move_if_noexcept`, `as_const`, `addressof`, and the libstdc++-specific function `__addressof`.
We still require these functions to be declared before they can be used, but don't instantiate their definitions unless their addresses are taken. Instead, code generation, constant evaluation, and static analysis are given direct knowledge of their effect.
This change aims to reduce various costs associated with these functions -- per-instantiation memory costs, compile time and memory costs due to creating out-of-line copies and inlining them, code size at -O0, and so on -- so that they are not substantially more expensive than a cast. Most of these improvements are very small, but I measured a 3% decrease in -O0 object file size for a simple C++ source file using the standard library after this change.
We now automatically infer the `const` and `nothrow` attributes on these now-builtin functions, in particular meaning that we get a warning for an unused call to one of these functions.
In C++20 onwards, we disallow taking the addresses of these functions, per the C++20 "addressable function" rule. In earlier language modes, a compatibility warning is produced but the address can still be taken.
The same infrastructure is extended to the existing MSVC builtin `__GetExceptionInfo`, which is now only recognized in namespace `std` like it always should have been.
This is a re-commit of fc3090109643af8d2da9822d0f99c84742b9c877, a571f82a50416b767fd3cce0fb5027bb5dfec58c, 64c045e25b8471bbb572bd29159c294a82a86a2, and de6ddaeef3aaa8a9ae3663c12cdb57d9afc0f906, and reverts aa643f455a5362de7189eac630050d2c8aefe8f2. This change also includes a workaround for users using libc++ 3.1 and earlier (!!), as apparently happens on AIX, where std::move sometimes returns by value.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D123345
Revert "Fixup D123950 to address revert of D123345"
This reverts commit aa643f455a5362de7189eac630050d2c8aefe8f2.
show more ...
|
| #
98d911e0 |
| 20-Apr-2022 |
David Tenty <[email protected]> |
Revert "Treat `std::move`, `forward`, etc. as builtins."
This reverts commit b27430f9f46b88bcd54d992debc8d72e131e1bd0 as the parent https://reviews.llvm.org/D123345 breaks the AIX CI:
https
Revert "Treat `std::move`, `forward`, etc. as builtins."
This reverts commit b27430f9f46b88bcd54d992debc8d72e131e1bd0 as the parent https://reviews.llvm.org/D123345 breaks the AIX CI:
https://lab.llvm.org/buildbot/#/builders/214/builds/819
show more ...
|