Review Request 111007: kdevelop: expand macro does not work correctly when the arguments are split over multiple lines

Milian Wolff mail at milianw.de
Wed Jul 17 22:46:36 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111007/#review36088
-----------------------------------------------------------


Apparently the tests don't pass (anymore?)

FAIL!  : TestCppAssistants::testMacroExpansion(newlines) Compared values are not the same
   Actual (macroContext->body()): FOO
   Expected (expected): BAR(1 ,2 ,3 ) 
   Loc: [/home/milian/projects/kde4/kdevelop/languages/cpp/tests/test_cppassistants.cpp(392)]
FAIL!  : TestCppAssistants::testMacroExpansion(multibrace) Compared values are not the same
   Actual (macroContext->body()): FOO
   Expected (expected): BAR((1) ,2 ,3 ) 
   Loc: [/home/milian/projects/kde4/kdevelop/languages/cpp/tests/test_cppassistants.cpp(392)]

- Milian Wolff


On July 17, 2013, 6:10 p.m., Hannes Hofer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111007/
> -----------------------------------------------------------
> 
> (Updated July 17, 2013, 6:10 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Description
> -------
> 
> when a macro is used that requires arguments and those arguments are split over multiple lines kdevelop is not able to expand the macro.
> the expander respects only the current line and therefore the parser does not find the corresponding close brace.
> in this fix the next line is added to the argument list until the close brace is found or EOF is reached.
> 
> 
> Diffs
> -----
> 
>   languages/cpp/cppduchain/navigation/macronavigationcontext.h eeaa9f6 
>   languages/cpp/cppduchain/navigation/macronavigationcontext.cpp f751990 
>   languages/cpp/cpplanguagesupport.cpp e2ff0f1 
>   languages/cpp/tests/test_cppassistants.h 79fbb99 
>   languages/cpp/tests/test_cppassistants.cpp 42c7949 
> 
> Diff: http://git.reviewboard.kde.org/r/111007/diff/
> 
> 
> Testing
> -------
> 
> unit test included.
> 
> 
> Thanks,
> 
> Hannes Hofer
> 
>

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


More information about the KDevelop-devel mailing list