https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/131166
>From 92e26f7fd99774ea9716389d3108547dbb878f90 Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Thu, 13 Mar 2025 12:24:18 -0400
Subject: [PATCH 1/6] [C23] Add __builtin_c23_va_start
This builtin is suppo
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder
`sanitizer-x86_64-linux-bootstrap-asan` running on `sanitizer-buildbot2` while
building `clang` at step 2 "annotate".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/52/builds/6817
Here is the relevan
@@ -6,27 +6,20 @@
#include
-#define DERP this is an error
-
void func(...) { // expected-warning {{'...' as the only parameter of a
function is incompatible with C standards before C23}}
// Show that va_start doesn't require the second argument in C23 mode.
va_list l
https://github.com/AaronBallman closed
https://github.com/llvm/llvm-project/pull/131166
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cor3ntin approved this pull request.
https://github.com/llvm/llvm-project/pull/131166
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/131166
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/131166
>From 92e26f7fd99774ea9716389d3108547dbb878f90 Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Thu, 13 Mar 2025 12:24:18 -0400
Subject: [PATCH 1/7] [C23] Add __builtin_c23_va_start
This builtin is suppo
@@ -6,27 +6,20 @@
#include
-#define DERP this is an error
-
void func(...) { // expected-warning {{'...' as the only parameter of a
function is incompatible with C standards before C23}}
// Show that va_start doesn't require the second argument in C23 mode.
va_list l
@@ -6,27 +6,20 @@
#include
-#define DERP this is an error
-
void func(...) { // expected-warning {{'...' as the only parameter of a
function is incompatible with C standards before C23}}
// Show that va_start doesn't require the second argument in C23 mode.
va_list l
@@ -4844,15 +4845,27 @@ static bool checkVAStartIsInVariadicFunction(Sema &S,
Expr *Fn,
bool Sema::BuiltinVAStart(unsigned BuiltinID, CallExpr *TheCall) {
Expr *Fn = TheCall->getCallee();
-
if (checkVAStartABI(*this, BuiltinID, Fn))
return true;
- // In C23 mode,
https://github.com/Sirraide approved this pull request.
https://github.com/llvm/llvm-project/pull/131166
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,43 @@
+// RUN: %clang_cc1 -std=c23 -fsyntax-only -ffreestanding -verify=expected,both
%s -triple i386-pc-unknown
+// RUN: %clang_cc1 -std=c23 -fsyntax-only -ffreestanding -verify=expected,both
%s -triple x86_64-apple-darwin9
+// RUN: %clang_cc1 -std=c23 -fsyntax-only
@@ -4864,14 +4877,22 @@ bool Sema::BuiltinVAStart(unsigned BuiltinID, CallExpr
*TheCall) {
return true;
// Verify that the second argument to the builtin is the last argument of the
- // current function or method. In C23 mode, if the second argument is an
- // intege
@@ -0,0 +1,43 @@
+// RUN: %clang_cc1 -std=c23 -fsyntax-only -ffreestanding -verify=expected,both
%s -triple i386-pc-unknown
+// RUN: %clang_cc1 -std=c23 -fsyntax-only -ffreestanding -verify=expected,both
%s -triple x86_64-apple-darwin9
+// RUN: %clang_cc1 -std=c23 -fsyntax-only
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/131166
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -833,6 +833,12 @@ def BuiltinVaStart : Builtin {
let Prototype = "void(__builtin_va_list_ref, ...)";
}
+def BuiltinC32VaStart : LangBuiltin<"C23_LANG"> {
erichkeane wrote:
still KIND OF sad.
https://github.com/llvm/llvm-project/pull/131166
@@ -0,0 +1,43 @@
+// RUN: %clang_cc1 -std=c23 -fsyntax-only -ffreestanding -verify=expected,both
%s -triple i386-pc-unknown
+// RUN: %clang_cc1 -std=c23 -fsyntax-only -ffreestanding -verify=expected,both
%s -triple x86_64-apple-darwin9
+// RUN: %clang_cc1 -std=c23 -fsyntax-only
@@ -4864,14 +4877,22 @@ bool Sema::BuiltinVAStart(unsigned BuiltinID, CallExpr
*TheCall) {
return true;
// Verify that the second argument to the builtin is the last argument of the
- // current function or method. In C23 mode, if the second argument is an
- // intege
https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/131166
>From 92e26f7fd99774ea9716389d3108547dbb878f90 Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Thu, 13 Mar 2025 12:24:18 -0400
Subject: [PATCH 1/3] [C23] Add __builtin_c23_va_start
This builtin is suppo
@@ -4864,14 +4877,22 @@ bool Sema::BuiltinVAStart(unsigned BuiltinID, CallExpr
*TheCall) {
return true;
// Verify that the second argument to the builtin is the last argument of the
AaronBallman wrote:
Yup, I'll fix.
https://github.com/llvm/llvm-proje
@@ -833,6 +833,12 @@ def BuiltinVaStart : Builtin {
let Prototype = "void(__builtin_va_list_ref, ...)";
}
+def BuiltinC32VaStart : LangBuiltin<"C23_LANG"> {
AaronBallman wrote:
This matches GCC's behavior: https://godbolt.org/z/K8Tdqa9v4
https://github.com
@@ -0,0 +1,43 @@
+// RUN: %clang_cc1 -std=c23 -fsyntax-only -ffreestanding -verify=expected,both
%s -triple i386-pc-unknown
+// RUN: %clang_cc1 -std=c23 -fsyntax-only -ffreestanding -verify=expected,both
%s -triple x86_64-apple-darwin9
+// RUN: %clang_cc1 -std=c23 -fsyntax-only
@@ -4864,14 +4877,22 @@ bool Sema::BuiltinVAStart(unsigned BuiltinID, CallExpr
*TheCall) {
return true;
// Verify that the second argument to the builtin is the last argument of the
erichkeane wrote:
```suggestion
// Verify that the second argument t
https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/131166
>From 92e26f7fd99774ea9716389d3108547dbb878f90 Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Thu, 13 Mar 2025 12:24:18 -0400
Subject: [PATCH 1/2] [C23] Add __builtin_c23_va_start
This builtin is suppo
@@ -0,0 +1,43 @@
+// RUN: %clang_cc1 -std=c23 -fsyntax-only -ffreestanding -verify=expected,both
%s -triple i386-pc-unknown
+// RUN: %clang_cc1 -std=c23 -fsyntax-only -ffreestanding -verify=expected,both
%s -triple x86_64-apple-darwin9
+// RUN: %clang_cc1 -std=c23 -fsyntax-only
@@ -833,6 +833,12 @@ def BuiltinVaStart : Builtin {
let Prototype = "void(__builtin_va_list_ref, ...)";
}
+def BuiltinC32VaStart : LangBuiltin<"C23_LANG"> {
erichkeane wrote:
Actually KIND OF sad that this is C23 only. a `va_start` macro having to
change
@@ -0,0 +1,43 @@
+// RUN: %clang_cc1 -std=c23 -fsyntax-only -ffreestanding -verify=expected,both
%s -triple i386-pc-unknown
+// RUN: %clang_cc1 -std=c23 -fsyntax-only -ffreestanding -verify=expected,both
%s -triple x86_64-apple-darwin9
+// RUN: %clang_cc1 -std=c23 -fsyntax-only
@@ -0,0 +1,43 @@
+// RUN: %clang_cc1 -std=c23 -fsyntax-only -ffreestanding -verify=expected,both
%s -triple i386-pc-unknown
+// RUN: %clang_cc1 -std=c23 -fsyntax-only -ffreestanding -verify=expected,both
%s -triple x86_64-apple-darwin9
+// RUN: %clang_cc1 -std=c23 -fsyntax-only
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/131166
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6,27 +6,20 @@
#include
-#define DERP this is an error
-
void func(...) { // expected-warning {{'...' as the only parameter of a
function is incompatible with C standards before C23}}
// Show that va_start doesn't require the second argument in C23 mode.
va_list l
llvmbot wrote:
@llvm/pr-subscribers-clang
@llvm/pr-subscribers-backend-x86
Author: Aaron Ballman (AaronBallman)
Changes
This builtin is supported by GCC and is a way to improve diagnostic behavior
for va_start in C23 mode. C23 no longer requires a second argument to the
va_start macro in
https://github.com/AaronBallman created
https://github.com/llvm/llvm-project/pull/131166
This builtin is supported by GCC and is a way to improve diagnostic behavior
for va_start in C23 mode. C23 no longer requires a second argument to the
va_start macro in support of variadic functions with n
32 matches
Mail list logo