================
@@ -1724,6 +1724,36 @@ TEST(InlayHints, RestrictRange) {
               ElementsAre(labelIs(": int"), labelIs(": char")));
 }
 
+TEST(ParameterHints, PseudoObjectExpr) {
+  Annotations Code(R"cpp(
+    struct S {
+      __declspec(property(get=GetX, put=PutX)) int x[];
+      int GetX(int y, int z) { return 42 + y; }
+      // FIXME: Undesired hint `x = y: y`. This builds a PseudoObjectExpr too.
+      void PutX(int y) { x = $one[[y]]; }
----------------
HighCommander4 wrote:

While it may not be ill-formed, I think the fact that this causes an infinite 
recursion at runtime is a distraction for someone reading the test.

I would suggest instead something like:

```
void PutX(int y) {}

// FIXME: Undesired hint `x = y: y`. This builds a PseudoObjectExpr too.
void SomeOtherFunction(int y) { x = $one[[y]]; }
```

https://github.com/llvm/llvm-project/pull/71366
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to