Review Request 122798: Fix rare error case in rangeForIncludePathSpec
Aleix Pol Gonzalez
aleixpol at kde.org
Wed Mar 4 12:21:40 UTC 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122798/#review76996
-----------------------------------------------------------
Maybe we can get a unit test for this?
- Aleix Pol Gonzalez
On March 4, 2015, 6:42 a.m., Matthew Suozzo wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122798/
> -----------------------------------------------------------
>
> (Updated March 4, 2015, 6:42 a.m.)
>
>
> Review request for KDevelop.
>
>
> Repository: kdev-clang
>
>
> Description
> -------
>
> Edits to rangeForIncludePathSpec
> ================================
> #### Fixes an admittedly rare error case where the include parser will yield incorrect results.
> * `include`d files whose names include quotes or angle brackets cause issues with the algorithm used
> * Ex: `#include "foo<>.h"` is valid in the C preprocessor but only highlighted `foo<>` because '>' was a closing token
> * Ex: Same for `#include <foo\".h>` and `#include "foo\".h"`(again, these are real corner cases...)
>
> #### Removes an extraneous check
> * KTextEditor::Range already performs the bounds adjustment done at the bottom of `rangeForIncludePathSpec`
>
>
> Diffs
> -----
>
> clangsupport.cpp f4f49b0
>
> Diff: https://git.reviewboard.kde.org/r/122798/diff/
>
>
> Testing
> -------
>
> Observed the highlighting of the aforementioned imports. The fix highlighted the mangled import names properly.
>
> kdevelop was also able to suggest functions from these headers so the files themselves seem to be parsed correctly.
>
>
> Thanks,
>
> Matthew Suozzo
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20150304/931ee8db/attachment.html>
More information about the KDevelop-devel
mailing list