swiftlang / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. This fork is used to manage Swift’s stable releases of Clang as well as support the Swift project.
https://llvm.org
Other
1.12k stars 332 forks source link

[Cherry-Pick][Wunsafe-buffer-usage] Fix false positives in handling string literals. (#115552) #9619

Closed malavikasamak closed 1 week ago

malavikasamak commented 1 week ago

Do not warn when a string literal is indexed and the idex value is within the bounds of the length of the string.

(rdar://139106996)

Co-authored-by: MalavikaSamak malavika2@apple.com (cherry picked from commit da032a609c1bde6f6775cf1650e08a205920d920)

malavikasamak commented 1 week ago

@swift-ci test