summaryrefslogtreecommitdiff
path: root/lib/Lex/PPLexerChange.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-12-06 09:19:25 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-12-06 09:19:25 +0000
commit2ffb14f004affc363d86d6c7c63c356190db3679 (patch)
tree0f3e279dfc03a64500b21598d08df2ad0b3f73e1 /lib/Lex/PPLexerChange.cpp
parent63ceaa32a2371e38d1f912080fe471285e6b6e56 (diff)
downloadclang-2ffb14f004affc363d86d6c7c63c356190db3679.tar.gz
clang-2ffb14f004affc363d86d6c7c63c356190db3679.tar.bz2
clang-2ffb14f004affc363d86d6c7c63c356190db3679.tar.xz
Unbreak and add test case for r90276, a situation in which getBuffer is expected to fail.
Also, update SourceManager.h doxyments for getBuffer() to reflect reality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90701 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PPLexerChange.cpp')
-rw-r--r--lib/Lex/PPLexerChange.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Lex/PPLexerChange.cpp b/lib/Lex/PPLexerChange.cpp
index 5cdfeafa33..ce1b19ca7c 100644
--- a/lib/Lex/PPLexerChange.cpp
+++ b/lib/Lex/PPLexerChange.cpp
@@ -81,8 +81,8 @@ bool Preprocessor::EnterSourceFile(FileID FID, const DirectoryLookup *CurDir,
// Get the MemoryBuffer for this FID, if it fails, we fail.
const llvm::MemoryBuffer *InputFile =
- if (InputFile == 0)
getSourceManager().getBuffer(FID, &ErrorStr);
+ if (!ErrorStr.empty())
return true;
EnterSourceFileWithLexer(new Lexer(FID, InputFile, *this), CurDir);