forked from OSchip/llvm-project
Fix compatibility for __builtin_stdarg_start
The __builtin_stdarg_start is the legacy spelling of __builtin_va_start.
It should behave exactly the same, but for the last 9 years it would
behave subtly different for diagnostics. Follow the change from
29ad95b232
to require custom type checking.
This commit is contained in:
parent
9564f46766
commit
09d4021853
|
@ -472,7 +472,7 @@ BUILTIN(__builtin___NSStringMakeConstantString, "FC*cC*", "nc")
|
|||
BUILTIN(__builtin_va_start, "vA.", "nt")
|
||||
BUILTIN(__builtin_va_end, "vA", "n")
|
||||
BUILTIN(__builtin_va_copy, "vAA", "n")
|
||||
BUILTIN(__builtin_stdarg_start, "vA.", "n")
|
||||
BUILTIN(__builtin_stdarg_start, "vA.", "nt")
|
||||
BUILTIN(__builtin_assume_aligned, "v*vC*z.", "nc")
|
||||
BUILTIN(__builtin_bcmp, "ivC*vC*z", "Fn")
|
||||
BUILTIN(__builtin_bcopy, "vv*v*z", "n")
|
||||
|
|
|
@ -164,6 +164,13 @@ void t6(Foo somearg, ... ) {
|
|||
__builtin_va_start(list, somearg);
|
||||
}
|
||||
|
||||
// __builtin_stdarg_start is a compatibility alias for __builtin_va_start,
|
||||
// it should behave the same
|
||||
void t6b(Foo somearg, ... ) {
|
||||
__builtin_va_list list;
|
||||
__builtin_stdarg_start(list, somearg); // second argument to 'va_start' is not the last named parameter [-Wvarargs]
|
||||
}
|
||||
|
||||
void t7(int n, ...) {
|
||||
__builtin_va_list list;
|
||||
__builtin_va_start(list, n);
|
||||
|
|
Loading…
Reference in New Issue