diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2023-09-02 21:17:18 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2023-12-08 17:34:50 +0000 |
commit | 06c3fb2749bda94cb5201f81ffdb8fa6c3161b2e (patch) | |
tree | 62f873df87c7c675557a179e0c4c83fe9f3087bc /contrib/llvm-project/clang/lib/Basic/SourceManager.cpp | |
parent | cf037972ea8863e2bab7461d77345367d2c1e054 (diff) | |
parent | 7fa27ce4a07f19b07799a767fc29416f3b625afb (diff) |
Diffstat (limited to 'contrib/llvm-project/clang/lib/Basic/SourceManager.cpp')
-rw-r--r-- | contrib/llvm-project/clang/lib/Basic/SourceManager.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/contrib/llvm-project/clang/lib/Basic/SourceManager.cpp b/contrib/llvm-project/clang/lib/Basic/SourceManager.cpp index 3d7a53879584..6fa802a33a50 100644 --- a/contrib/llvm-project/clang/lib/Basic/SourceManager.cpp +++ b/contrib/llvm-project/clang/lib/Basic/SourceManager.cpp @@ -1302,8 +1302,7 @@ LineOffsetMapping LineOffsetMapping::get(llvm::MemoryBufferRef Buffer, // in [\n, \r + 1 [ // Scan for the next newline - it's very likely there's one. - unsigned N = - llvm::countTrailingZeros(Mask) - 7; // -7 because 0x80 is the marker + unsigned N = llvm::countr_zero(Mask) - 7; // -7 because 0x80 is the marker Word >>= N; Buf += N / 8 + 1; unsigned char Byte = Word; @@ -1313,7 +1312,7 @@ LineOffsetMapping LineOffsetMapping::get(llvm::MemoryBufferRef Buffer, if (*Buf == '\n') { ++Buf; } - LLVM_FALLTHROUGH; + [[fallthrough]]; case '\n': LineOffsets.push_back(Buf - Start); }; |