[cfe-dev] libclang crash when reparsing

Erik Verbruggen erik.verbruggen at me.com
Tue Jul 26 07:32:57 PDT 2011


Hello,

I'm using libclang, and when using clang_reparseTranslationUnit method, I (nearly?) always get a crash:

Assertion failed: ((LatestDecl->getLocation().isInvalid() || NewLatest->getLocation().isInvalid() || !Reader.SourceMgr.isBeforeInTranslationUnit( NewLatest->getLocation(), LatestDecl->getLocation())) && "The new latest is supposed to come after the previous latest"), function VisitRedeclarableTemplateDecl, file /data/clang-llvm/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp, line 1094.
libclang: crash detected during reparsing

When I turn off CXTranslationUnit_CXXPrecompiledPreamble, things work fine (although quite a bit slower).

Does anybody have an idea how I can debug this, or in which direction I should look?

Regards,
Erik.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110726/706d1574/attachment.html>


More information about the cfe-dev mailing list