mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
I had an off-by-one in `DefaultAndMaxAccessLevelRequest::getCachedResult`. The original code added 1 to the last and first set bits when computing the `Max` and `Default` access levels: AccessLevel Max = static_cast<AccessLevel>(llvm::findLastSet(Bits) + 1); AccessLevel Default = static_cast<AccessLevel>(llvm::findFirstSet(Bits) + 1); LLVM got rid of `findLastSet`, so in the fun of figuring out the replacements (llvm::countl_zero and llvm::countl_zero), I missed adding the one to the result.
14 KiB
14 KiB