aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Basic/SourceManager.cpp3
-rw-r--r--lib/Lex/Preprocessor.cpp2
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/Basic/SourceManager.cpp b/lib/Basic/SourceManager.cpp
index 8cc7a8438d..a3e72e8b40 100644
--- a/lib/Basic/SourceManager.cpp
+++ b/lib/Basic/SourceManager.cpp
@@ -47,8 +47,7 @@ unsigned ContentCache::getSize() const {
}
void ContentCache::replaceBuffer(const llvm::MemoryBuffer *B) {
- if (B == Buffer)
- return;
+ assert(B != Buffer);
delete Buffer;
Buffer = B;
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp
index c757820494..229826af5d 100644
--- a/lib/Lex/Preprocessor.cpp
+++ b/lib/Lex/Preprocessor.cpp
@@ -240,7 +240,7 @@ bool Preprocessor::SetCodeCompletionPoint(const FileEntry *File,
return false;
}
-bool Preprocessor::isCodeCompletionFile(SourceLocation FileLoc) {
+bool Preprocessor::isCodeCompletionFile(SourceLocation FileLoc) const {
return CodeCompletionFile && FileLoc.isFileID() &&
SourceMgr.getFileEntryForID(SourceMgr.getFileID(FileLoc))
== CodeCompletionFile;