diff options
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r-- | lib/Lex/Preprocessor.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp index 5584b18da1..880ff43c66 100644 --- a/lib/Lex/Preprocessor.cpp +++ b/lib/Lex/Preprocessor.cpp @@ -232,8 +232,9 @@ bool Preprocessor::SetCodeCompletionPoint(const FileEntry *File, return false; // Load the actual file's contents. - const MemoryBuffer *Buffer = SourceMgr.getMemoryBufferForFile(File); - if (!Buffer) + bool Invalid = false; + const MemoryBuffer *Buffer = SourceMgr.getMemoryBufferForFile(File, &Invalid); + if (Invalid) return true; // Find the byte position of the truncation point. |