Review Request 127027: Add support for CXType_FunctionNoProto

Kevin Funk kfunk at kde.org
Wed Feb 10 12:18:01 UTC 2016



> On Feb. 10, 2016, 11:58 a.m., Kevin Funk wrote:
> > Thanks!
> > 
> > Could you extend our unit tests a bit?
> > 
> > Extending `languages/clang/tests/files/functions.cpp` would be a good idea.
> > 
> > If I understood http://clang.llvm.org/doxygen/classclang_1_1FunctionNoProtoType.html correctly, then the FunctionNoProto type represents an argumentless function declaration.
> > 
> > Please make sure the new unit test fails before your patch, and succeeds afterwards.
> 
> Pedro Ferreira wrote:
>     Hm, sure, I'll contrive a test for it. Thank you for pointing out where I should be adding it!
>     I intended to include my real-world source that triggered this, but the source is unfortunately confidential.
>     
>     Will get back to you soon.

Just noticed: The K&R-style function decl syntax is a C-only feature.

In that case we have `tests/files/purec.c`, which unfortunately is useless atm (unit tests assume it's a C++ file). If you want to fix that, sure, give it a try.

Feel free to push your patch without a unit test for now.


- Kevin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127027/#review92209
-----------------------------------------------------------


On Feb. 10, 2016, 11:19 a.m., Pedro Ferreira wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127027/
> -----------------------------------------------------------
> 
> (Updated Feb. 10, 2016, 11:19 a.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdevelop
> 
> 
> Description
> -------
> 
> Add support for CXType_FunctionNoProto as having the same behaviour as CXType_FunctionProto.
> Also, undefine a local macro. This doesn't fix any problems, but I believe its a Good Thing to clean up local macros when we're done with them.
> 
> 
> Diffs
> -----
> 
>   languages/clang/duchain/builder.cpp 22d00f0 
> 
> Diff: https://git.reviewboard.kde.org/r/127027/diff/
> 
> 
> Testing
> -------
> 
> I found this by looking at the output of a running kdev session.
> 
> "kdevelop.plugins.clang: Unhandled type: 110"
> 
> Once I added this change, that output disappeared.
> 
> 
> Thanks,
> 
> Pedro Ferreira
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20160210/86871d51/attachment.html>


More information about the KDevelop-devel mailing list