https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/133472
>From f9268b3a331fd8caf2440d742a1f084c0f9648ce Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Fri, 28 Mar 2025 13:01:58 -0400
Subject: [PATCH 01/11] [C11] Implement WG14 N1285 (temporary lifetimes)
Thi
https://github.com/AaronBallman closed
https://github.com/llvm/llvm-project/pull/133472
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -7653,8 +7653,11 @@ ExprResult Sema::TemporaryMaterializationConversion(Expr
*E) {
// In C++98, we don't want to implicitly create an xvalue.
// FIXME: This means that AST consumers need to deal with "prvalues" that
// denote materialized temporaries. Maybe we should
https://github.com/AaronBallman closed
https://github.com/llvm/llvm-project/pull/135167
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AaronBallman created
https://github.com/llvm/llvm-project/pull/135167
This was found via a Coverity static analysis pass. There's no indication this
was being used incorrectly in practice, but there are public interfaces which
require `BR` to be non-null and valid, and `BR`
AaronBallman wrote:
> > > @AaronBallman @erichkeane Thank you for your comments. There's a question
> > > here about whether to report an error or a warning here, and you're in a
> > > divided opinion. My opinion is that it is better to use the error report
> > > here. Because these are two mu
@@ -5585,6 +5585,18 @@ SourceRange EnumConstantDecl::getSourceRange() const {
return SourceRange(getLocation(), End);
}
+bool EnumConstantDecl::isOutOfLine() const {
+ if (Decl::isOutOfLine())
+return true;
+
+ // In C++, if the enumeration is out of line, the enumerat
@@ -151,3 +151,21 @@ class C {
// expected-error {{unexpected ';' before ')'}}
};
}
+
+#if __cplusplus >= 201103L
+namespace GH23317 {
+struct A {
AaronBallman wrote:
Yup, that still compiles without diagnosing.
https://github.com/llvm
@@ -5585,6 +5585,18 @@ SourceRange EnumConstantDecl::getSourceRange() const {
return SourceRange(getLocation(), End);
}
+bool EnumConstantDecl::isOutOfLine() const {
+ if (Decl::isOutOfLine())
+return true;
+
+ // In C++, if the enumeration is out of line, the enumerat
AaronBallman wrote:
> Hmm, I think what this section is trying to demonstrate is that ‘_According
> to the standard_, this is in the path of execution and therefore _supposed_
> to be considered unlikely, but we don’t do that’, so maybe it’d be better to
> reword/expand the comment instead?
T
https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/134998
>From 6864d9e8c5d20830adbe6bf226943041ebacf5e1 Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Wed, 9 Apr 2025 08:35:40 -0400
Subject: [PATCH 1/2] No longer add enumeration constants to the wrong scope
https://github.com/AaronBallman closed
https://github.com/llvm/llvm-project/pull/135013
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
AaronBallman wrote:
> > > I thought CWG's preferred direction on this was to reject entirely?
> >
> >
> > What do they wish to reject? Defining an enum in a different declaration
> > context than its primary context? That seems odd.
> > Do you have an idea of the CWG DR? We looked but couldn't
@@ -1523,7 +1523,10 @@ void Sema::PushOnScopeChains(NamedDecl *D, Scope *S,
bool AddToContext) {
// Out-of-line definitions shouldn't be pushed into scope in C++, unless they
// are function-local declarations.
- if (getLangOpts().CPlusPlus && D->isOutOfLine() && !S->get
https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/135013
>From 99190952174f334642ec237596969f9b0c846411 Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Wed, 9 Apr 2025 09:51:49 -0400
Subject: [PATCH 1/2] Fix crash with align_value diagnostic reporting
We were
AaronBallman wrote:
Note, I filed an issue about the duplicate diagnostics at
https://github.com/llvm/llvm-project/issues/135012
https://github.com/llvm/llvm-project/pull/135013
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llv
https://github.com/AaronBallman created
https://github.com/llvm/llvm-project/pull/134998
Previously, the enumerators were being added both to the class context and to
the namespace scope. e.g., we accepted this invalid code:
```
struct A {
enum E : int;
};
enum A::E : int { e1 = 100
https://github.com/AaronBallman requested changes to this pull request.
My primary concern remains the false positives with the analysis; that means we
will be rejecting (a lot of) valid code. I just went through the bug database
and resolved ~10 issues as duplicates of
https://github.com/llvm
https://github.com/AaronBallman closed
https://github.com/llvm/llvm-project/pull/134884
___
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/134884
>From 2661b9381e0a182fb53a81c8bf66cecd51c73b0f Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Tue, 8 Apr 2025 13:17:32 -0400
Subject: [PATCH 1/2] Reject invalid integer constants in unevaluated
preproc
https://github.com/AaronBallman created
https://github.com/llvm/llvm-project/pull/134884
Clang was previously accepting invalid code like:
```
#if 1 ? 1 : 9
#endif
```
because the integer constant (which is too large to fit into any standard or
extended integer type) was
https://github.com/AaronBallman commented:
Please be sure to update
https://github.com/llvm/llvm-project/blob/46d4c3b1f64dfbca2a029ff30434aaa5248fc190/clang/docs/InternalsManual.rst?plain=1#L227
as well so the new `%quoted` specifier is explicitly documented.
https://github.com/llvm/llvm-proje
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/134617
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AaronBallman approved this pull request.
LGTM aside from an 80-col formatting nit, thank you for the fix!
https://github.com/llvm/llvm-project/pull/134617
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org
@@ -1031,6 +1031,8 @@ def err_mainlike_template_decl : Error<"%0 cannot be a
template">;
def err_main_returns_nonint : Error<"'main' must return 'int'">;
def ext_main_returns_nonint : ExtWarn<"return type of 'main' is not 'int'">,
InGroup;
+def ext_main_no_return : Extensi
@@ -3134,6 +3134,9 @@ def warn_function_attribute_ignored_in_stmt : Warning<
"use '%0' on statements">,
InGroup;
+def err_musttail_conflicts_with_not_tail_called : Error<
AaronBallman wrote:
Can we reuse `err_musttail_mismatch` instead?
https://github.co
https://github.com/AaronBallman commented:
Thank you for this! Please be sure to add a release note to
`clang/docs/ReleaseNotes.rst` so user know about the fix.
https://github.com/llvm/llvm-project/pull/134465
___
cfe-commits mailing list
cfe-commits@
=?utf-8?q?Mészáros?= Gergely
Message-ID:
In-Reply-To:
https://github.com/AaronBallman commented:
The changes should come with a release note in `clang/docs/ReleaseNotes.rst` so
users know about the fix.
https://github.com/llvm/llvm-project/pull/131477
@@ -144,3 +177,13 @@ void test_compound_literals() {
static_assert(_Countof((int[2]){}) == 2);
static_assert(_Countof((int[]){1, 2, 3, 4}) == 4);
}
+
+static int test_f1();
+static int test_f2(); // expected-warning {{never defined}}
AaronBallman wrote:
AaronBallman wrote:
> What are the ABI guarantees of libclang? Won't adding a new field to CXString
> break compatibility?
That's a great point, it would be an ABI breaking change and we don't want
those in libclang:
https://github.com/llvm/llvm-project/blob/25e08c0b9cafaab09af35ce6a03317ffd5
@@ -16232,7 +16232,9 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt
*Body,
// If the function implicitly returns zero (like 'main') or is naked,
// don't complain about missing return statements.
- if (FD->hasImplicitReturnZero() || FD->hasAttr())
+
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/134214
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AaronBallman approved this pull request.
LGTM! What do you think @erichkeane?
https://github.com/llvm/llvm-project/pull/134089
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cf
AaronBallman wrote:
Ugh, the issue was on my end. I downloaded the changes, rebuilt the
documentation... and skipped the step where I rebuild clang-tblgen. When I do
things properly, it works (shocking, I know).
https://github.com/llvm/llvm-project/pull/134089
_
https://github.com/AaronBallman closed
https://github.com/llvm/llvm-project/pull/134089
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -52,6 +54,12 @@ typedef struct {
* to `std::string::c_str()`.
*/
CINDEX_LINKAGE const char *clang_getCString(CXString string);
+/**
+ * This function behaves the same as clang_getCString, except that it also
+ * returns the size through the length parameter. The length par
@@ -0,0 +1,6 @@
+/* RUN: %clang_cc1 -std=c89 -fsyntax-only -verify -pedantic
-Wno-strict-prototypes %s
+ */
+
+int main() {
AaronBallman wrote:
You should also have a test where `main` does return a value to show that we
silence the diagnostic, and another test
AaronBallman wrote:
This is what I'm getting (I applied the patch locally, re-ran clang-tblgen,
then re-ran `make html` to make the docs):

https://github.com/llvm/llvm-project/pull
@@ -11399,6 +11400,22 @@ static QualType mergeEnumWithInteger(ASTContext
&Context, const EnumType *ET,
return {};
}
+QualType ASTContext::mergeTagTypes(QualType LHS, QualType RHS) {
AaronBallman wrote:
I'm following the naming convention already used by ot
@@ -450,6 +453,41 @@ class StmtComparer {
};
} // namespace
+static bool
+CheckStructurallyEquivalentAttributes(StructuralEquivalenceContext &Context,
+ const Decl *D1, const Decl *D2,
+ const Decl *Prim
AaronBallman wrote:
Ping
https://github.com/llvm/llvm-project/pull/132939
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
AaronBallman wrote:
Ping
https://github.com/llvm/llvm-project/pull/133472
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -16232,7 +16232,9 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt
*Body,
// If the function implicitly returns zero (like 'main') or is naked,
// don't complain about missing return statements.
- if (FD->hasImplicitReturnZero() || FD->hasAttr())
+
@@ -1031,6 +1031,8 @@ def err_mainlike_template_decl : Error<"%0 cannot be a
template">;
def err_main_returns_nonint : Error<"'main' must return 'int'">;
def ext_main_returns_nonint : ExtWarn<"return type of 'main' is not 'int'">,
InGroup;
+def ext_main_no_return : Extensi
https://github.com/AaronBallman commented:
Thank you for working on this!
https://github.com/llvm/llvm-project/pull/134617
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -9753,27 +9753,46 @@ def err_operator_new_delete_invalid_result_type : Error<
def err_operator_new_delete_dependent_result_type : Error<
"%0 cannot have a dependent return type; use %1 instead">;
def err_operator_new_delete_too_few_parameters : Error<
- "%0 must have at l
AaronBallman wrote:
Thank you for the quick fix to that issue!
https://github.com/llvm/llvm-project/pull/134430
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,6 @@
+/* RUN: %clang_cc1 -std=c89 -fsyntax-only -verify -pedantic
-Wno-strict-prototypes %s
AaronBallman wrote:
Can you also add RUN lines for: `-Wmain-return-type` (enables diagnostic),
`-pedantic -Wno-main-return-type` (disables diagnostic), and ``
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/134617
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
AaronBallman wrote:
> @DKLoehr @AaronBallman Did you see the revert?
Thank you for the ping, I did not see the revert. Thanks for catching that and
sorry for the disruption!
Given that this disrupts both LLVM and libc++, I think that's plenty of signal
that "on by default" isn't really the be
https://github.com/AaronBallman commented:
> 1 Is size_t appropriate here? I see some functions using unsigned, and some
> using size_t.
I think it's an appropriate type to use (`unsigned` would also be fine, but I
tend to prefer `size_t` for this sort of use, personally).
> 2 On this new fl
@@ -52,6 +54,7 @@ typedef struct {
* to `std::string::c_str()`.
*/
CINDEX_LINKAGE const char *clang_getCString(CXString string);
+CINDEX_LINKAGE const char *clang_getCString2(CXString string, size_t *length);
AaronBallman wrote:
We should document that `leng
@@ -14,6 +14,7 @@
#ifndef LLVM_CLANG_C_CXSTRING_H
#define LLVM_CLANG_C_CXSTRING_H
+#include
AaronBallman wrote:
Better to put this at the end of the include list; that leaves less chance for
those headers to accidentally transitively include stddef.h withou
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/134551
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -144,3 +177,13 @@ void test_compound_literals() {
static_assert(_Countof((int[2]){}) == 2);
static_assert(_Countof((int[]){1, 2, 3, 4}) == 4);
}
+
+static int test_f1();
+static int test_f2(); // expected-warning {{never defined}}
AaronBallman wrote:
@@ -121,10 +150,14 @@ void test_typedefs() {
static_assert(_Countof(*x) == 12);
}
-void test_zero_size_arrays() {
+void test_zero_size_arrays(int n) {
int array[0]; // expected-warning {{zero size arrays are an extension}}
static_assert(_Countof(array) == 0);
static
AaronBallman wrote:
I thought we decided to merge everything but the undocumented attributes? I'm
still seeing `cf_returns_retained` that's distinct from
`cf_returns_not_retained`, etc.
https://github.com/llvm/llvm-project/pull/134089
___
cfe-commits
https://github.com/AaronBallman closed
https://github.com/llvm/llvm-project/pull/134374
___
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/133125
>From 75ef42d644da9136fb07014ade18b6be137426a1 Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Wed, 26 Mar 2025 12:54:29 -0400
Subject: [PATCH 01/11] [C2y] Implement WG14 N3369 and N3469 (_Countof)
C2y
AaronBallman wrote:
> Extending this functionality with transformers is optional and can be done
> later in another PR, if someone is willing.
Yes and no. If the goal is just to write checks, then clang-tidy is a good home
for the functionality. But I had the impression that for some people th
@@ -2001,3 +1932,258 @@ NormalizedConstraint::getFoldExpandedConstraint() const
{
"getFoldExpandedConstraint called on non-fold-expanded constraint.");
return cast(Constraint);
}
+
+//
+//
+// Subsumption ---
@@ -0,0 +1,68 @@
+// RUN: %clang_cc1 -fsyntax-only -std=c2y -pedantic -Wall -Wno-comment -verify
%s
+
+/* WG14 N3369: Clang 21
+ * _Lengthof operator
+ *
+ * Adds an operator to get the length of an array. Note that WG14 N3469 renamed
+ * this operator to _Countof.
+ */
-
https://github.com/AaronBallman created
https://github.com/llvm/llvm-project/pull/132232
This adds some initial documentation about freestanding requirements for Clang.
The most critical part of the documentation is spelling out that a conforming
freestanding C Standard Library is required; Cl
https://github.com/AaronBallman created
https://github.com/llvm/llvm-project/pull/133472
This feature largely models the same behavior as in C++11. It is technically a
breaking change between C99 and C11, so the paper is not being backported to
older language modes.
One difference between C++
https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/131794
>From 22c4b9d7808df33d3e6a31b3456cd8b2e8a95bfa Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Tue, 18 Mar 2025 08:34:18 -0400
Subject: [PATCH 1/7] Suppress pedantic diagnostic for a file not ending in E
AaronBallman wrote:
> Did WG14 considered some sort of macros for this feature? Otherwise I'd be
> tempted to ask you to add something to `__has_feature`. I can see user
> wanting to use `_Countof` when available and fallback to something else when
> not.
There is weak consensus to add `stdco
@@ -170,102 +132,112 @@ struct alignas(ConstraintAlignment)
FoldExpandedConstraint {
const Expr *Pattern)
: Kind(K), Constraint(std::move(C)), Pattern(Pattern) {};
- template
- bool subsumes(const FoldExpandedConstraint &Other,
-
https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/133472
>From f9268b3a331fd8caf2440d742a1f084c0f9648ce Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Fri, 28 Mar 2025 13:01:58 -0400
Subject: [PATCH 1/3] [C11] Implement WG14 N1285 (temporary lifetimes)
This
https://github.com/AaronBallman approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/133265
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AaronBallman commented:
Thank you for this! It's heading in the right direction. Some things which are
still missing are;
* a release note in `clang/docs/ReleaseNotes.rst` so users know about the new
suffix and macros.
* test coverage
* `clang/test/Lexer/` should get a tes
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/132060
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1,9 +1,10 @@
-// RUN: %clang_cc1 %s -std=c++2c -fsyntax-only -verify -triple
%itanium_abi_triple
+// RUN: %clang_cc1 %s -std=c++2c -fsyntax-only -verify=both,expected
+// RUN: %clang_cc1 %s -std=c++2c -fsyntax-only -verify=both,nowarn
-Wno-enum-enum-conversion
--
AaronBallman wrote:
> > So you want this to be a FEATURE in C2y and an EXTENSION in older language
> > modes?
>
> Presumably yes.
>
> > And when we get the countof macro in a few months, this becomes unnecessary?
>
> Are most users going to include `stdcountof.h` ?
>
> My assumption is that
https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/133125
>From 75ef42d644da9136fb07014ade18b6be137426a1 Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Wed, 26 Mar 2025 12:54:29 -0400
Subject: [PATCH 1/3] [C2y] Implement WG14 N3369 and N3469 (_Countof)
C2y ad
https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/133125
>From 75ef42d644da9136fb07014ade18b6be137426a1 Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Wed, 26 Mar 2025 12:54:29 -0400
Subject: [PATCH 1/9] [C2y] Implement WG14 N3369 and N3469 (_Countof)
C2y ad
AaronBallman wrote:
> > Hi, I tried to explain everything here:
>
> Thanks, I missed that! For RFCs it's preferable to use
> [Discourse](https://discourse.llvm.org/c/clang/clang-tidy/71), as there is a
> lot less traffic and can more easily catch the eyes of relevant people. I did
> not see m
https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/132097
>From 7882bfbbe7ada59de91625c5f0365cec1fbe3c5b Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Wed, 19 Mar 2025 16:50:12 -0400
Subject: [PATCH 1/2] [C23] Fix compound literals within function prototype
https://github.com/AaronBallman commented:
Is there a way to add test coverage for the changes? Also, this should come
with a release note so users know about the fix.
https://github.com/llvm/llvm-project/pull/121650
___
cfe-commits mailing list
cfe-c
@@ -0,0 +1,20 @@
+set(LLVM_LINK_COMPONENTS
+ support
+ )
+
+add_clang_library(clangTidyCustomModule STATIC
+ CustomTidyModule.cpp
+ QueryCheck.cpp
+
+ LINK_LIBS
+ clangTidy
+ clangTidyUtils
+
+ DEPENDS
+ ClangDriverOptions
+ )
+
+clang_target_link_libraries(clangTidyCust
https://github.com/AaronBallman created
https://github.com/llvm/llvm-project/pull/133742
C23 allows a cast of a null pointer constant to nullptr_t. e.g., (nullptr_t)0
or (nullptr_t)(void *)0.
Fixes #133644
>From 5ad66ec7a9ea76a080ee34ddf0d68a19dbb9dec6 Mon Sep 17 00:00:00 2001
From: Aaron Bal
@@ -0,0 +1,142 @@
+// RUN: %clang_cc1 -triple arm64-apple-ios -std=c++11 -fptrauth-calls
-fptrauth-intrinsics -verify -fsyntax-only %s
+// RUN: %clang_cc1 -triple aarch64-linux-gnu -std=c++11 -fptrauth-calls
-fptrauth-intrinsics -verify -fsyntax-only %s
+
+#define AQ __ptrauth
@@ -0,0 +1,212 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 5
+// RUN: %clang_cc1 -std=c99 -Wno-dangling -emit-llvm -o - %s | FileCheck %s
--check-prefix=C99
+// RUN: %clang_cc1 -std=c11 -Wno-dangling -emit-llvm -o - %s |
@@ -298,6 +298,8 @@ Improvements to Clang's diagnostics
- Improve the ``-Wundefined-func-template`` warning when a function template
is not instantiated due to being unreachable in modules.
+- Clang now emits a ``-Wignored-base-class-qualifiers`` diagnostic when a base
clas
https://github.com/AaronBallman closed
https://github.com/llvm/llvm-project/pull/134423
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AaronBallman approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/134415
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -27,7 +27,7 @@ void testva (int n, ...) {
va_start(ap,n);
// CHECK: [[AP:%[a-z0-9]+]] = alloca ptr, align 4
// CHECK: [[V5:%[a-z0-9]+]] = alloca %struct.x, align 4
- // CHECK: [[TMP:%[a-z0-9]+]] = alloca [4 x i32], align 4
+ // CHECK: [[TMP:%[a-z0-9\.]+]] = alloca [4
https://github.com/AaronBallman closed
https://github.com/llvm/llvm-project/pull/134376
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AaronBallman created
https://github.com/llvm/llvm-project/pull/134423
We were previously telling the user how many arguments were passed to the
attribute rather than saying how many arguments were expected to be passed to
the callback function. This rewords the diagnostic to
@@ -3035,11 +3035,14 @@ Parser::DeclGroupPtrTy
Parser::ParseCXXClassMemberDeclaration(
}
ParsedAttributes DeclSpecAttrs(AttrFactory);
- MaybeParseMicrosoftAttributes(DeclSpecAttrs);
-
// Hold late-parsed attributes so we can attach a Decl to them later.
LateParsedA
AaronBallman wrote:
> Hi @AaronBallman, bothering you again. I have a doubt about the merge of the
> following case: ;
- MaybeParseMicrosoftAttributes(DeclSpecAttrs);
-
// Hold late-parsed attributes so we can attach a Decl to them later.
LateParsedA
@@ -71,6 +71,12 @@ namespace test_misplacement {
[[]] union union_attr2; //expected-error{{misplaced attributes}}
[[]] enum E2 { }; //expected-error{{misplaced attributes}}
}
+struct S1 { __attribute__((deprecated)) alignas(16) int x; }; // expected-none
+class C1 { __attribut
https://github.com/AaronBallman commented:
Thanks for the fix! The changes should come with a release note in
`clang/docs/ReleaseNotes.rst` so users know about the fix.
https://github.com/llvm/llvm-project/pull/133107
___
cfe-commits mailing list
cfe-
@@ -3,16 +3,15 @@
-struct foo; // c-note 5 {{forward declaration of 'struct foo'}} \
+struct foo; // c-note 4 {{forward declaration of 'struct foo'}} \
cxx-note 3 {{forward declaration of 'foo'}}
void b; // expected-error {{variable has incomplete type 'v
@@ -3035,11 +3035,14 @@ Parser::DeclGroupPtrTy
Parser::ParseCXXClassMemberDeclaration(
}
ParsedAttributes DeclSpecAttrs(AttrFactory);
- MaybeParseMicrosoftAttributes(DeclSpecAttrs);
-
// Hold late-parsed attributes so we can attach a Decl to them later.
LateParsedA
@@ -296,6 +296,11 @@ StmtResult
Parser::ParseStatementOrDeclarationAfterAttributes(
goto Retry;
}
+ case tok::kw_alignas: {
+ParseAlignmentSpecifier(CXX11Attrs);
AaronBallman wrote:
I think this means we now quietly accept this code:
https://godb
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/133107
___
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/134374
>From 753208a20b2a4caf6186fa647c4abfef546e5685 Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Fri, 4 Apr 2025 08:29:55 -0400
Subject: [PATCH 1/2] Correctly diagnose incomplete arrays with static storage
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/132939
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/133472
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
1 - 100 of 2812 matches
Mail list logo