diff options
| author | Utkarsh Saxena <usaxena95@gmail.com> | 2023-10-20 14:40:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-20 14:40:25 +0200 |
| commit | 47747da6340b00e301d3656f95ecf9b04a6ec2bb (patch) | |
| tree | 39b3689df4e75d84648046acd084bc2fd1c80c93 /lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPlatformPythonInterface.cpp | |
| parent | ba8565fbcb975e2d067ce3ae5a7dbaae4953edd3 (diff) | |
[clang] Handle templated operators with reversed arguments (#69595)
https://github.com/llvm/llvm-project/pull/68999 correctly computed
conversion sequence for reversed args to a template operators. This was
a breaking change as code, previously accepted in C++17, starts to break
in C++20.
Example:
```cpp
struct P {};
template<class S> bool operator==(const P&, const S &);
struct A : public P {};
struct B : public P {};
bool check(A a, B b) { return a == b; } // This is now ambiguous in C++20.
```
In order to minimise widespread breakages, as a clang extension, we had
previously accepted such ambiguities with a warning
(`-Wambiguous-reversed-operator`) for non-template operators. Due to the
same reasons, we extend this relaxation for template operators.
Fixes https://github.com/llvm/llvm-project/issues/53954
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPlatformPythonInterface.cpp')
0 files changed, 0 insertions, 0 deletions
