[PATCH] C++ preprocessor fixes
David Nolden
zwabel at googlemail.com
Fri Nov 26 21:57:18 UTC 2010
2010/11/26 Dmitry Risenberg <dmitry.risenberg at gmail.com>:
>> In worst-case, the ranges should at least
>> be collapsed, so that you would get a (1,5) -> (1,5) range.
>
> This is easy to do, just need to mark every merged position as
> collapsed. I'll do it if there's no better solution. But how did the
> old code actually pass this test?
Actually the issue should be fixable. Look at
cppeditorintegrator.cpp:59 (in findPosition): The range is truncated
to the available space until the next anchored position (also see
pp-location.cpp:82).
This means that you just need to place an anchor behind the merged
token, and the joined range will be truncated to fit between the two
anchors.
Greetings, David
More information about the KDevelop-devel
mailing list