Review Request: New testcase for ExpressionParser

David Nolden zwabel+reviewboard at gmail.com
Wed Sep 30 13:48:52 UTC 2009


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


a) Expressions do not contain semicolons, if it contains a semicolon it becomes a statement, and those are not handled by the expression-parser, so I'm wondering why this works at all. Without the semicolon, the expression-parser should be able to handle it with "evaluateType()" and the correct parameters.
b) When evaluating "const char*", then the 'const' belongs onto the 'char', as it is a pointer to a 'const char'. The pointer itself is not constant and can be changed, but the pointed to object is constant. So you have to check for the const-modifier on the base type.

- David


On 2009-09-30 13:27:51, Bertjan Broeksema wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/1742/
> -----------------------------------------------------------
> 
> (Updated 2009-09-30 13:27:51)
> 
> 
> Review request for KDevelop and David Nolden.
> 
> 
> Summary
> -------
> 
> A test case to show incorrect parsing of "const char*" to "char *" in ExpressionParser.
> 
> 
> Diffs
> -----
> 
>   trunk/KDE/kdevelop/languages/cpp/cppduchain/tests/test_expressionparser.h 1029180 
>   trunk/KDE/kdevelop/languages/cpp/cppduchain/tests/test_expressionparser.cpp 1029180 
> 
> Diff: http://reviewboard.kde.org/r/1742/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Bertjan
> 
>





More information about the KDevelop-devel mailing list