https://github.com/ArcsinX commented:

The current solution seems a bit inconsistent to me.

1. We highlight the `operator` declaration, yet the same issue remains with the 
usages.

```cpp
struct S {
  void [[operator]] [[+]](int); // operator and + in the range
};
void f(S a, int b) {
  a.[[operator]] +(b); // only operator in the range
}
```

2. find-all-references/definition still return range of `operator` keyword only.

3. Literal operators are no covered

```cpp
long double [[operator]]""_test(long double); // only operator keyword in the 
range
// (however hover on _test works)
auto Test = [[1.0_test]];
```

4. Conversion operator are not covered

```cpp
struct S {
  [[operator]] int(); // only operator keyword in the range
};
S A;
int B = [[A]];
```

https://github.com/llvm/llvm-project/pull/220518
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to