aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorMalavika Samak <malavika.samak@gmail.com>2025-05-16 18:33:51 -0700
committerGitHub <noreply@github.com>2025-05-16 18:33:51 -0700
commit39315663a40a261772df94218fd33e205e888e54 (patch)
tree7bd3e66ecfe68f29ad985701a16729b5f3bd5520 /clang/lib/Frontend/CompilerInvocation.cpp
parentf7ef8dcbad9d5ac6cf2a8917d5ce03564fdfd0d8 (diff)
downloadllvm-39315663a40a261772df94218fd33e205e888e54.zip
llvm-39315663a40a261772df94218fd33e205e888e54.tar.gz
llvm-39315663a40a261772df94218fd33e205e888e54.tar.bz2
[-Wunsafe-buffer-usage] Fix false warnings when const sized array is safely accessed (array [idx %const]) (#140113)
The -Wunsafe-buffer-usage analysis currently warns when a const sized array is safely accessed, with an index that is bound by the remainder operator. The false alarm is now suppressed. Example: int circular_buffer(int array[10], uint idx) { return array[idx %10]; // Safe operation } rdar://148443453 --------- Co-authored-by: MalavikaSamak <malavika2@apple.com>
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions