Review Request 122798: Fix rare error case in rangeForIncludePathSpec
Matthew Suozzo
matthew.suozzo at gmail.com
Mon Dec 7 11:15:10 UTC 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122798/
-----------------------------------------------------------
(Updated Dec. 7, 2015, 11:15 a.m.)
Status
------
This change has been marked as submitted.
Review request for KDevelop.
Changes
-------
Submitted with commit bbbeebbb97ac0476536af2338f13780335108cdb by Gleb Popov to branch 5.0.
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/20151207/b7ceabad/attachment.html>
More information about the KDevelop-devel
mailing list