LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 11120 - Assert in llvm\tools\clang\lib\Lex\PreprocessingRecord.cpp
Summary: Assert in llvm\tools\clang\lib\Lex\PreprocessingRecord.cpp
Status: RESOLVED FIXED
Alias: None
Product: clang
Classification: Unclassified
Component: -New Bugs (show other bugs)
Version: trunk
Hardware: PC Windows NT
: P normal
Assignee: Argyrios Kyrtzidis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-12 10:10 PDT by hans.walheim
Modified: 2011-10-12 12:37 PDT (History)
3 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hans.walheim 2011-10-12 10:10:33 PDT
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
Comment 1 Ted Kremenek 2011-10-12 12:35:35 PDT
cloned to <rdar://problem/10273508>
Comment 2 Argyrios Kyrtzidis 2011-10-12 12:37:34 PDT
Fixed in r141788, thanks for the report!