[PATCH] C++ preprocessor fixes

Dmitry Risenberg dmitry.risenberg at gmail.com
Wed Nov 24 20:38:11 UTC 2010

Uncommented the test and fixed a bug that appeared after rebasing to a
newer master. Not very elegant though, hope someone preprocessor-aware
will point to a better solution.

2010/11/24 Nicolás Alvarez <nicolas.alvarez at gmail.com>:
> On 23/11/2010, Dmitry Risenberg <dmitry.risenberg at gmail.com> wrote:
>> Attached is a patch that fixes C++ preprocessor implementation to work
>> according to the standard. This fixes
>> https://bugs.kde.org/show_bug.cgi?id=256433. Also some other macros
>> from Boost library are now expanded correctly.
>> An incorrect position in source is reported for a declaration in a
>> corner-case when the identifier is a result of concatenation by "##"
>> token - see lines 1782-1791 in test_cppcodecompletion.cpp. Fixing this
>> case doesn't look possible with current implementation, because the
>> concatenated string is treated as a whole after all '##" are applied.
> I notice many unrelated whitespace changes in your patch, which makes
> it harder to review. Attached is a rebased patch that removes all
> whitespace at end of lines in a separate commit, and doesn't do such
> whitespace changes in the rest of the commits.
> You should use QEXPECT_FAIL instead of commenting out tests (unless
> they don't compile, of course).
> The code changes look good to me; although I'm not familiar with the
> preprocessor code.
> --
> Nicolas
> --
> KDevelop-devel mailing list
> KDevelop-devel at kdevelop.org
> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel

Dmitry Risenberg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdevelop-cpp-preprocessor-v2.patch
Type: text/x-patch
Size: 82154 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20101124/d9ea8094/attachment.patch>

More information about the KDevelop-devel mailing list