[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-05-20 Thread Erich Keane via cfe-commits
erichkeane wrote: > @erichkeane I posted the comment on the wrong PR. The memory leak is in > #90786 not this PR so I deleted the comment i made here. #90786 has already > been reverted. Thanks! I am still catching up on emails, and I think I figured that out literally moments ago :)

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-05-20 Thread Dan Liew via cfe-commits
delcypher wrote: @erichkeane I posted the comment on the wrong PR. The memory leak is in #90786 not this PR so I deleted the comment i made here. #90786 has already been reverted. https://github.com/llvm/llvm-project/pull/88596 ___ cfe-commits

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-05-20 Thread Erich Keane via cfe-commits
erichkeane wrote: Did a message get deleted here? I saw in my email that you pointed out there is a memory leak because of this patch. (https://lab.llvm.org/buildbot/#/builders/239/builds/7043) If so, we probably should revert this until that gets figured out.

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-05-17 Thread Dan Liew via cfe-commits
delcypher wrote: Hmm. Apparently there's a memory leak. https://lab.llvm.org/buildbot/#/builders/239/builds/7043 ``` -- Testing: 79948 of 79949 tests, 48 workers -- Testing: FAIL: Clang :: AST/attr-counted-by-late-parsed-struct-ptrs.c (480 of 79948) TEST 'Clang ::

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-29 Thread Dan Liew via cfe-commits
https://github.com/delcypher closed 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

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-29 Thread Dan Liew via cfe-commits
delcypher wrote: @erichkeane Thanks for approving. I'll rebase, check this builds and then land this. @AaronBallman When you're back please let me know if there's any follow up changes you want. https://github.com/llvm/llvm-project/pull/88596 ___

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-29 Thread Dan Liew via cfe-commits
https://github.com/delcypher updated https://github.com/llvm/llvm-project/pull/88596 >From 07ab74ac8829e6c3e4365e1a87148d21800437d3 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Tue, 23 Apr 2024 14:57:46 -0700 Subject: [PATCH] [Attributes] Support Attributes being declared as supporting an

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-29 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. This looks fine enough to me. Aaron is away this week, so you can either let him review this when he gets back, or just merge this and let him make comments on followups/on the commit when he gets back.

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-29 Thread Dan Liew via cfe-commits
delcypher wrote: @AaronBallman @erichkeane Ping. Is this ready to land? 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

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Dan Liew via cfe-commits
@@ -214,6 +214,10 @@ New Compiler Flags This diagnostic can be disabled to make ``-Wmissing-field-initializers`` behave like it did before Clang 18.x. Fixes (`#56628 `_) +- ``-fexperimental-late-parse-attributes``

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Dan Liew via cfe-commits
@@ -1822,28 +1822,100 @@ void WriteSemanticSpellingSwitch(const std::string , OS << " }\n"; } +enum class LateAttrParseKind { Never = 0, Standard = 1, ExperimentalExt = 2 }; + +static LateAttrParseKind getLateAttrParseKind(const Record *Attr) { + // This function

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Dan Liew via cfe-commits
https://github.com/delcypher updated https://github.com/llvm/llvm-project/pull/88596 >From a6d390cc4f109ee0a19779ba11b33f2caf8904c3 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Tue, 23 Apr 2024 14:57:46 -0700 Subject: [PATCH] [Attributes] Support Attributes being declared as supporting an

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Dan Liew via cfe-commits
@@ -592,6 +592,48 @@ class AttrSubjectMatcherAggregateRule { def SubjectMatcherForNamed : AttrSubjectMatcherAggregateRule; +// Late Attribute parsing mode enum +class LateAttrParseKind { + int Kind = val; +} + +// Never late parsed +def LateAttrParseNever :

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Dan Liew via cfe-commits
delcypher wrote: @AaronBallman Thanks for the feedback > We should probably add a release note to tell users about the new command > line option, unless you think it makes more sense to do so after something > uses `LateAttrParseExperimentalExt`? I had a think about it and I'll add a release

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Aaron Ballman via cfe-commits
@@ -592,6 +592,48 @@ class AttrSubjectMatcherAggregateRule { def SubjectMatcherForNamed : AttrSubjectMatcherAggregateRule; +// Late Attribute parsing mode enum +class LateAttrParseKind { + int Kind = val; +} + +// Never late parsed +def LateAttrParseNever :

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Aaron Ballman via cfe-commits
@@ -220,8 +230,28 @@ void Parser::ParseGNUAttributes(ParsedAttributes , continue; } + bool LateParse = false; + if (!LateAttrs) +LateParse = false; + else { AaronBallman wrote: Can remove a level of indentation here by

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Aaron Ballman via cfe-commits
@@ -1822,28 +1822,100 @@ void WriteSemanticSpellingSwitch(const std::string , OS << " }\n"; } +enum class LateAttrParseKind { Never = 0, Standard = 1, ExperimentalExt = 2 }; + +static LateAttrParseKind getLateAttrParseKind(const Record *Attr) { + // This function

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Aaron Ballman via cfe-commits
@@ -1822,28 +1822,100 @@ void WriteSemanticSpellingSwitch(const std::string , OS << " }\n"; } +enum class LateAttrParseKind { Never = 0, Standard = 1, ExperimentalExt = 2 }; AaronBallman wrote: ```suggestion // Note: these values need to match the values

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Aaron Ballman via cfe-commits
@@ -220,8 +230,28 @@ void Parser::ParseGNUAttributes(ParsedAttributes , continue; } + bool LateParse = false; + if (!LateAttrs) +LateParse = false; + else { +if (LateAttrs->lateAttrParseExperimentalExtOnly()) { + // The

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Aaron Ballman via cfe-commits
@@ -1822,28 +1822,100 @@ void WriteSemanticSpellingSwitch(const std::string , OS << " }\n"; } +enum class LateAttrParseKind { Never = 0, Standard = 1, ExperimentalExt = 2 }; + +static LateAttrParseKind getLateAttrParseKind(const Record *Attr) { + // This function

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Aaron Ballman via cfe-commits
@@ -592,6 +592,48 @@ class AttrSubjectMatcherAggregateRule { def SubjectMatcherForNamed : AttrSubjectMatcherAggregateRule; +// Late Attribute parsing mode enum +class LateAttrParseKind { + int Kind = val; +} AaronBallman wrote: ```suggestion //

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Aaron Ballman via cfe-commits
@@ -592,6 +592,48 @@ class AttrSubjectMatcherAggregateRule { def SubjectMatcherForNamed : AttrSubjectMatcherAggregateRule; +// Late Attribute parsing mode enum +class LateAttrParseKind { + int Kind = val; +} + +// Never late parsed +def LateAttrParseNever :

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: We should probably add a release note to tell users about the new command line option, unless you think it makes more sense to do so after something uses `LateAttrParseExperimentalExt`? One concern I have is that nothing is testing the new parsing

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman 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

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Yeoul Na via cfe-commits
@@ -1371,14 +1371,23 @@ class Parser : public CodeCompletionHandler { }; // A list of late-parsed attributes. Used by ParseGNUAttributes. - class LateParsedAttrList: public SmallVector { + class LateParsedAttrList : public SmallVector { rapidsna wrote:

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna approved this pull request. LGTM 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

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Yeoul Na via cfe-commits
@@ -2101,9 +2173,21 @@ bool PragmaClangAttributeSupport::isAttributedSupported( return SpecifiedResult; // Opt-out rules: - // An attribute requires delayed parsing (LateParsed is on) - if (Attribute.getValueAsBit("LateParsed")) + + // An attribute requires delayed

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Yeoul Na via cfe-commits
@@ -89,13 +89,23 @@ static StringRef normalizeAttrName(StringRef Name) { return Name; } -/// isAttributeLateParsed - Return true if the attribute has arguments that -/// require late parsing. -static bool isAttributeLateParsed(const IdentifierInfo ) { +/// returns true iff

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-19 Thread Dan Liew via cfe-commits
delcypher wrote: @rapidsna I've re-implemented this patch with the new semantics that we discussed offline. I have also reworked #87596 to use this new implementation. https://github.com/llvm/llvm-project/pull/88596 ___ cfe-commits mailing list

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-19 Thread Dan Liew via cfe-commits
https://github.com/delcypher updated https://github.com/llvm/llvm-project/pull/88596 >From b859cf056df24daa85f3fd305ef56f32e0f266ed 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

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-19 Thread Dan Liew via cfe-commits
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