Running > c-index-test -test-load-source all test\file.cpp -std=c++0x -I .\test with file.cpp containing: #define FILE_HEADER_NAME "fileheader.h" #if defined(FILE_HEADER_NAME) #include FILE_HEADER_NAME #endif gives following assert: Assertion failed: (PreprocessedEntities.empty() || !SourceMgr.isBeforeInTranslationUnit(Entity->getSourceRange().getBegin(), PreprocessedEntities.back()->getSourceRange().getBegin())) && "Adding a preprocessed entity that is before the previous one in TU", file ..\..\..\..\..llvm\tools\clang\lib\Lex\PreprocessingRecord.cpp, line 176 I guess the checkin that introduced this was Author: akirtzidis Date: Mon Sep 19 15:40:25 2011 New Revision: 140058
cloned to <rdar://problem/10273508>
Fixed in r141788, thanks for the report!