Fix incorrect check for running out of source locations.
authorPaul Pluzhnikov <ppluzhnikov@google.com>
Tue, 18 Oct 2022 20:47:55 +0000 (20:47 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Tue, 18 Oct 2022 20:48:00 +0000 (20:48 +0000)
commit5b773dcd2de0c4844814266a90dac14c349b8f18
tree0a4a0c57ef48e5b9b96e13ce7b0501ccd8132904
parent0e77b63bc01112594ec312b0d8892114ec263303
Fix incorrect check for running out of source locations.

When CurrentLoadedOffset is less than TotalSize, current code will
trigger unsigned overflow and will not return an "allocation failed"
indicator.

Google ref: b/248613299

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D135192
clang/lib/Basic/SourceManager.cpp