[cfe-commits] r98667 - /cfe/trunk/tools/CIndex/CIndex.cpp
Douglas Gregor
dgregor at apple.com
Tue Mar 16 13:26:15 PDT 2010
Author: dgregor
Date: Tue Mar 16 15:26:15 2010
New Revision: 98667
URL: http://llvm.org/viewvc/llvm-project?rev=98667&view=rev
Log:
Audit all callers of SourceManager::getBufferData(); fix the one that
needs better error recovery.
Modified:
cfe/trunk/tools/CIndex/CIndex.cpp
Modified: cfe/trunk/tools/CIndex/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/CIndex/CIndex.cpp?rev=98667&r1=98666&r2=98667&view=diff
==============================================================================
--- cfe/trunk/tools/CIndex/CIndex.cpp (original)
+++ cfe/trunk/tools/CIndex/CIndex.cpp Tue Mar 16 15:26:15 2010
@@ -2101,6 +2101,8 @@
bool Invalid = false;
llvm::StringRef Buffer
= SourceMgr.getBufferData(BeginLocInfo.first, &Invalid);
+ if (Invalid)
+ return;
Lexer Lex(SourceMgr.getLocForStartOfFile(BeginLocInfo.first),
CXXUnit->getASTContext().getLangOptions(),
More information about the cfe-commits
mailing list