Review Request 110638: Fix every compound assignment operator being regognized as "+="

Aleix Pol Gonzalez aleixpol at kde.org
Fri May 24 20:16:20 UTC 2013


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


Nice work, Sven! :)

/me sits and waits for milian or olivier to review

- Aleix Pol Gonzalez


On May 24, 2013, 6:39 p.m., Sven Brauch wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110638/
> -----------------------------------------------------------
> 
> (Updated May 24, 2013, 6:39 p.m.)
> 
> 
> Review request for KDevelop and Milian Wolff.
> 
> 
> Description
> -------
> 
> It was noticed that before this change, all operators in statements
> such as
>     Foo a, b;
>     a ^= b;
>     a &= b;
> etc. will be displayed as uses of Foo::operator+=(), which is obviously
> wrong. The reason for this was some rather curious code, which just
> treated every of these operators as "Token_assign" in the lexer,
> and some other code which treated each "Token_assign" as "+=" in the
> analyzer. To fix the issue, this had to be sorted out.
>     - Token_assign doesn't make sense anyways, since assignments are
>     represented as "=". So, remove the token completely.
>     - Instead of lexing every compound assignment operator as "Assign",
>     yield different token types for each.
>     - In the code which handles the operators, change the function from
>     using its own list of tokenkind -- tokenText mapping to use the
>     official one.
> Also included is a unit test for the fix.
> 
> 
> Diffs
> -----
> 
>   languages/cpp/cppduchain/builtinoperators.cpp 0def471 
>   languages/cpp/cppduchain/expressionvisitor.cpp 3db7be0 
>   languages/cpp/cppduchain/tests/test_duchain.h ebc1ee8 
>   languages/cpp/cppduchain/tests/test_duchain.cpp f83416b 
>   languages/cpp/parser/lexer.cpp b39387a 
>   languages/cpp/parser/parser.cpp 41f00ec 
>   languages/cpp/parser/tokens.h dd173a3 
>   languages/cpp/parser/tokens.cpp 9086a8e 
> 
> Diff: http://git.reviewboard.kde.org/r/110638/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Sven Brauch
> 
>

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


More information about the KDevelop-devel mailing list