[PATCH] D138474: [clang] Speedup LineOffsetMapping::get

Thorsten via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 30 08:54:31 PST 2022


tschuett added a comment.

  error: comparison of integers of different signs: 'long' and 'unsigned long' [-Werror,-Wsign-compare]
   if (End - Start > sizeof(Word)) {



================
Comment at: clang/lib/Basic/SourceManager.cpp:1292
   // This is much faster than scanning each byte independently.
-  if (BufLen > sizeof(Word)) {
+  if (End - Start > sizeof(Word)) {
     do {
----------------
Sorry for being late. This comparison has issues.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138474/new/

https://reviews.llvm.org/D138474



More information about the cfe-commits mailing list