Skip to content

Commit 691b8c8

Browse files
committed
[Basic] Upgrade assert in findBufferContainingLocInternal
Almost all clients would crash for an invalid location, let's always assert.
1 parent d12cb84 commit 691b8c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Basic/SourceLoc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ namespace {
482482

483483
std::optional<unsigned>
484484
SourceManager::findBufferContainingLocInternal(SourceLoc Loc) const {
485-
assert(Loc.isValid());
485+
ASSERT(Loc.isValid());
486486

487487
// If the cache is out-of-date, update it now.
488488
unsigned numBuffers = LLVMSourceMgr.getNumBuffers();

0 commit comments

Comments
 (0)