[clang] [Clang] Address post commit feedbacks in #89906 (PR #90495)
@@ -177,7 +177,7 @@ C++2c implementation status Attributes for Structured Bindings https://wg21.link/P0609R3";>P0609R3 - No + Clang 19 cor3ntin wrote: Ugh, how did that happen? Thanks for noticing! https://github.com/llvm/llvm-project/pull/90495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Clang] Address post commit feedbacks in #89906 (PR #90495)
@@ -187,7 +187,7 @@ C++2c implementation status Trivial infinite loops are not Undefined Behavior https://wg21.link/P2809R3";>P2809R3 (DR) - Clang 19 + No vogelsgesang wrote: unreleased -> none https://github.com/llvm/llvm-project/pull/90495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Clang] Address post commit feedbacks in #89906 (PR #90495)
@@ -177,7 +177,7 @@ C++2c implementation status Attributes for Structured Bindings https://wg21.link/P0609R3";>P0609R3 - No + Clang 19 vogelsgesang wrote: none -> unreleased But maybe just fix this together when landing #90066... https://github.com/llvm/llvm-project/pull/90495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Clang] Address post commit feedbacks in #89906 (PR #90495)
cor3ntin wrote: This compiles locally. CI is really slow... https://github.com/llvm/llvm-project/pull/90495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Clang] Address post commit feedbacks in #89906 (PR #90495)
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/90495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Clang] Address post commit feedbacks in #89906 (PR #90495)
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/90495 >From bc23126800d3977665f0e1393b65acfff742c028 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 29 Apr 2024 18:34:49 +0200 Subject: [PATCH] [Clang] Address post commit feedback in #89906 * Fix a leak * Fix a maybe unused warning * Fix incorrect cxx_status entry --- clang/include/clang/Sema/DeclSpec.h | 8 clang/lib/AST/DeclBase.cpp | 2 +- clang/www/cxx_status.html | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/clang/include/clang/Sema/DeclSpec.h b/clang/include/clang/Sema/DeclSpec.h index 760c7980be52bd..23bc780e04979d 100644 --- a/clang/include/clang/Sema/DeclSpec.h +++ b/clang/include/clang/Sema/DeclSpec.h @@ -1811,15 +1811,15 @@ class DecompositionDeclarator { : Bindings(nullptr), NumBindings(0), DeleteBindings(false) {} DecompositionDeclarator(const DecompositionDeclarator &G) = delete; DecompositionDeclarator &operator=(const DecompositionDeclarator &G) = delete; - ~DecompositionDeclarator() { -if (DeleteBindings) - delete[] Bindings; - } + ~DecompositionDeclarator() { clear(); } void clear() { LSquareLoc = RSquareLoc = SourceLocation(); if (DeleteBindings) delete[] Bindings; +else + llvm::for_each(llvm::MutableArrayRef(Bindings, NumBindings), + [](Binding &B) { B.Attrs.reset(); }); Bindings = nullptr; NumBindings = 0; DeleteBindings = false; diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp index f341c74cf86e37..03e1055251c24f 100644 --- a/clang/lib/AST/DeclBase.cpp +++ b/clang/lib/AST/DeclBase.cpp @@ -1115,7 +1115,7 @@ int64_t Decl::getID() const { const FunctionType *Decl::getFunctionType(bool BlocksToo) const { QualType Ty; - if (const auto *D = dyn_cast(this)) + if (isa(this)) return nullptr; else if (const auto *D = dyn_cast(this)) Ty = D->getType(); diff --git a/clang/www/cxx_status.html b/clang/www/cxx_status.html index d58c35b72c22bb..0996abc2405857 100755 --- a/clang/www/cxx_status.html +++ b/clang/www/cxx_status.html @@ -177,7 +177,7 @@ C++2c implementation status Attributes for Structured Bindings https://wg21.link/P0609R3";>P0609R3 - No + Clang 19 Module Declarations Shouldn’t be Macros @@ -187,7 +187,7 @@ C++2c implementation status Trivial infinite loops are not Undefined Behavior https://wg21.link/P2809R3";>P2809R3 (DR) - Clang 19 + No Erroneous behaviour for uninitialized reads ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Clang] Address post commit feedbacks in #89906 (PR #90495)
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/90495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Clang] Address post commit feedbacks in #89906 (PR #90495)
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes * Fix a leak * Fix a maybe unused warning * Fix incorrect cxx_status entry --- Full diff: https://github.com/llvm/llvm-project/pull/90495.diff 3 Files Affected: - (modified) clang/include/clang/Sema/DeclSpec.h (+3) - (modified) clang/lib/AST/DeclBase.cpp (+1-1) - (modified) clang/www/cxx_status.html (+2-2) ``diff diff --git a/clang/include/clang/Sema/DeclSpec.h b/clang/include/clang/Sema/DeclSpec.h index 760c7980be52bd..d641e7c3b92d5e 100644 --- a/clang/include/clang/Sema/DeclSpec.h +++ b/clang/include/clang/Sema/DeclSpec.h @@ -1814,6 +1814,9 @@ class DecompositionDeclarator { ~DecompositionDeclarator() { if (DeleteBindings) delete[] Bindings; +else + llvm::for_each(llvm::MutableArrayRef(Bindings, NumBindings), + [](Binding &B) { B.Attrs.reset(); }); } void clear() { diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp index f341c74cf86e37..03e1055251c24f 100644 --- a/clang/lib/AST/DeclBase.cpp +++ b/clang/lib/AST/DeclBase.cpp @@ -1115,7 +1115,7 @@ int64_t Decl::getID() const { const FunctionType *Decl::getFunctionType(bool BlocksToo) const { QualType Ty; - if (const auto *D = dyn_cast(this)) + if (isa(this)) return nullptr; else if (const auto *D = dyn_cast(this)) Ty = D->getType(); diff --git a/clang/www/cxx_status.html b/clang/www/cxx_status.html index d58c35b72c22bb..0996abc2405857 100755 --- a/clang/www/cxx_status.html +++ b/clang/www/cxx_status.html @@ -177,7 +177,7 @@ C++2c implementation status Attributes for Structured Bindings https://wg21.link/P0609R3";>P0609R3 - No + Clang 19 Module Declarations Shouldn’t be Macros @@ -187,7 +187,7 @@ C++2c implementation status Trivial infinite loops are not Undefined Behavior https://wg21.link/P2809R3";>P2809R3 (DR) - Clang 19 + No Erroneous behaviour for uninitialized reads `` https://github.com/llvm/llvm-project/pull/90495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Clang] Address post commit feedbacks in #89906 (PR #90495)
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/90495 * Fix a leak * Fix a maybe unused warning * Fix incorrect cxx_status entry >From 9d29106b06e8e2b0b388c755b81d4e1d9b217976 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 29 Apr 2024 18:34:49 +0200 Subject: [PATCH] [Clang] Address post commit feedback in #89906 * Fix a leak * Fix a maybe unused warning * Fix incorrect cxx_status entry --- clang/include/clang/Sema/DeclSpec.h | 3 +++ clang/lib/AST/DeclBase.cpp | 2 +- clang/www/cxx_status.html | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/clang/include/clang/Sema/DeclSpec.h b/clang/include/clang/Sema/DeclSpec.h index 760c7980be52bd..d641e7c3b92d5e 100644 --- a/clang/include/clang/Sema/DeclSpec.h +++ b/clang/include/clang/Sema/DeclSpec.h @@ -1814,6 +1814,9 @@ class DecompositionDeclarator { ~DecompositionDeclarator() { if (DeleteBindings) delete[] Bindings; +else + llvm::for_each(llvm::MutableArrayRef(Bindings, NumBindings), + [](Binding &B) { B.Attrs.reset(); }); } void clear() { diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp index f341c74cf86e37..03e1055251c24f 100644 --- a/clang/lib/AST/DeclBase.cpp +++ b/clang/lib/AST/DeclBase.cpp @@ -1115,7 +1115,7 @@ int64_t Decl::getID() const { const FunctionType *Decl::getFunctionType(bool BlocksToo) const { QualType Ty; - if (const auto *D = dyn_cast(this)) + if (isa(this)) return nullptr; else if (const auto *D = dyn_cast(this)) Ty = D->getType(); diff --git a/clang/www/cxx_status.html b/clang/www/cxx_status.html index d58c35b72c22bb..0996abc2405857 100755 --- a/clang/www/cxx_status.html +++ b/clang/www/cxx_status.html @@ -177,7 +177,7 @@ C++2c implementation status Attributes for Structured Bindings https://wg21.link/P0609R3";>P0609R3 - No + Clang 19 Module Declarations Shouldn’t be Macros @@ -187,7 +187,7 @@ C++2c implementation status Trivial infinite loops are not Undefined Behavior https://wg21.link/P2809R3";>P2809R3 (DR) - Clang 19 + No Erroneous behaviour for uninitialized reads ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits