You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[llvm-rc] Don't interpret integer literals as octal numbers in rc.exe mode
It turns out that rc.exe doesn't interpret integer literals as
octal numbers - but GNU windres does. Previously, llvm-rc did
interpret them as octal.
Fix the issue by stripping away the leading zeros during
tokenization. The alternative (which would be somewhat cleaner,
as visible in tokenizer.test) would be to retain them in the
RCToken object, but strip them out before calling
StringRef::getAsInteger. Alternatively to handle the radix
detection locally in llvm-rc code and not rely on getAsInteger
to autodetect it. Both of those solutions require propagating
the IsWindres flag so that it is available within RCToken, or at
least when calling RCToken::intValue().
Fixes: #144723
0 commit comments