Serafean wrote:

> > > I'm not certain this is the correct approach. I think we should expose a 
> > > cursor kind for a coroutine statement body so that you can test for this 
> > > sort of thing if needed
> > 
> > 
> > Ok, I'll see how exposing the body's compound statement would work.
> 
> Hopefully it's straightforward:
> 
> https://github.com/llvm/llvm-project/blob/6e205c0d8e99c44c420afd09d258b8e8fa924373/clang/tools/libclang/CXCursor.cpp#L296

It was very straightforward: got point 1 functional just by exposing the 
CoroutineBodyStmt. Thanks for the pointer.

> >   
> > This was a naive attempt to do part 1, as so far I have no idea how to do 
> > the rest.
> > Thanks for the comments.
> 
> Ah good to know, thank you! I think this doesn't necessarily require the 
> helper functions to be upstream, but it will require exposing more low-level 
> details from the C indexing APIs. We usually try to expose the building 
> blocks rather than the helper methods, so focusing on what information is 
> necessary to expose to get to the point of writing a helper method would be a 
> good approach IMO.

Ok, will do it that way. Closing this PR, but I'll be back ;)

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

Reply via email to