aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2025-01-18 20:01:07 +0000
committerFlorian Hahn <flo@fhahn.com>2025-01-18 20:01:07 +0000
commit4233a15c9f8e6f77a00a5770a35b70ab8a2705c6 (patch)
tree976bf4ed00a88aaf1289791a3dd6308c8bcc5c3e /clang/lib/Format/Format.cpp
parent2b1e037adb274c515b6ebe7808cc7da6a5b9c3b3 (diff)
downloadllvm-4233a15c9f8e6f77a00a5770a35b70ab8a2705c6.zip
llvm-4233a15c9f8e6f77a00a5770a35b70ab8a2705c6.tar.gz
llvm-4233a15c9f8e6f77a00a5770a35b70ab8a2705c6.tar.bz2
[FunctionAttrs] Handle zero writes in initializes inference.
ConstantRange's constructor asserts that the range not empty, except if lower/upper are min or max values. Check if the length is strictly positive instead of just non-negative so std::nullopt is returned when the size is 0. If that's the case, the access doesn't initialize anything. This should fix a crash when building on macOS with ASan & UBsan after https://github.com/llvm/llvm-project/pull/97373 / https://github.com/llvm/llvm-project/pull/117104 landed: https://green.lab.llvm.org/job/llvm.org/job/clang-stage2-cmake-RgSan/664/console
Diffstat (limited to 'clang/lib/Format/Format.cpp')
0 files changed, 0 insertions, 0 deletions