kbobyrev added inline comments.

================
Comment at: clang-tools-extra/clangd/FindTarget.cpp:639
+    void VisitDesignatedInitExpr(const DesignatedInitExpr *DIE) {
+      for (const DesignatedInitExpr::Designator &D : DIE->designators()) {
+        if (!D.isFieldDesignator())
----------------
sammccall wrote:
> you're breaking after the first one - I think you'd like to report every one 
> instead?
> You'd test this with a DIE like `{ .Foo.Bar = 2 }` where `Foo` has struct 
> type.
> 
> (targetDecl only reports the *last* one, because the Designator can't be a 
> DynTypedNode, but we don't care about that here)
Sorry, I tried to understand this comment but I wasn't able to in the end. 
Could you please elaborate on this?

I'm adding the test cases that I originally thought you meant, but those work 
correctly so I assume I didn't understand what case you were referring to.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72867/new/

https://reviews.llvm.org/D72867



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to