[all-commits] [llvm/llvm-project] 1919cd: [analyzer] Fix non decimal macro values in tryExpa...
Colin Kinloch via All-commits
all-commits at lists.llvm.org
Tue Nov 25 05:41:55 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1919cd63223fdd6acd8a2c2d515f190160275226
https://github.com/llvm/llvm-project/commit/1919cd63223fdd6acd8a2c2d515f190160275226
Author: Colin Kinloch <colin at kinlo.ch>
Date: 2025-11-25 (Tue, 25 Nov 2025)
Changed paths:
M clang/lib/StaticAnalyzer/Core/CheckerHelpers.cpp
A clang/test/Analysis/std-c-library-functions-eof-2-rad.c
Log Message:
-----------
[analyzer] Fix non decimal macro values in tryExpandAsInteger (#168632)
Values were parsed into an unsigned APInt with just enough of a bit
width to hold the number then interpreted as signed values. This
resulted in hex, octal and binary literals from being interpreted as
negative when the most significant bit is 1.
For example the `-0b11` would have a bit width of 2, would be
interpreted as -1, then negated to become 1.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list