<span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">I preprocessed the file using VS2008 (which is what we compile our projects in naturally) and ran that through libclang's indexer and got a different assertion:<div>
<br></div><div><div class="im" style="color: rgb(80, 0, 80); "><div>Program: c:\Python27-32\python.exe</div></div><div>File: E:\llvm\include\llvm/Support/Casting.h</div><div>Line: 194</div><div>Expression: isa<X>(Val) && "cast<Ty>() argument of incompatible type!"</div>
<div><br></div><div>Unfortunately the preprocessed file is 740kb, which isn't very usable when it comes to figuring out what's going on in the file, so I might have to try a different project and trim it down as much as possible, which might be difficult, to figure it out.</div>
</div></span><br><div class="gmail_quote">On Thu, Aug 25, 2011 at 4:06 PM, Daniel Jennings <span dir="ltr"><<a href="mailto:sekkusu@gmail.com">sekkusu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I'll try preprocessing the file before running it through the parser to see if I can reproduce it.<div><br></div><div>Thanks for the help!</div><div><div></div><div class="h5"><div><br><br><div class="gmail_quote">On Thu, Aug 25, 2011 at 4:04 PM, Douglas Gregor <span dir="ltr"><<a href="mailto:dgregor@apple.com" target="_blank">dgregor@apple.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div><br>
On Aug 25, 2011, at 3:48 PM, Daniel Jennings wrote:<br>
<br>
> Hi all,<br>
><br>
> I'm currently trying to run libclang's indexer over parts of an existing (large) codebase (that has never seen clang before) in order to run some metrics. I've got it working for some scenarios but in the process of getting it working I've run into a failed assertion in clang's AST code that I'm not sure how to track down. This problem only seems to exist when I try to run the indexer over parts of the real codebase; simple test CPP files work fine. As you'll see by the message, I'm using the python bindings for libclang, and I have my own locally built libclang.dll built under VS2010.<br>


><br>
> Program: c:\Python27-32\python.exe<br>
> File: E:\llvm\tools\clang\include\clang/AST/DeclCXX.h<br>
> Line: 522<br>
> Expression: DefinitionData && "queried property of class with no definition"<br>
><br>
> and<br>
><br>
> libclang: crash detected during parsing: {<br>
>   'source_filename' : '(null)'<br>
>   'command_line_args' : ['u:\Code\Services\MyService\MyService.cpp'],<br>
>   'unsaved_files' : [],<br>
>   'options' : 0,<br>
> }<br>
><br>
><br>
> I'm not entirely sure how to track this down and figure out if I'm doing something wrong. I'm just trying to run the indexer over a single translation unit (a single CPP file) but that CPP file includes all of our normal core headers, etc. which I think may be the problem. By this point I'm very familiar with how the Python bindings work/wrap the libclang code, and I have my IDE set up for working with libclang code, so if you need me to poke around or add some sort of diagnostic code I can.<br>


<br>
</div></div>This looks like Clang crashing during parsing. Can you reproduce the problem with preprocessed input? If so, please open a bug report so we can track down the issue.<br>
<br>
        - Doug<br>
<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br>