[cfe-dev] SourceManager invalid index error

Vane, Edwin edwin.vane at intel.com
Fri Feb 8 05:36:03 PST 2013

How did you create the rewriter? Is it using the same SourceManager as you're then using to get buffers? If not, keep in mind the FileIDs from one SourceManager don't mean anything to any other SourceManager.

-----Original Message-----
From: cfe-dev-bounces at cs.uiuc.edu [mailto:cfe-dev-bounces at cs.uiuc.edu] On Behalf Of madil90
Sent: Thursday, February 07, 2013 2:24 PM
To: cfe-dev at cs.uiuc.edu
Subject: [cfe-dev] SourceManager invalid index error

   I am parsing a few files and using the following code to extract the buffers for those files

*for (it = rewriter.buffer_begin(); it != rewriter.buffer_end(); it ++)
    const FileEntry* fileEntry =

   I keep getting the following error. Can you please explain what this means and what might be causing this error. Thanks for your help.

*const clang::SrcMgr::SLocEntry&
clang::SourceManager::getLocalSLocEntry(unsigned int, bool*) const:
Assertion 'Index < LocalSLocEntryTable.size() && "Invalid Index"' failed.*

View this message in context: http://clang-developers.42468.n3.nabble.com/SourceManager-invalid-index-error-tp4030362.html
Sent from the Clang Developers mailing list archive at Nabble.com.
cfe-dev mailing list
cfe-dev at cs.uiuc.edu

More information about the cfe-dev mailing list