[PATCH] D101640: [clang][patch] Add support for option -fextend-arguments={32,64}: widen integer arguments to int64 in unprototyped function calls

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 13 05:03:23 PDT 2021


aaron.ballman added inline comments.


================
Comment at: clang/test/CodeGen/extend-arg-64.c:19
+
+int vararg(int, ...);
+
----------------
mibintc wrote:
> aaron.ballman wrote:
> > Can you also add a test for K&R C functions? e.g., `int knr();` `sum = knr(sum, u32, s32, u16, s16, u8, s8);`
> > 
> > Also, can you show what happens when passing a `long long` and an `_ExtInt`
> Yes I can add those tests.  BTW the _ExtInt types are not "promotable" therefore the UsualUnaryConversions have no effect. 
> Yes I can add those tests. BTW the _ExtInt types are not "promotable" therefore the UsualUnaryConversions have no effect.

Thanks! And yeah -- I figured that would be a good test to ensure that this flag doesn't impact types that wouldn't typically go through default argument promotion. Come to think of it, it may be good to have a test for float and double to show that those aren't impacted despite being promotable (with some comments explaining why).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101640/new/

https://reviews.llvm.org/D101640



More information about the cfe-commits mailing list