[cfe-dev] libclang: failing assert
kyrtzidis at apple.com
Mon Mar 18 16:07:31 PDT 2013
On Mar 17, 2013, at 8:35 AM, Erik Verbruggen <erik.verbruggen at me.com> wrote:
> On Mar 16, 2013, at 18:56, Argyrios Kyrtzidis <kyrtzidis at apple.com> wrote:
>> On Mar 16, 2013, at 10:48 AM, Argyrios Kyrtzidis <kyrtzidis at apple.com> wrote:
>>> On Mar 16, 2013, at 3:09 AM, Erik Verbruggen <erik.verbruggen at me.com> wrote:
>>>> When using libclang's clang_annotateTokens, I have a consistently failing assert in CIndex.cpp, line 5429. This is for both 3.2 and trunk. When I comment the assert out, everything looks to be fine. Is this assert valid, and if so, what is it checking?
>>> It makes sure that when lexing for preprocessor directives tokens, that any cursors produced will refer to the correct clang_tokenize'd token.
>>> Are you able to provide a preprocessed file for testing ?
>> You can use "-E -frewrite-includes" to preserve preprocessor directives.
> See attachment.
I can't reproduce using:
$ c-index-test -test-annotate-tokens=main.pp:1:1:100000:1 -x c++ main.pp > /dev/null
Does it occur with a particular source range ? What is the file whose tokens you are annotating ? Does using c-index-test on it reproduce the assertion hit ?
If yes, could you separate the includes of that file, for example:
and see if using c-index-test on it reproduces the assertion hit ?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev