ClangWrapper.Swift icon indicating copy to clipboard operation
ClangWrapper.Swift copied to clipboard

Cursor does not provides correct children for function arguments that written over multiple lines.

Open eonil opened this issue 10 years ago • 2 comments

For this given example,

size_t
ReadRawData (lldb::SBError& error,
             lldb::offset_t offset,
             void *buf,
             size_t size);

Clang C API provides this cursor node with no child.

- Cursor "ReadRawData" (CXXMethod)

It should have some ParmDecl children, but there's none. I don't know why this happens, and how to fix this.

It's type reports int (lldb::SBError &, lldb::offset_t, void *, int). So it seems parsing them correctly. (size_t has been lost, but it's another problem)

It's captured source code is

size_t ReadRawData ( lldb :: SBError & error , lldb :: offset_t offset , void * buf , size_t size ) ;

eonil avatar Jan 26 '15 04:01 eonil

Then it seems to be a bug in C API layer.

eonil avatar Jan 26 '15 04:01 eonil

This is related to issue #1. I still couldn't find a good way to determine whether the type has been correctly resolved or not, but missing types can be resolved by adding proper compiler parameters. See issue #1's comment.

eonil avatar Jan 26 '15 09:01 eonil