https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/123119
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -108,3 +108,8 @@ void test_f1() {
int ir = (f1)(nullptr);
}
+// __nullptr keyword in C
+void foo(void *);
+void bar() { foo(__nullptr); }
+static_assert(nullptr == __nullptr);
+static_assert(_Generic(typeof(__nullptr), nullptr_t: true, default: false));
A
https://github.com/AaronBallman commented:
Please be sure to also update `clang/docs/ReleaseNotes.rst` so users know about
the new functionality. Also, not signing you up for this work, but we really
should document all of these keywords in `clang/docs/LanguageExtensions.rst`.
Maybe it's worth
@@ -3307,6 +3307,29 @@ void Sema::CheckShadowInheritedFields(const
SourceLocation &Loc,
}
}
+template
+inline static bool HasAttribute(const QualType &T) {
AaronBallman wrote:
Here's my take on it: https://godbolt.org/z/qxq6jf3jM
```
class [[gnu::warn_unu
@@ -3324,6 +3324,9 @@ def err_attribute_argument_out_of_range : Error<
def err_init_priority_object_attr : Error<
"can only use 'init_priority' attribute on file-scope definitions "
"of objects of class type">;
+def warn_init_priority_reserved : Warning<
Aa
AaronBallman wrote:
We talked about this during my morning office hours today (thanks @erichkeane
and @philnik777 for coming!) and I'm now comfortable with the approach taken in
this patch. Warning which defaults to error strikes a pretty reasonable
compromise.
https://github.com/llvm/llvm-pr
AaronBallman wrote:
> Sorry for the very late review but do we have clang documentation for this?
+1, we do need documentation for this before Clang 20 ships. CC @fhahn
https://github.com/llvm/llvm-project/pull/76260
___
cfe-commits mailing list
cfe-
https://github.com/AaronBallman approved this pull request.
LGTM! Thank you for the improved docs!
https://github.com/llvm/llvm-project/pull/123098
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/
AaronBallman wrote:
> While this is a valid concern, I don't think it's much of a problem in
> reality. GCC just warns on this (not even an error by default) and I wasn't
> able to find a single use outside implementations of the reserved value range.
I wouldn't expect to find uses within the
AaronBallman wrote:
> > but that leads to the question of: why is including musl's limits.h a
> > problem?
>
> If we build `glibc` on `Alpine` with clang, we will meet the problem like
>
> ```
> ./include/bits/xopen_lim.h:84:10: warning: "NL_NMAX" redefined
>84 | # define NL_NMAXIN
https://github.com/AaronBallman requested changes to this pull request.
> Allow values within the range 0-100 of init_priority to be used outside
> system library, but with a warning
This was an intentional decision, not a bug or an oversight (I'm sorry, I
didn't see that @philnik777 had marke
AaronBallman wrote:
> For
>
> ```c++
> void f() {
> [[clang::annotate("B", (void)1, (void)2, 7)]] int j = 0;
> }
> ```
>
> The IR is:
>
> ```llvm
> @.str = private unnamed_addr constant [2 x i8] c"B\00", section
> "llvm.metadata"
> @.str.1 = private unnamed_addr constant [10 x i8] c"array.c
@@ -760,6 +760,7 @@ def AmbiguousMacro : DiagGroup<"ambiguous-macro">;
def KeywordAsMacro : DiagGroup<"keyword-macro">;
def ReservedIdAsMacro : DiagGroup<"reserved-macro-identifier">;
def ReservedIdAsMacroAlias : DiagGroup<"reserved-id-macro",
[ReservedIdAsMacro]>;
+def Reserv
AaronBallman wrote:
> @AaronBallman @erichkeane I’ve switched back to the version without the std
> check. should the diagnostic group be changed?
I think we're fine to leave it as-is.
https://github.com/llvm/llvm-project/pull/106036
___
cfe-commits
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/82109
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -9804,12 +9804,22 @@ bool InitializationSequence::Diagnose(Sema &S,
case FK_ConversionFailed: {
QualType FromType = OnlyArg->getType();
-PartialDiagnostic PDiag = S.PDiag(diag::err_init_conversion_failed)
- << (int)Entity.getKind()
- << DestType
- <
https://github.com/AaronBallman commented:
Thank you for working on this! I had an idea that might be an improved
approach, but the general idea of the patch is great. I think this can likely
land without a change to `clang/docs/ReleaseNotes.rst` because it's a minor
wording improvement, but y
AaronBallman wrote:
> Looks like this change has some compile-time impact even if modules are not
> used:
> https://llvm-compile-time-tracker.com/compare.php?from=edc02351dd11cc4a39b7c541b26b71c6f36c8e55&to=7201cae106260aeb3e97d5291ff30f05076a&stat=instructions:u
> It seems to add about 0.
https://github.com/AaronBallman approved this pull request.
LGTM but please add the details back to the commit message before landing
(makes code archeology easier on us in the future).
https://github.com/llvm/llvm-project/pull/123185
___
cfe-commits
https://github.com/AaronBallman approved this pull request.
LGTM with a minor nit on the documentation, but I think this is a great new
feature for the diagnostics engine. Thank you for it!
btw, if you happen to have a list of diagnostics that could benefit from
switching to use it, that sure
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/122505
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -276,6 +276,21 @@ Description:
diagnostic instead of having to do things textually. The selected string
does undergo formatting.
+**"enum_select format**
+
+Example:
+ ``unknown frobbling of a %enum_select{%VarDecl{variable
declaration}|%FuncDecl{function declaration
AaronBallman wrote:
> > I would just say 'document for a release' then remove
>
> Works for me
I took a look at the projects I could find using it on sourcegraph and I agree
that we should be fine to document for a release and then remove.
https://github.com/llvm/llvm-project/pull/123078
https://github.com/AaronBallman closed
https://github.com/llvm/llvm-project/pull/122947
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -886,6 +909,11 @@ struct DiagTextDocPrinter :
DiagTextVisitor {
makeRowSeparator(RST[I]);
}
+ void VisitEnumSelect(EnumSelectPiece *P) {
+// For now, document this as if it were a 'select'.
AaronBallman wrote:
I think that makes sense -- let'
@@ -0,0 +1,16 @@
+// RUN: clang-tblgen --gen-clang-diags-enums -I%S %s 2>&1 | FileCheck %s
+include "DiagnosticBase.inc"
+
+def DupeNames1 : Error<"%enum_select{}0">;
+def DupeNames2 : Error<"%enum_select{}0">;
+// CHECK: error: Duplicate enumeration name 'DupeName'
+// CHECK-NEXT
@@ -0,0 +1,16 @@
+// RUN: clang-tblgen --gen-clang-diags-enums -I%S %s 2>&1 | FileCheck %s
+include "DiagnosticBase.inc"
+
+def DupeNames1 : Error<"%enum_select{}0">;
AaronBallman wrote:
Other test cases:
```
// Missing closing > after the name of the enumeration
@@ -1042,6 +1119,9 @@ Piece
*DiagnosticTextBuilder::DiagText::parseDiagText(StringRef &Text,
Modifier);
};
+if (ModType != MT_EnumSelect && Text[0] == '<')
+ Builder.PrintFatalError("modifier '<' syntax not valid with " +
Modifier
@@ -886,6 +909,11 @@ struct DiagTextDocPrinter :
DiagTextVisitor {
makeRowSeparator(RST[I]);
}
+ void VisitEnumSelect(EnumSelectPiece *P) {
+// For now, document this as if it were a 'select'.
AaronBallman wrote:
Should we file an issue to addre
@@ -0,0 +1,16 @@
+// RUN: clang-tblgen --gen-clang-diags-enums -I%S %s 2>&1 | FileCheck %s
+include "DiagnosticBase.inc"
+
+def DupeNames1 : Error<"%enum_select{}0">;
+def DupeNames2 : Error<"%enum_select{}0">;
+// CHECK: error: Duplicate enumeration name 'DupeName'
+// CHECK-NEXT
https://github.com/AaronBallman commented:
Thank you for working on this! We should probably also update
https://clang.llvm.org/docs/InternalsManual.html#formatting-a-diagnostic-argument
so that folks know how to use this properly and we advertise it more broadly.
https://github.com/llvm/llvm-
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/122505
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
AaronBallman wrote:
I'll land the changes once pre-commit CI comes back green (I expect it will; I
didn't spot any places that were missed)
https://github.com/llvm/llvm-project/pull/122947
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https:
https://github.com/AaronBallman approved this pull request.
LGTM! Good catch
https://github.com/llvm/llvm-project/pull/122947
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,785 @@
+//===-- Mustache.cpp
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,785 @@
+//===-- Mustache.cpp
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,785 @@
+//===-- Mustache.cpp
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/105893
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,785 @@
+//===-- Mustache.cpp
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,785 @@
+//===-- Mustache.cpp
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,114 @@
+//===--- Mustache.h -*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
https://github.com/AaronBallman commented:
> I will try to get back on this PR tomorrow though so it doesn't stagnate much
> longer.
I guess that didn't work out as planned, but I got to it today. :-D
FWIW, this is a case where fuzz testing may help shake out parser issues.
https://github.com
AaronBallman wrote:
> Ah haha I see, thanks! Looking forward to getting it sometime, that would
> definitely be helpful :)
FWIW, I think you're fine to ask for commit privs now:
https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access
https://github.com/llvm/llvm-project/pull/102040
@@ -577,7 +577,17 @@ std::vector StoreDiags::take(const
clang::tidy::ClangTidyContext *Tidy) {
for (auto &Diag : Output) {
if (const char *ClangDiag = getDiagnosticCode(Diag.ID)) {
// Warnings controlled by -Wfoo are better recognized by that name.
- StringRef
@@ -892,6 +894,8 @@ class DiagnosticsEngine : public
RefCountedBase {
/// \param FormatString A fixed diagnostic format string that will be hashed
/// and mapped to a unique DiagID.
template
+ // TODO: Deprecate this once all uses are removed from LLVM
+ // [[deprecat
https://github.com/AaronBallman commented:
The changes generally LGTM but I'd really love to hear from @kadircet as to
whether this PR fully addresses the issues found before:
https://github.com/llvm/llvm-project/pull/70976#discussion_r1775918960
https://github.com/llvm/llvm-project/pull/11971
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/119712
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
AaronBallman wrote:
> From the commit message, it sounds like this might introduce warnings that
> `-Werror` doesn't turn into warnings. Is that correct?
FWIW, that's already the case today (which we found out in the previous
iteration of this): https://godbolt.org/z/nG4oWvv3s
I think the com
@@ -179,6 +179,8 @@ def err_opencl_unknown_type_specifier : Error<
def warn_unknown_attribute_ignored : Warning<
"unknown attribute %0 ignored">, InGroup;
+def ext_unknown_attribute_ignored : Extension<
+ "unknown attribute %0 ignored">, InGroup;
AaronBallm
AaronBallman wrote:
> Fantastic, thank you! Could we merge it?
heh, thanks for the poke, I didn't remember you didn't have commit access. I've
merged now.
https://github.com/llvm/llvm-project/pull/102040
___
cfe-commits mailing list
cfe-commits@lists
https://github.com/AaronBallman closed
https://github.com/llvm/llvm-project/pull/102040
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AaronBallman commented:
Please be sure to also add a release note to `clang/docs/ReleaseNotes.rst` so
users know about the fix. In principle, the changes LGTM but I do wonder if
this is a part of the compiler that could benefit from some fuzzing to help
shake out parsing iss
https://github.com/AaronBallman approved this pull request.
LGTM, thank you for your patience on the review!
https://github.com/llvm/llvm-project/pull/102040
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman
AaronBallman wrote:
> IN SUMMARY: I think this proposal minus the std check is acceptable.
+1
> I think the proposed-not-implemented warning of "you messed with an attribute
> name, and it is doing weird stuff" is also a very valuable, though different,
> check.
I don't see them as different
AaronBallman wrote:
> > > > Oh, I see, you're suggesting we remove the `getStdNamespace` check from
> > > > this PR. Yeah, I think that's reasonable.
> > >
> > >
> > > Yep, that is my suggestion, sorry I was insufficiently clear.
> > > > But I'd somewhat question whether this PR and warning re
AaronBallman wrote:
> > Oh, I see, you're suggesting we remove the `getStdNamespace` check from
> > this PR. Yeah, I think that's reasonable.
>
> Yep, that is my suggestion, sorry I was insufficiently clear.
>
> > But I'd somewhat question whether this PR and warning really has anything
> > t
AaronBallman wrote:
Can you add more details to the patch summary explaining why the changes are
needed? That makes it easier for folks to review the patch but also helps us in
the future when digging through historical changes. Thanks!
https://github.com/llvm/llvm-project/pull/122726
AaronBallman wrote:
> > > Just that the last bit of performance
> >
> >
> > Maybe we're talking about different situations; I may have missed some
> > context in the discussion of this PR. I didn't see this as being about the
> > last bit of performance. It sounded like this was going to know
AaronBallman wrote:
> I saw this got updates over break. Did LWG make its decision already? Are you
> expecting re-review? I didn't see anything go across my emails about LWG, but
> I could definitely have missed it.
The LWG issue is still open: https://cplusplus.github.io/LWG/issue4149 but
d
AaronBallman wrote:
> Just that the last bit of performance
Maybe we're talking about different situations; I may have missed some context
in the discussion of this PR. I didn't see this as being about the last bit of
performance. It sounded like this was going to knowingly introduce a
perfor
AaronBallman wrote:
> > Anyway, my main point was that there are people who care about performance
> > on Windows, so please don't treat it as a second-class citizen.
>
> Yeah, I don't want to treat folks on Windows as second class citizens by any
> means - but I wouldn't mind/hope we can trea
@@ -179,6 +179,8 @@ def err_opencl_unknown_type_specifier : Error<
def warn_unknown_attribute_ignored : Warning<
"unknown attribute %0 ignored">, InGroup;
+def ext_unknown_attribute_ignored : Extension<
+ "unknown attribute %0 ignored">, InGroup;
AaronBallm
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?=
Message-ID:
In-Reply-To:
@@ -389,6 +389,12 @@ def note_constexpr_assum
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?=
Message-ID:
In-Reply-To:
@@ -4340,6 +4340,18 @@ whole system, the curr
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?=
Message-ID:
In-Reply-To:
@@ -4340,6 +4340,18 @@ whole system, the curr
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?=
Message-ID:
In-Reply-To:
AaronBallman wrote:
> > Also, this should update `clang/www/c
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?=
Message-ID:
In-Reply-To:
AaronBallman wrote:
> > Unfortunately we currently have two c
https://github.com/AaronBallman approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/120300
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3771,6 +3771,12 @@ CINDEX_LINKAGE enum CXRefQualifierKind
clang_Type_getCXXRefQualifier(CXType T);
*/
CINDEX_LINKAGE unsigned clang_isVirtualBase(CXCursor);
+/**
+ * Returns the offset in bits of a CX_CXXBaseSpecifier relative to the parent
+ * class.
+ */
+CINDEX_LINKAG
https://github.com/AaronBallman approved this pull request.
LGTM, thank you for the release note!
https://github.com/llvm/llvm-project/pull/122462
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/c
AaronBallman wrote:
Maybe my brain still isn't engaging after the holidays, but I'm still not
seeing why this change is correct. From the point when Clang gets involved:
* The absolute path includes glibc's `limits.h`, which includes the next header
in the chain, which is Clang's:
https://sou
@@ -3771,6 +3771,12 @@ CINDEX_LINKAGE enum CXRefQualifierKind
clang_Type_getCXXRefQualifier(CXType T);
*/
CINDEX_LINKAGE unsigned clang_isVirtualBase(CXCursor);
+/**
+ * Returns the offset in bits of a CX_CXXBaseSpecifier relative to the parent
+ * class.
+ */
+CINDEX_LINKAG
@@ -27,6 +27,33 @@ unsigned clang_isVirtualBase(CXCursor C) {
return B->isVirtual();
}
+unsigned clang_visitCXXBaseClasses(CXType PT, CXFieldVisitor visitor,
+ CXClientData client_data) {
+ CXCursor PC = clang_getTypeDeclaration(PT);
+ if
AaronBallman wrote:
Whoops, I clicked too soon, so I closed the revert PR, sorry for that noise.
I think this is a spurious failure unrelated to your changes, so you can ignore
the issue.
https://github.com/llvm/llvm-project/pull/119403
___
cfe-commi
https://github.com/AaronBallman closed
https://github.com/llvm/llvm-project/pull/122454
___
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/122454
Reverts llvm/llvm-project#119403
>From 8876f169829dd3c8dfebcfe9652fb1059ce75325 Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Fri, 10 Jan 2025 08:48:34 -0500
Subject: [PATCH] Revert "Fix a cmake error
@@ -0,0 +1,114 @@
+//===--- Mustache.h -*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,114 @@
+//===--- Mustache.h -*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
https://github.com/AaronBallman approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/120662
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1550,6 +1550,8 @@ NamedDecl *Sema::ActOnNonTypeTemplateParameter(Scope *S,
Declarator &D,
IdResolver.AddDecl(Param);
}
+ ProcessDeclAttributes(S, Param, D);
AaronBallman wrote:
I think that makes sense, thanks!
https://github.com/llvm/llvm-projec
@@ -15978,6 +15988,24 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt
*Body,
CheckCoroutineWrapper(FD);
}
+ // Diagnose invalid SYCL kernel entry point function declarations.
+ if (FD && !FD->isInvalidDecl() && !FD->isTemplated() &&
+ FD->hasAttr()) {
+
https://github.com/AaronBallman closed
https://github.com/llvm/llvm-project/pull/118800
___
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/118800
>From 34d3d3000bc6096bbc9eb35ce85b6ceca50b91ca Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Thu, 5 Dec 2024 08:31:24 -0500
Subject: [PATCH 1/8] [C++20] Destroying delete and deleted destructors
When
@@ -2855,6 +2855,11 @@ class CXXDestructorDecl : public CXXMethodDecl {
return getCanonicalDecl()->OperatorDeleteThisArg;
}
+ /// Will this destructor ever be called when considering which deallocation
+ /// function is associated with the destructor? Can optionally be
https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/118800
>From 34d3d3000bc6096bbc9eb35ce85b6ceca50b91ca Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Thu, 5 Dec 2024 08:31:24 -0500
Subject: [PATCH 1/7] [C++20] Destroying delete and deleted destructors
When
https://github.com/AaronBallman approved this pull request.
LGTM but I added our cmake code owners just in case they have the bandwidth to
also double-check, since I got this wrong before. :-)
https://github.com/llvm/llvm-project/pull/119403
___
cfe-c
@@ -15978,6 +15988,24 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt
*Body,
CheckCoroutineWrapper(FD);
}
+ // Diagnose invalid SYCL kernel entry point function declarations.
+ if (FD && !FD->isInvalidDecl() && !FD->isTemplated() &&
+ FD->hasAttr()) {
+
@@ -1550,6 +1550,8 @@ NamedDecl *Sema::ActOnNonTypeTemplateParameter(Scope *S,
Declarator &D,
IdResolver.AddDecl(Param);
}
+ ProcessDeclAttributes(S, Param, D);
AaronBallman wrote:
We definitely need some changes because we drop the attributes on the
@@ -1200,21 +1200,35 @@ CanThrowResult Sema::canThrow(const Stmt *S) {
case Expr::CXXDeleteExprClass: {
auto *DE = cast(S);
-CanThrowResult CT;
+CanThrowResult CT = CT_Cannot;
QualType DTy = DE->getDestroyedType();
if (DTy.isNull() || DTy->isDependentTy
https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/118800
>From 34d3d3000bc6096bbc9eb35ce85b6ceca50b91ca Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Thu, 5 Dec 2024 08:31:24 -0500
Subject: [PATCH 1/6] [C++20] Destroying delete and deleted destructors
When
https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/118800
>From 34d3d3000bc6096bbc9eb35ce85b6ceca50b91ca Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Thu, 5 Dec 2024 08:31:24 -0500
Subject: [PATCH 1/5] [C++20] Destroying delete and deleted destructors
When
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?=
Message-ID:
In-Reply-To:
https://github.com/AaronBallman commented:
Thank you for working on this! Please be sure to also add release notes to
`clang/docs/ReleaseNotes.rst` so users know about the new functionality. Also,
this should
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?=
Message-ID:
In-Reply-To:
@@ -17893,4 +18005,425 @@ std::optional
EvaluateBuiltinIsWithinLifetime(IntExprEvaluator &IEE,
IsWithinLifetimeHandler handler{Info};
return findSubobject(Info, E, CO, Val.getLValueDesigna
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?=
Message-ID:
In-Reply-To:
@@ -1847,133 +1847,133 @@ def C11AtomicIsLockFree : Builtin {
// GNU atomic builtins.
def AtomicLoad : AtomicBuiltin {
let Spellings = ["__atomic_load"];
- let Attributes = [CustomTypeCheck
Hana =?utf-8?q?Dusi=CC=81kova=CC=81?= ,
Hana =?utf-8?q?Dusi=CC=81kova=CC=81?=
Message-ID:
In-Reply-To:
@@ -0,0 +1,102 @@
+// RUN: %clang_cc1 -std=c++23 -verify %s
AaronBallman wrote:
```suggestion
// RUN: %clang_cc1 -std=c++2c -verify %s
```
https://github.co
Hana =?utf-8?q?Dusi=CC=81kova=CC=81?= ,
Hana =?utf-8?q?Dusi=CC=81kova=CC=81?=
Message-ID:
In-Reply-To:
@@ -16268,6 +16353,25 @@ class VoidExprEvaluator
}
}
+ bool VisitAtomicExpr(const AtomicExpr *E) {
+if (!EvaluateAtomicOrder(E, Info))
+ return false;
+
+
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?=
Message-ID:
In-Reply-To:
@@ -1921,6 +1921,22 @@ static bool EvaluateFixedPointOrInteger(const Expr *E,
APFixedPoint &Result,
static bool EvaluateFixedPoint(const Expr *E, APFixedPoint &Result,
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?=
Message-ID:
In-Reply-To:
@@ -17893,4 +18005,425 @@ std::optional
EvaluateBuiltinIsWithinLifetime(IntExprEvaluator &IEE,
IsWithinLifetimeHandler handler{Info};
return findSubobject(Info, E, CO, Val.getLValueDesigna
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?=
Message-ID:
In-Reply-To:
@@ -17893,4 +18005,425 @@ std::optional
EvaluateBuiltinIsWithinLifetime(IntExprEvaluator &IEE,
IsWithinLifetimeHandler handler{Info};
return findSubobject(Info, E, CO, Val.getLValueDesigna
Hana =?utf-8?q?Dusíková?= ,
Hana =?utf-8?q?Dusíková?=
Message-ID:
In-Reply-To:
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/98756
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/c
1 - 100 of 2302 matches
Mail list logo