https://github.com/delcypher edited
https://github.com/llvm/llvm-project/pull/88596
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/delcypher updated
https://github.com/llvm/llvm-project/pull/88596
>From 24ea6b9306e0da81b956718590bff3c3cfb9124c Mon Sep 17 00:00:00 2001
From: Dan Liew
Date: Fri, 12 Apr 2024 17:36:19 -0700
Subject: [PATCH] [Attributes] Support Attributes being declared as supporting
an
https://github.com/Sirraide commented:
> @Sirraide I've tried to address your feedback.
Changes look fine to me. :+1:
https://github.com/llvm/llvm-project/pull/88596
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -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
@@ -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
@@ -592,6 +592,46 @@ class AttrSubjectMatcherAggregateRule
{
def SubjectMatcherForNamed : AttrSubjectMatcherAggregateRule;
+// Late Attribute parsing mode enum
+class LateAttrParseKind {
+ int Kind = val;
+}
+
+// Never late parsed
+def LateAttrParseNever :
@@ -592,6 +592,46 @@ class AttrSubjectMatcherAggregateRule
{
def SubjectMatcherForNamed : AttrSubjectMatcherAggregateRule;
+// Late Attribute parsing mode enum
rapidsna wrote:
@delcypher Thanks! LGTM.
https://github.com/llvm/llvm-project/pull/88596
@@ -592,6 +592,46 @@ class AttrSubjectMatcherAggregateRule
{
def SubjectMatcherForNamed : AttrSubjectMatcherAggregateRule;
+// Late Attribute parsing mode enum
+class LateAttrParseKind {
+ int Kind = val;
+}
+
+// Never late parsed
+def LateAttrParseNever :
@@ -592,6 +592,46 @@ class AttrSubjectMatcherAggregateRule
{
def SubjectMatcherForNamed : AttrSubjectMatcherAggregateRule;
+// Late Attribute parsing mode enum
delcypher wrote:
@rapidsna I renamed the `LateAttrParseKind` definitions and updated the
https://github.com/delcypher updated
https://github.com/llvm/llvm-project/pull/88596
>From db0483ab298cbfee2a76844e4b0f63c3ae0ff68a Mon Sep 17 00:00:00 2001
From: Dan Liew
Date: Fri, 12 Apr 2024 17:36:19 -0700
Subject: [PATCH 1/3] [Attributes] Support Attributes being declared as only
@@ -1822,28 +1822,101 @@ void WriteSemanticSpellingSwitch(const std::string
,
OS << " }\n";
}
+enum class LateAttrParseKind { Never = 0, Always = 1, ExperimentalOnly = 2 };
+
+static LateAttrParseKind getLateAttrParseKind(const Record *Attr) {
+ // This function
https://github.com/delcypher updated
https://github.com/llvm/llvm-project/pull/88596
>From db0483ab298cbfee2a76844e4b0f63c3ae0ff68a Mon Sep 17 00:00:00 2001
From: Dan Liew
Date: Fri, 12 Apr 2024 17:36:19 -0700
Subject: [PATCH 1/2] [Attributes] Support Attributes being declared as only
@@ -1822,28 +1822,101 @@ void WriteSemanticSpellingSwitch(const std::string
,
OS << " }\n";
}
+enum class LateAttrParseKind { Never = 0, Always = 1, ExperimentalOnly = 2 };
+
+static LateAttrParseKind getLateAttrParseKind(const Record *Attr) {
+ // This function
@@ -592,6 +592,16 @@ class AttrSubjectMatcherAggregateRule
{
def SubjectMatcherForNamed : AttrSubjectMatcherAggregateRule;
+// Late Attribute parsing mode enum
+class LateAttrParseKind {
+ int Kind = val;
+}
+def LateAttrParseNever : LateAttrParseKind<0>; // Never late
@@ -1822,28 +1822,101 @@ void WriteSemanticSpellingSwitch(const std::string
,
OS << " }\n";
}
+enum class LateAttrParseKind { Never = 0, Always = 1, ExperimentalOnly = 2 };
+
+static LateAttrParseKind getLateAttrParseKind(const Record *Attr) {
+ // This function
https://github.com/delcypher updated
https://github.com/llvm/llvm-project/pull/88596
>From db0483ab298cbfee2a76844e4b0f63c3ae0ff68a Mon Sep 17 00:00:00 2001
From: Dan Liew
Date: Fri, 12 Apr 2024 17:36:19 -0700
Subject: [PATCH] [Attributes] Support Attributes being declared as only
supporting
https://github.com/delcypher edited
https://github.com/llvm/llvm-project/pull/88596
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
delcypher wrote:
@Sirraide I've tried to address your feedback.
https://github.com/llvm/llvm-project/pull/88596
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/delcypher updated
https://github.com/llvm/llvm-project/pull/88596
>From 31e3269126569e43cae3e4b7aba159f9a32d3c70 Mon Sep 17 00:00:00 2001
From: Dan Liew
Date: Fri, 12 Apr 2024 17:36:19 -0700
Subject: [PATCH] [Attributes] Support Attributes being declared as only
supporting
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 9bd10853e505b61f5fe2e3b3592c76787a06aa31
3554ada2c327aa6fb5ce90e26876414123bdca2d --
https://github.com/delcypher updated
https://github.com/llvm/llvm-project/pull/88596
>From 3554ada2c327aa6fb5ce90e26876414123bdca2d Mon Sep 17 00:00:00 2001
From: Dan Liew
Date: Fri, 12 Apr 2024 17:36:19 -0700
Subject: [PATCH] [Attributes] Support Attributes being declared as only
supporting
@@ -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
@@ -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
@@ -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
Sirraide wrote:
> Given that a subsequent patch will add the necessary test coverage and the
> above problems I think it is reasonable for explicit tests for
> `LateAttrParsingExperimentalOnly` to be omitted
Yeah, if it’s not used anywhere or if both prs are merged at the same time,
then
@@ -1822,28 +1822,106 @@ void WriteSemanticSpellingSwitch(const std::string
,
OS << " }\n";
}
+enum class LateAttrParseKind {
+ LateAttrParsingNever = 0,
+ LateAttrParsingAlways = 1,
+ LateAttrParsingExperimentalOnly = 2
+};
+
+static LateAttrParseKind
https://github.com/delcypher updated
https://github.com/llvm/llvm-project/pull/88596
>From 554287a724361a510389d7f34f9b57cf434b9657 Mon Sep 17 00:00:00 2001
From: Dan Liew
Date: Fri, 12 Apr 2024 17:36:19 -0700
Subject: [PATCH 1/2] [Attributes] Support Attributes being declared as only
delcypher wrote:
@Sirraide
Thanks for the feedback.
> This should also add some tests that actually use experimentally late-parsed
> attributes w/ the flag explicilty enabled/disabled.
The intention is for the functionality being added to be used in a subsequent
PR. This is currently
@@ -2101,9 +2179,20 @@ bool PragmaClangAttributeSupport::isAttributedSupported(
return SpecifiedResult;
// Opt-out rules:
- // An attribute requires delayed parsing (LateParsed is on)
- if (Attribute.getValueAsBit("LateParsed"))
+
+ // An attribute requires delayed
@@ -1822,28 +1822,106 @@ void WriteSemanticSpellingSwitch(const std::string
,
OS << " }\n";
}
+enum class LateAttrParseKind {
+ LateAttrParsingNever = 0,
+ LateAttrParsingAlways = 1,
+ LateAttrParsingExperimentalOnly = 2
+};
+
+static LateAttrParseKind
@@ -2101,9 +2179,20 @@ bool PragmaClangAttributeSupport::isAttributedSupported(
return SpecifiedResult;
// Opt-out rules:
- // An attribute requires delayed parsing (LateParsed is on)
- if (Attribute.getValueAsBit("LateParsed"))
+
+ // An attribute requires delayed
@@ -1822,28 +1822,106 @@ void WriteSemanticSpellingSwitch(const std::string
,
OS << " }\n";
}
+enum class LateAttrParseKind {
+ LateAttrParsingNever = 0,
+ LateAttrParsingAlways = 1,
+ LateAttrParsingExperimentalOnly = 2
+};
+
+static LateAttrParseKind
@@ -1822,28 +1822,106 @@ void WriteSemanticSpellingSwitch(const std::string
,
OS << " }\n";
}
+enum class LateAttrParseKind {
+ LateAttrParsingNever = 0,
+ LateAttrParsingAlways = 1,
+ LateAttrParsingExperimentalOnly = 2
+};
+
+static LateAttrParseKind
@@ -1822,28 +1822,106 @@ void WriteSemanticSpellingSwitch(const std::string
,
OS << " }\n";
}
+enum class LateAttrParseKind {
+ LateAttrParsingNever = 0,
+ LateAttrParsingAlways = 1,
+ LateAttrParsingExperimentalOnly = 2
+};
+
Sirraide wrote:
If it’s
@@ -1822,28 +1822,106 @@ void WriteSemanticSpellingSwitch(const std::string
,
OS << " }\n";
}
+enum class LateAttrParseKind {
+ LateAttrParsingNever = 0,
+ LateAttrParsingAlways = 1,
+ LateAttrParsingExperimentalOnly = 2
+};
+
delcypher wrote:
Yes.
@@ -1822,28 +1822,106 @@ void WriteSemanticSpellingSwitch(const std::string
,
OS << " }\n";
}
+enum class LateAttrParseKind {
+ LateAttrParsingNever = 0,
+ LateAttrParsingAlways = 1,
+ LateAttrParsingExperimentalOnly = 2
+};
+
+static LateAttrParseKind
@@ -2885,8 +2974,23 @@ static void emitAttributes(RecordKeeper ,
raw_ostream ,
return;
}
OS << "\n : " << SuperName << "(Ctx, CommonInfo, ";
- OS << "attr::" << R.getName() << ", "
- << (R.getValueAsBit("LateParsed") ? "true" : "false");
+
@@ -1822,28 +1822,106 @@ void WriteSemanticSpellingSwitch(const std::string
,
OS << " }\n";
}
+enum class LateAttrParseKind {
+ LateAttrParsingNever = 0,
+ LateAttrParsingAlways = 1,
+ LateAttrParsingExperimentalOnly = 2
+};
+
+static LateAttrParseKind
@@ -2885,8 +2974,23 @@ static void emitAttributes(RecordKeeper ,
raw_ostream ,
return;
}
OS << "\n : " << SuperName << "(Ctx, CommonInfo, ";
- OS << "attr::" << R.getName() << ", "
- << (R.getValueAsBit("LateParsed") ? "true" : "false");
+
@@ -1822,28 +1822,106 @@ void WriteSemanticSpellingSwitch(const std::string
,
OS << " }\n";
}
+enum class LateAttrParseKind {
+ LateAttrParsingNever = 0,
+ LateAttrParsingAlways = 1,
+ LateAttrParsingExperimentalOnly = 2
+};
+
+static LateAttrParseKind
@@ -1822,28 +1822,106 @@ void WriteSemanticSpellingSwitch(const std::string
,
OS << " }\n";
}
+enum class LateAttrParseKind {
+ LateAttrParsingNever = 0,
+ LateAttrParsingAlways = 1,
+ LateAttrParsingExperimentalOnly = 2
+};
+
+static LateAttrParseKind
@@ -2101,9 +2179,20 @@ bool PragmaClangAttributeSupport::isAttributedSupported(
return SpecifiedResult;
// Opt-out rules:
- // An attribute requires delayed parsing (LateParsed is on)
- if (Attribute.getValueAsBit("LateParsed"))
+
+ // An attribute requires delayed
@@ -1822,28 +1822,106 @@ void WriteSemanticSpellingSwitch(const std::string
,
OS << " }\n";
}
+enum class LateAttrParseKind {
+ LateAttrParsingNever = 0,
+ LateAttrParsingAlways = 1,
+ LateAttrParsingExperimentalOnly = 2
+};
+
+static LateAttrParseKind
@@ -1822,28 +1822,106 @@ void WriteSemanticSpellingSwitch(const std::string
,
OS << " }\n";
}
+enum class LateAttrParseKind {
+ LateAttrParsingNever = 0,
+ LateAttrParsingAlways = 1,
+ LateAttrParsingExperimentalOnly = 2
+};
+
Sirraide wrote:
This
@@ -1822,28 +1822,106 @@ void WriteSemanticSpellingSwitch(const std::string
,
OS << " }\n";
}
+enum class LateAttrParseKind {
+ LateAttrParsingNever = 0,
+ LateAttrParsingAlways = 1,
+ LateAttrParsingExperimentalOnly = 2
+};
+
+static LateAttrParseKind
https://github.com/Sirraide requested changes to this pull request.
Not too familiar w/ the overall context of this, so I can only comment on the
implementation.
This should also add some tests that actually use experimentally late-parsed
attributes w/ the flag explicilty enabled/disabled.
@@ -1822,28 +1822,106 @@ void WriteSemanticSpellingSwitch(const std::string
,
OS << " }\n";
}
+enum class LateAttrParseKind {
+ LateAttrParsingNever = 0,
+ LateAttrParsingAlways = 1,
+ LateAttrParsingExperimentalOnly = 2
+};
+
+static LateAttrParseKind
https://github.com/Sirraide edited
https://github.com/llvm/llvm-project/pull/88596
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/delcypher updated
https://github.com/llvm/llvm-project/pull/88596
>From 554287a724361a510389d7f34f9b57cf434b9657 Mon Sep 17 00:00:00 2001
From: Dan Liew
Date: Fri, 12 Apr 2024 17:36:19 -0700
Subject: [PATCH] [Attributes] Support Attributes being declared as only
supporting
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Dan Liew (delcypher)
Changes
[Attributes] Support Attributes being declared as only supporting late parsing
when passing an experimental feature flag
This patch changes the `LateParsed` field of `Attr` in `Attr.td` to be an
https://github.com/delcypher created
https://github.com/llvm/llvm-project/pull/88596
[Attributes] Support Attributes being declared as only supporting late parsing
when passing an experimental feature flag
This patch changes the `LateParsed` field of `Attr` in `Attr.td` to be an
51 matches
Mail list logo