<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">On Mar 17, 2013, at 8:35 AM, Erik Verbruggen <<a href="mailto:erik.verbruggen@me.com">erik.verbruggen@me.com</a>> wrote:<br><div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><br>On Mar 16, 2013, at 18:56, Argyrios Kyrtzidis <<a href="mailto:kyrtzidis@apple.com">kyrtzidis@apple.com</a>> wrote:<br><br><blockquote type="cite"><br>On Mar 16, 2013, at 10:48 AM, Argyrios Kyrtzidis <<a href="mailto:kyrtzidis@apple.com">kyrtzidis@apple.com</a>> wrote:<br><br><blockquote type="cite">On Mar 16, 2013, at 3:09 AM, Erik Verbruggen <<a href="mailto:erik.verbruggen@me.com">erik.verbruggen@me.com</a>> wrote:<br><br><blockquote type="cite">Hi,<br><br>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?<span class="Apple-converted-space"> </span><br></blockquote><br>It makes sure that when lexing for preprocessor directives tokens, that any cursors produced will refer to the correct clang_tokenize'd token.<br>Are you able to provide a preprocessed file for testing ?<br><br></blockquote><br>You can use "-E -frewrite-includes" to preserve preprocessor directives.<br></blockquote><br>See attachment.<br></div></blockquote><div><br></div><div>I can't reproduce using:</div><div><br></div><div>$ c-index-test -test-annotate-tokens=main.pp:1:1:100000:1 -x c++ main.pp > /dev/null</div><div><br></div><div>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 ?</div><div>If yes, could you separate the includes of that file, for example:</div><div><br></div><div>#include "a.h"</div>#include "b.h"</div><div>#include "c.h"</div><div><br></div><div><code></div><div><br></div><div>====></div><div><br></div><div>#include "preprocessed-headers.h"</div><div><br></div><div><code></div><div><br></div><div>-------</div><div><br></div><div>and see if using c-index-test on it reproduces the assertion hit ?</div><div><br></div></body></html>