aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CodeGenPrepare.cpp
diff options
context:
space:
mode:
authorTakuya Shimizu <shimizu2486@gmail.com>2023-08-26 14:41:05 +0900
committerTakuya Shimizu <shimizu2486@gmail.com>2023-08-26 14:41:05 +0900
commit0c9c9dd9a24f9d715d950fef0ac7aae01437af96 (patch)
treed6312c90ac5d70d5e9454ccf172adcc01d427f23 /llvm/lib/CodeGen/CodeGenPrepare.cpp
parent27da15381cbe2ac6fd1319f6409dbbab9a857b7b (diff)
downloadllvm-0c9c9dd9a24f9d715d950fef0ac7aae01437af96.zip
llvm-0c9c9dd9a24f9d715d950fef0ac7aae01437af96.tar.gz
llvm-0c9c9dd9a24f9d715d950fef0ac7aae01437af96.tar.bz2
[clang][Sema] Add truncation warning on fortified snprintf
This patch warns on snprintf calls whose n argument is known to be smaller than the size of the formatted string like ``` char buf[5]; snprintf(buf, 5, "Hello"); ``` This is a counterpart of gcc's Wformat-truncation Fixes https://github.com/llvm/llvm-project/issues/64871 Reviewed By: aaron.ballman, nickdesaulniers Differential Revision: https://reviews.llvm.org/D158562
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
0 files changed, 0 insertions, 0 deletions