diff options
author | Kazu Hirata <kazu@google.com> | 2022-11-30 08:57:05 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2022-11-30 08:57:05 -0800 |
commit | eef7054f331b18c695a278704a6dd0b31dcd2be0 (patch) | |
tree | 13f808f68c0b92e6bfc28504ac0cc64981ad23f3 /clang/lib/Basic/SourceManager.cpp | |
parent | c7ca21816aa71a0d37eb9cec0b38edb40192ca90 (diff) | |
download | llvm-eef7054f331b18c695a278704a6dd0b31dcd2be0.zip llvm-eef7054f331b18c695a278704a6dd0b31dcd2be0.tar.gz llvm-eef7054f331b18c695a278704a6dd0b31dcd2be0.tar.bz2 |
[Basic] Fix a warning
This patch fixes:
clang/lib/Basic/SourceManager.cpp:1292:19: error: comparison of
integers of different signs: 'long' and 'unsigned long'
[-Werror,-Wsign-compare]
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
-rw-r--r-- | clang/lib/Basic/SourceManager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp index f61dc0f..a5f673f 100644 --- a/clang/lib/Basic/SourceManager.cpp +++ b/clang/lib/Basic/SourceManager.cpp @@ -1289,7 +1289,7 @@ LineOffsetMapping LineOffsetMapping::get(llvm::MemoryBufferRef Buffer, // scan sizeof(Word) bytes at a time for new lines. // This is much faster than scanning each byte independently. - if (End - Start > sizeof(Word)) { + if ((unsigned long)(End - Start) > sizeof(Word)) { do { Word = llvm::support::endian::read64(Buf, llvm::support::little); // no new line => jump over sizeof(Word) bytes. |