https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/89257
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erichkeane wrote:
Sorry for the extra two updates, I found those two while working on the next
clause :)
https://github.com/llvm/llvm-project/pull/89151
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/89204
___
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.
This is fine to me, I have some concerns about the out-of-bounds reads on the
NumericLIteralParser, but if @cor3ntin and you have done the work to make sure
it is ok, than I am ok with it.
@@ -156,6 +156,64 @@ class OpenACCSelfClause : public
OpenACCClauseWithCondition {
Expr *ConditionExpr, SourceLocation EndLoc);
};
+/// Represents one of a handful of classes that have integer expressions.
+/// Semantically, many only
@@ -156,6 +156,64 @@ class OpenACCSelfClause : public
OpenACCClauseWithCondition {
Expr *ConditionExpr, SourceLocation EndLoc);
};
+/// Represents one of a handful of classes that have integer expressions.
+/// Semantically, many only
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/89151
>From d3894971090921b92c71ba5a18151cb2033c8cfa Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Tue, 16 Apr 2024 09:43:55 -0700
Subject: [PATCH 1/3] [OpenACC] Implement 'num_workers' clause for compute
erichkeane wrote:
> Wait for CI green, but seems windows bots fall into a trouble.
Windows bot is typically pretty far behind(usually 4-5 hrs during the day), but
13 hours is a heck of a delay! I think all we can do is wait :/
https://github.com/llvm/llvm-project/pull/88666
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/89227
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -186,3 +186,74 @@ class E {
#endif
template using D = int; // expected-note {{declared here}}
E ed; // expected-note {{instantiation of}}
+
+namespace non_functions {
+
+#if __cplusplus >= 201103L
+namespace PR88832 {
+template struct O {
+ static const T v = 0;
+};
+
@@ -186,3 +186,74 @@ class E {
#endif
template using D = int; // expected-note {{declared here}}
E ed; // expected-note {{instantiation of}}
+
+namespace non_functions {
+
+#if __cplusplus >= 201103L
+namespace PR88832 {
+template struct O {
+ static const T v = 0;
+};
+
erichkeane wrote:
> Did you try to use `ExprDependence::Error`?
I've only ever seen that used in regards to the `RecoveryExpr`, so I think I
am? Also, `RecoveryExpr` doesn't really have a way of changing its dependence
to anything but what it is.
erichkeane wrote:
> I'm having second thoughts about leveraging recovery expressions as a
> side-band mechanism to de-duplicate diagnostics, because not modeling things
> properly in AST might backfire in the future. But I don't have anything
> better on my mind, so I don't want to block the
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/89151
>From d3894971090921b92c71ba5a18151cb2033c8cfa Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Tue, 16 Apr 2024 09:43:55 -0700
Subject: [PATCH 1/2] [OpenACC] Implement 'num_workers' clause for compute
@@ -0,0 +1,133 @@
+// RUN: %clang_cc1 %s -fopenacc -verify
+
+struct NotConvertible{} NC;
+struct Incomplete *SomeIncomplete; // #INCOMPLETE
+enum E{} SomeE;
+enum class E2{} SomeE2;
+
+struct CorrectConvert {
+ operator int();
+} Convert;
+
+struct ExplicitConvertOnly {
+
https://github.com/erichkeane created
https://github.com/llvm/llvm-project/pull/89151
This clause just takes an 'int expr', which is not optional. This patch
implements the clause on compute constructs.
>From d3894971090921b92c71ba5a18151cb2033c8cfa Mon Sep 17 00:00:00 2001
From: erichkeane
@@ -2596,27 +2588,14 @@ class VarTemplateSpecializationDecl : public VarDecl,
llvm::PointerUnion
SpecializedTemplate;
- /// Further info for explicit template specialization/instantiation.
- struct ExplicitSpecializationInfo {
-/// The type-as-written.
-
@@ -6390,6 +6394,7 @@ TEST(HasTemplateArgumentLoc,
BindsToSpecializationWithDoubleArgument) {
0, hasTypeLoc(loc(asString("double")));
}
+#if 0
erichkeane wrote:
Ping on this.
@@ -2596,27 +2588,14 @@ class VarTemplateSpecializationDecl : public VarDecl,
llvm::PointerUnion
SpecializedTemplate;
- /// Further info for explicit template specialization/instantiation.
- struct ExplicitSpecializationInfo {
-/// The type-as-written.
-
@@ -1455,21 +1455,17 @@ void TypePrinter::printTag(TagDecl *D, raw_ostream )
{
// If this is a class template specialization, print the template
// arguments.
- if (const auto *Spec = dyn_cast(D)) {
-ArrayRef Args;
-TypeSourceInfo *TAW =
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/88777
___
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/87173
___
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/88666
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3903,7 +3904,14 @@ bool Sema::CheckLoopHintExpr(Expr *E, SourceLocation
Loc) {
if (R.isInvalid())
return true;
- bool ValueIsPositive = ValueAPS.isStrictlyPositive();
+ // GCC allows the value of unroll count to be 0.
+ //
https://github.com/erichkeane commented:
The original patch pointed out a regression:
https://github.com/llvm/llvm-project/pull/83124#issuecomment-2060090590
Please contact that person and get a reproducer and make sure you aren't
breaking them.
erichkeane wrote:
> Unless the original test was subtly broken, the forward fix in
> [0a789ea](https://github.com/llvm/llvm-project/commit/0a789ea8a829da345e46d8224d73b2ddaba6969f)
> seems erroneous.
>
> The forward fix changes the test to have a different declaration of `new`.
> But I would
erichkeane wrote:
> @erichkeane Perhaps the release note should go under "Attribute Changes in
> Clang"?
That would be fine for me as well.
https://github.com/llvm/llvm-project/pull/88777
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -1,5 +1,5 @@
-// RUN: %clang -S -fno-discard-value-names -emit-llvm -o - %s | FileCheck %s
-// Issue no: 41441
+// RUN: %clang --target=x86_64-pc-linux -S -fno-discard-value-names -emit-llvm
-o - %s | FileCheck %s
+
#include
erichkeane wrote:
Should be
https://github.com/erichkeane commented:
Approach/fix looks fine, other than release notes + tests, LGTM.
https://github.com/llvm/llvm-project/pull/88963
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -1,5 +1,5 @@
-// RUN: %clang -S -fno-discard-value-names -emit-llvm -o - %s | FileCheck %s
-// Issue no: 41441
+// RUN: %clang --target=x86_64-pc-linux -S -fno-discard-value-names -emit-llvm
-o - %s | FileCheck %s
+
#include
erichkeane wrote:
Blarg, the
@@ -831,7 +831,7 @@ class PackDeductionScope {
if (IsPartiallyExpanded)
PackElements += NumPartialPackArgs;
else if (IsExpanded)
- PackElements += *FixedNumExpansions;
+ PackElements += FixedNumExpansions.value_or(1);
erichkeane wrote:
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/88546
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane closed
https://github.com/llvm/llvm-project/pull/88760
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -72,3 +92,9 @@ void OpenACCClausePrinter::VisitDefaultClause(const
OpenACCDefaultClause ) {
void OpenACCClausePrinter::VisitIfClause(const OpenACCIfClause ) {
OS << "if(" << C.getConditionExpr() << ")";
}
+
+void OpenACCClausePrinter::VisitSelfClause(const
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/88760
>From a96f008c7e4d97ca634f8ce24fc43843d5e19c91 Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Fri, 12 Apr 2024 10:49:17 -0700
Subject: [PATCH 1/2] [OpenACC] Implement `self` clause for compute constructs
@@ -160,12 +169,58 @@ SemaOpenACC::ActOnClause(ArrayRef
ExistingClauses,
// The parser has ensured that we have a proper condition expr, so there
// isn't really much to do here.
-// TODO OpenACC: When we implement 'self', this clauses causes us to
-//
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/88731
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -9315,6 +9330,9 @@ ProcessDeclAttribute(Sema , Scope *scope, Decl *D,
const ParsedAttr ,
case ParsedAttr::AT_Error:
handleErrorAttr(S, D, AL);
break;
+ case ParsedAttr::AT_ExcludeFromExplicitInstantiation:
erichkeane wrote:
It still needs to be
@@ -9315,6 +9330,9 @@ ProcessDeclAttribute(Sema , Scope *scope, Decl *D,
const ParsedAttr ,
case ParsedAttr::AT_Error:
handleErrorAttr(S, D, AL);
break;
+ case ParsedAttr::AT_ExcludeFromExplicitInstantiation:
erichkeane wrote:
What is the previous
https://github.com/erichkeane commented:
Needs a release note, probably int he 'potentially breaking changes' section?
https://github.com/llvm/llvm-project/pull/88777
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/88777
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -91,11 +91,24 @@ static StringRef normalizeAttrName(StringRef Name) {
/// isAttributeLateParsed - Return true if the attribute has arguments that
/// require late parsing.
-static bool isAttributeLateParsed(const IdentifierInfo ) {
+bool Parser::isAttributeLateParsed(const
https://github.com/erichkeane created
https://github.com/llvm/llvm-project/pull/88760
`self` clauses on compute constructs take an optional condition expression. We
again limit the implementation to ONLY compute constructs to ensure we get all
the rules correct for others. However, this one
@@ -91,11 +91,24 @@ static StringRef normalizeAttrName(StringRef Name) {
/// isAttributeLateParsed - Return true if the attribute has arguments that
/// require late parsing.
-static bool isAttributeLateParsed(const IdentifierInfo ) {
+bool Parser::isAttributeLateParsed(const
@@ -252,16 +252,19 @@ static DeclPrinter::AttrPosAsWritten
getPosAsWritten(const Attr *A,
return DeclPrinter::AttrPosAsWritten::Right;
}
-void DeclPrinter::prettyPrintAttributes(const Decl *D,
+// returns true if an attribute was printed.
+bool
@@ -275,13 +278,15 @@ void DeclPrinter::prettyPrintAttributes(const Decl *D,
if (Pos != AttrPosAsWritten::Left)
Out << ' ';
A->printPretty(Out, Policy);
+ hasPrinted = true;
if (Pos == AttrPosAsWritten::Left)
Out
https://github.com/erichkeane approved this pull request.
2 nits, else LGTM. Once you and @kimgr are in agreement with what to do next
(and have looked into my nits), feel free to commit.
https://github.com/llvm/llvm-project/pull/88600
___
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/88600
___
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.
Ah, I had missed (thanks github review tool!) that the 'ImplicitObjectMember'
part already existed. Sorry for that.
https://github.com/llvm/llvm-project/pull/85198
___
cfe-commits mailing
https://github.com/erichkeane commented:
1 nit, else this lgtm.
https://github.com/llvm/llvm-project/pull/88666
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/88666
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3903,7 +3904,14 @@ bool Sema::CheckLoopHintExpr(Expr *E, SourceLocation
Loc) {
if (R.isInvalid())
return true;
- bool ValueIsPositive = ValueAPS.isStrictlyPositive();
+ // GCC allows the value of unroll count to be 0.
+ //
@@ -7735,7 +7735,8 @@ ExprResult Sema::BuildResolvedCallExpr(Expr *Fn,
NamedDecl *NDecl,
}
if (CXXMethodDecl *Method = dyn_cast_or_null(FDecl))
-if (Method->isImplicitObjectMemberFunction())
+if (!isa(CurContext) &&
erichkeane wrote:
I still
https://github.com/erichkeane closed
https://github.com/llvm/llvm-project/pull/88411
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6113,8 +6113,10 @@ static bool TryOCLZeroOpaqueTypeInitialization(Sema ,
InitializationSequence::InitializationSequence(
Sema , const InitializedEntity , const InitializationKind ,
MultiExprArg Args, bool TopLevelOfInitList, bool TreatUnavailableAsInvalid)
-:
@@ -203,6 +203,10 @@ Non-comprehensive list of changes in this release
- ``__typeof_unqual__`` is available in all C modes as an extension, which
behaves
like ``typeof_unqual`` from C23, similar to ``__typeof__`` and ``typeof``.
+- Improved stack usage with C++
@@ -1057,16 +1057,15 @@ bool
OverloadCandidateSet::OperatorRewriteInfo::shouldAddReversed(
void OverloadCandidateSet::destroyCandidates() {
for (iterator i = begin(), e = end(); i != e; ++i) {
for (auto : i->Conversions)
- C.~ImplicitConversionSequence();
+
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/88411
>From 408f39f8ed0ee121aeaeb15c02603bb127e8cb73 Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Wed, 10 Apr 2024 07:56:30 -0700
Subject: [PATCH 1/5] [OpenACC] Implement 'if' clause for Compute Constructs
Like
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/88411
>From 408f39f8ed0ee121aeaeb15c02603bb127e8cb73 Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Wed, 10 Apr 2024 07:56:30 -0700
Subject: [PATCH 1/4] [OpenACC] Implement 'if' clause for Compute Constructs
Like
erichkeane wrote:
> General question. Should there be some support in
> clang/tools/libclang/CIndex.cpp?
Sorry, I only just saw this! I guess I don't have a good idea what the CIndex
stuff does. I see there is quite a bit of this 'Enqueue' functionality in
CIndex.cpp, but it isn't clear
@@ -11099,6 +11099,19 @@ OpenACCClause
*TreeTransform::TransformOpenACCClause(
ParsedClause.setDefaultDetails(
cast(OldClause)->getDefaultClauseKind());
break;
+ case OpenACCClauseKind::If: {
+Expr *Cond = const_cast(
+
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/84050
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -7425,6 +7425,12 @@ void ASTRecordWriter::writeOpenACCClause(const
OpenACCClause *C) {
writeEnum(DC->getDefaultClauseKind());
return;
}
+ case OpenACCClauseKind::If: {
+const auto *IC = cast(C);
+writeSourceLocation(IC->getLParenLoc());
+
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/88411
>From 408f39f8ed0ee121aeaeb15c02603bb127e8cb73 Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Wed, 10 Apr 2024 07:56:30 -0700
Subject: [PATCH 1/3] [OpenACC] Implement 'if' clause for Compute Constructs
Like
@@ -7425,6 +7425,12 @@ void ASTRecordWriter::writeOpenACCClause(const
OpenACCClause *C) {
writeEnum(DC->getDefaultClauseKind());
return;
}
+ case OpenACCClauseKind::If: {
+const auto *IC = cast(C);
+writeSourceLocation(IC->getLParenLoc());
+
@@ -27,10 +28,48 @@ OpenACCDefaultClause *OpenACCDefaultClause::Create(const
ASTContext ,
return new (Mem) OpenACCDefaultClause(K, BeginLoc, LParenLoc, EndLoc);
}
+OpenACCIfClause *OpenACCIfClause::Create(const ASTContext ,
+
https://github.com/erichkeane approved this pull request.
Ooof, yeah, good catch. I should have caught that in the review, I've fallen
for that one before :)
https://github.com/llvm/llvm-project/pull/88428
___
cfe-commits mailing list
erichkeane wrote:
> A note from left field: I think this PR broke the IWYU test suite. We use
> `TemplateDecl::print` + some postprocessing to generate template
> forward-declarations. We're seeing this diff now:
>
> ```diff
> -template class FinalTemplate;
> +template class FinalTemplate;
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/88411
>From 408f39f8ed0ee121aeaeb15c02603bb127e8cb73 Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Wed, 10 Apr 2024 07:56:30 -0700
Subject: [PATCH 1/2] [OpenACC] Implement 'if' clause for Compute Constructs
Like
https://github.com/erichkeane created
https://github.com/llvm/llvm-project/pull/88411
Like with the 'default' clause, this is being applied to only Compute
Constructs for now. The 'if' clause takes a condition expression which is used
as a runtime value.
This is not a particularly complex
erichkeane wrote:
> What category should the release note go under?
`Improvements to Clang's diagnostics`
https://github.com/llvm/llvm-project/pull/88139
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/88139
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1581,26 +1581,33 @@ class TemplateTemplateParmDecl final
DefaultArgStorage;
DefArgStorage DefaultArgument;
+ /// Whether this template template parameter was declaration with
+ /// the 'typename' keyword.
+ ///
+ /// If false, it was declared with the 'class'
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/88139
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane commented:
1 nit, else LGTM
https://github.com/llvm/llvm-project/pull/88139
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erichkeane wrote:
> @erichkeane I'm thinking of keeping the use of `bool` to represent the
> presence of `typename` in this patch, and opening another PR that changes
> both `TemplateTemplateParmDecl` and `TypeTemplateParmDecl` to use
> `TypeParmKeyword`... What do you think?
I can live with
https://github.com/erichkeane approved this pull request.
@endilll says 'Good to go' with the dr-status updated, so I'll approve.
https://github.com/llvm/llvm-project/pull/88042
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
erichkeane wrote:
> Could also get them from the CWG GitHub pages repository
> (https://github.com/cplusplus/CWG/tree/gh-pages/issues)... anyways, am I good
> to merge this?
I believe we would still like you to re-generate with : www/make_cxx_dr_status
https://github.com/erichkeane approved this pull request.
Can you add the example that caused the revert to the tests?
Else, LGTM.
https://github.com/llvm/llvm-project/pull/88311
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
erichkeane wrote:
> @Endilll `clang/www/make_cxx_dr_status` queries core issues from
> https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_index.html. Since a new
> revision of the index has not yet been published since CWG2858 was opened,
> `clang/www/make_cxx_dr_status` doesn't add an entry
https://github.com/erichkeane commented:
Can you point out the 'diff' from the last patch for me?
https://github.com/llvm/llvm-project/pull/88311
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -7735,7 +7735,8 @@ ExprResult Sema::BuildResolvedCallExpr(Expr *Fn,
NamedDecl *NDecl,
}
if (CXXMethodDecl *Method = dyn_cast_or_null(FDecl))
-if (Method->isImplicitObjectMemberFunction())
+if (!isa(CurContext) &&
erichkeane wrote:
I guess I
@@ -7735,7 +7735,8 @@ ExprResult Sema::BuildResolvedCallExpr(Expr *Fn,
NamedDecl *NDecl,
}
if (CXXMethodDecl *Method = dyn_cast_or_null(FDecl))
-if (Method->isImplicitObjectMemberFunction())
+if (!isa(CurContext) &&
erichkeane wrote:
I don't
https://github.com/erichkeane closed
https://github.com/llvm/llvm-project/pull/88135
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6954,6 +6954,23 @@ static void HandleBTFTypeTagAttribute(QualType ,
const ParsedAttr ,
::new (Ctx) BTFTypeTagAttr(Ctx, Attr, BTFTypeTag), Type);
}
+static void handleWrapsAttr(QualType , const ParsedAttr ,
+TypeProcessingState ) {
+
@@ -147,6 +147,15 @@ struct BinOpInfo {
return UnOp->getSubExpr()->getType()->isFixedPointType();
return false;
}
+
+ /// Does the BinaryOperator have the wraps attribute?
+ /// If so, we can ellide overflow sanitizer checks.
+ bool oneOfWraps() const {
+
@@ -4077,6 +4077,9 @@ class BinaryOperator : public Expr {
static unsigned sizeOfTrailingObjects(bool HasFPFeatures) {
return HasFPFeatures * sizeof(FPOptionsOverride);
}
+
+ /// Do one of the subexpressions have the wraps attribute?
+ bool oneOfWraps(const
@@ -4506,3 +4506,9 @@ def CodeAlign: StmtAttr {
static constexpr int MaximumAlignment = 4096;
}];
}
+
+def Wraps : DeclOrTypeAttr {
+ let Spellings = [GNU<"wraps">];
erichkeane wrote:
Typically we'd want to do a `Clang` spelling here, which will allow
@@ -4506,3 +4506,9 @@ def CodeAlign: StmtAttr {
static constexpr int MaximumAlignment = 4096;
}];
}
+
+def Wraps : DeclOrTypeAttr {
+ let Spellings = [GNU<"wraps">];
+ let Subjects = SubjectList<[Var, TypedefName, Field]>;
+ let Documentation = [WrapsDocs];
+}
@@ -2237,6 +2237,21 @@ bool
BinaryOperator::isNullPointerArithmeticExtension(ASTContext ,
return true;
}
+bool BinaryOperator::oneOfWraps(const ASTContext ) const {
+ llvm::SmallVector Both = {getLHS(), getRHS()};
erichkeane wrote:
Suggest instead:
```
@@ -282,6 +282,15 @@ Attribute Changes in Clang
This allows the ``_Nullable`` and ``_Nonnull`` family of type attributes to
apply to this class.
+- Introduced ``__attribute((wraps))__`` which can be added to type or variable
+ declarations. Using an attributed type or
@@ -14527,20 +14525,24 @@ Sema::CreateOverloadedUnaryOp(SourceLocation OpLoc,
UnaryOperatorKind Opc,
UnaryOperator::getOpcodeStr(Opc), OpLoc);
return ExprError();
- case OR_Deleted:
+ case OR_Deleted: {
// CreateOverloadedUnaryOp fills the first element of
https://github.com/erichkeane approved this pull request.
1 set of 'nits' a few places, else LGTM.
https://github.com/llvm/llvm-project/pull/86526
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -3092,30 +3092,65 @@ bool FunctionDecl::isVariadic() const {
return false;
}
-FunctionDecl::DefaultedFunctionInfo *
-FunctionDecl::DefaultedFunctionInfo::Create(ASTContext ,
-ArrayRef Lookups) {
- DefaultedFunctionInfo *Info =
@@ -3092,30 +3092,65 @@ bool FunctionDecl::isVariadic() const {
return false;
}
-FunctionDecl::DefaultedFunctionInfo *
-FunctionDecl::DefaultedFunctionInfo::Create(ASTContext ,
-ArrayRef Lookups) {
- DefaultedFunctionInfo *Info =
@@ -14527,20 +14525,24 @@ Sema::CreateOverloadedUnaryOp(SourceLocation OpLoc,
UnaryOperatorKind Opc,
UnaryOperator::getOpcodeStr(Opc), OpLoc);
return ExprError();
- case OR_Deleted:
+ case OR_Deleted: {
// CreateOverloadedUnaryOp fills the first element of
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/86526
___
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/88086
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/88135
>From b0595276f2b8d74d036ff9bf94c5baea86a57f17 Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Mon, 8 Apr 2024 14:23:17 -0700
Subject: [PATCH 1/3] g This is a combination of 3 commits.
[OpenACC] Implement
@@ -11074,13 +11079,44 @@ OMPClause
*TreeTransform::TransformOMPXBareClause(OMPXBareClause *C) {
//===--===//
// OpenACC transformation
401 - 500 of 2361 matches
Mail list logo