summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/include/clang/Basic/SourceLocation.h2
-rw-r--r--clang/lib/Lex/ScratchBuffer.cpp3
2 files changed, 1 insertions, 4 deletions
diff --git a/clang/include/clang/Basic/SourceLocation.h b/clang/include/clang/Basic/SourceLocation.h
index 2e0fb4d6709..5c529067232 100644
--- a/clang/include/clang/Basic/SourceLocation.h
+++ b/clang/include/clang/Basic/SourceLocation.h
@@ -65,7 +65,6 @@ private:
class SourceLocation {
unsigned ID;
friend class SourceManager;
-public:
enum {
// FileID Layout:
// bit 31: 0 -> FileID, 1 -> MacroID (invalid for FileID)
@@ -88,6 +87,7 @@ public:
// Useful constants.
ChunkSize = (1 << FilePosBits)
};
+public:
SourceLocation() : ID(0) {} // 0 is an invalid FileID.
diff --git a/clang/lib/Lex/ScratchBuffer.cpp b/clang/lib/Lex/ScratchBuffer.cpp
index ec07a71baf6..bef81caac71 100644
--- a/clang/lib/Lex/ScratchBuffer.cpp
+++ b/clang/lib/Lex/ScratchBuffer.cpp
@@ -40,9 +40,6 @@ SourceLocation ScratchBuffer::getToken(const char *Buf, unsigned Len) {
// Remember that we used these bytes.
BytesUsed += Len;
- assert(BytesUsed-Len < (1 << SourceLocation::FilePosBits) &&
- "Out of range file position!");
-
return BufferStartLoc.getFileLocWithOffset(BytesUsed-Len);
}
OpenPOWER on IntegriCloud