Review Request 121338: Fix bug on multi-line function-macro expansion, format preprocessed body for Cpp::NavigationWidget

Milian Wolff mail at milianw.de
Mon Dec 15 10:44:52 UTC 2014


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


please fix the unit test, and - if possible - the style nitpicks. then I think this can go in.

thanks!


languages/cpp/cpplanguagesupport.cpp
<https://git.reviewboard.kde.org/r/121338/#comment50215>

    style nitpick: here and below, i.e. around commas, minus etc. pp., add witespaces around operators.
    
        tail.truncate(tail.length() - 1)
    
    below there is stuff that should be:
    
        preprocessedBody = i->formatSourceWithStyle(style, preprocessedBody, KUrl(), mime);
    
    and so forth



languages/cpp/cpplanguagesupport.cpp
<https://git.reviewboard.kde.org/r/121338/#comment50216>

    style



languages/cpp/cpplanguagesupport.cpp
<https://git.reviewboard.kde.org/r/121338/#comment50218>

    style



languages/cpp/cpplanguagesupport.cpp
<https://git.reviewboard.kde.org/r/121338/#comment50217>

    style, also line below



languages/cpp/parser/rpp/pp-engine.cpp
<https://git.reviewboard.kde.org/r/121338/#comment50219>

    style



languages/cpp/parser/rpp/pp-scanner.h
<https://git.reviewboard.kde.org/r/121338/#comment50220>

    style



languages/cpp/parser/rpp/pp-scanner.cpp
<https://git.reviewboard.kde.org/r/121338/#comment50221>

    style



languages/cpp/parser/rpp/pp-scanner.cpp
<https://git.reviewboard.kde.org/r/121338/#comment50222>

    style:
    
        if(multiline && input == '\' && ...



languages/cpp/parser/rpp/test/t012.cpp
<https://git.reviewboard.kde.org/r/121338/#comment50214>

    sorry for the confusing code architecture, but I don't think these files are actually "tested". I.e. you can write in here whatever you like, and it won't ever be noticed ;-)
    
    I'll actually remove these files. Instead, please add your code to e.g. cpp/parser/tests/test_parser.cpp, e.g. within `testPreprocessor`, which will also show you how to run an example through the preprocessor, and how to compare its results to an expected outcome.


- Milian Wolff


On Dec. 7, 2014, 2:31 a.m., Zhang HuiJie wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/121338/
> -----------------------------------------------------------
> 
> (Updated Dec. 7, 2014, 2:31 a.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdevelop
> 
> 
> Description
> -------
> 
> Fix bug on multi-line function-macros expansion, format preprocessed body for Cpp::NavigationWidget.
> 
> 
> Diffs
> -----
> 
>   languages/cpp/parser/rpp/test/t012.cpp PRE-CREATION 
>   languages/cpp/parser/rpp/pp-engine.cpp 8f6c8da 
>   languages/cpp/parser/rpp/pp-scanner.h 94fab52 
>   languages/cpp/parser/rpp/pp-scanner.cpp 28479d8 
>   languages/cpp/cpplanguagesupport.cpp 79530e9 
> 
> Diff: https://git.reviewboard.kde.org/r/121338/diff/
> 
> 
> Testing
> -------
> 
> This patch work well on multi-line function-macros expansion, no test will fail because of this patch.
> 
> 
> Thanks,
> 
> Zhang HuiJie
> 
>

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


More information about the KDevelop-devel mailing list