[PATCH] C++ preprocessor fixes

Nicolás Alvarez nicolas.alvarez at gmail.com
Wed Nov 24 03:48:56 UTC 2010


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdevelop-cpp-preprocessor-nows.patch
Type: text/x-patch
Size: 78812 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20101124/a2625c42/attachment.patch>


More information about the KDevelop-devel mailing list