Review Request 122798: Fix rare error case in rangeForIncludePathSpec

Matthew Suozzo matthew.suozzo at
Wed Mar 4 05:42:33 UTC 2015

This is an automatically generated e-mail. To reply, visit:

Review request for KDevelop.

Repository: kdev-clang


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`


  clangsupport.cpp f4f49b0 



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.


Matthew Suozzo

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the KDevelop-devel mailing list