================

----------------
venk-ks wrote:

Good question — I think it's because of two things:
1. Although the reproducer in #244171 is in a `cpp` code block and invokes 
`clang++`, its command line passes `-x c`, so `int umask(char);` has C linkage 
(and in C++, `extern "C" int umask(char);` hits the same path, whereas plain 
C++ `int umask(char);` does return here).
2. `Umask` in `Builtins.td` is currently marked `IgnoreSignature` (since 
`mode_t` is target-specific), so any file-scope C-linkage `umask` declaration 
gets `Builtin::BIumask` regardless of its parameter type. Even once #231696 
replaces `IgnoreSignature` with a typed `mode_t(mode_t)` prototype, a user 
`typedef unsigned char mode_t; mode_t umask(mode_t);` would still get 
`BIumask`, so the `< 16`-bit check is still needed.

https://github.com/llvm/llvm-project/pull/244358
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to