[clang-tools-extra] [clangd] Don't show inlay hints for __builtin_dump_struct (PR #71366)
Younan Zhang via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 20 08:03:17 PST 2023
================
@@ -1724,6 +1724,33 @@ 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; }
+ void PutX(int y) { x = $one[[y]]; } // FIXME: Undesired `x = y: y` for this ill-formed expression.
----------------
zyn0217 wrote:
Sorry, I'm a bit inaccurate here: The assignment expression in `PutX` is not ill-formed but would expand to a recursive call to `PutX` since we're assigning to the member with the very setter. (Of course, this would end up crashing if we [run the program](https://gcc.godbolt.org/z/e3fW3W73a).)
I think I was suggesting that this is a bad case for supporting such an extension: the assignment expression could be of a syntactic form with an inappropriate hint location though.
https://github.com/llvm/llvm-project/pull/71366
More information about the cfe-commits
mailing list