================ @@ -14,13 +14,18 @@ void __builtin_va_copy(double d); // expected-error@+2 {{cannot redeclare builtin function '__builtin_va_end'}} // expected-note@+1 {{'__builtin_va_end' is a builtin with type}} void __builtin_va_end(__builtin_va_list); -// RUN: %clang_cc1 %s -fsyntax-only -verify -// RUN: %clang_cc1 %s -fsyntax-only -verify -x c void __va_start(__builtin_va_list*, ...); + void *__builtin_assume_aligned(const void *, size_t, ...); #ifdef __cplusplus -void *__builtin_assume_aligned(const void *, size_t, ...) noexcept; -#else -void *__builtin_assume_aligned(const void *, size_t, ...); +constexpr void *__builtin_assume_aligned(const void *, size_t, ...); + void *__builtin_assume_aligned(const void *, size_t, ...) noexcept; +constexpr void *__builtin_assume_aligned(const void *, size_t, ...) noexcept; + void *__builtin_assume_aligned(const void *, size_t, ...) throw(); +constexpr void *__builtin_assume_aligned(const void *, size_t, ...) throw(); + ---------------- erichkeane wrote:
>From reading through that (and trying to search my memory): A number of our >`LIBBUILTIN` builtins are just replacements for things that would otherwise be >implemented in the library. So we need to allow them to be redeclared because they might be implemented in the library. However, I would be unopposed to a patch that makes declaring a `__builtin` spelled as reserved identifier ill-formed. https://github.com/llvm/llvm-project/pull/91894 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits