[clang] [OpenACC] Implement initial parsing for Construct/Directive Names (PR #72661)

2023-11-17 Thread Erich Keane via cfe-commits
@@ -0,0 +1,72 @@ +//===--- OpenACCKinds.h - OpenACC Enums -*- 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: Apa

[clang] [OpenACC] Implement initial parsing for Construct/Directive Names (PR #72661)

2023-11-17 Thread Erich Keane via cfe-commits
@@ -10,18 +10,240 @@ // //===--===// +#include "clang/Basic/OpenACCKinds.h" #include "clang/Parse/ParseDiagnostic.h" #include "clang/Parse/Parser.h" +#include "clang/Parse/RAIIObjectsForParser.h" +#include

[llvm] [clang] [lldb] [OpenACC] Implement initial parsing for Construct/Directive Names (PR #72661)

2023-11-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/72661 >From 01fc81b37ad744a265f712b26fd6c3a85430c719 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Fri, 17 Nov 2023 06:29:35 -0800 Subject: [PATCH 1/2] [OpenACC] Implement initial parsing for Construct/Directive

[llvm] [clang] [lldb] [OpenACC] Implement initial parsing for Construct/Directive Names (PR #72661)

2023-11-17 Thread Erich Keane via cfe-commits
@@ -3531,7 +3535,7 @@ class Parser : public CodeCompletionHandler { /// Placeholder for now, should just ignore the directives after emitting a /// diagnostic. Eventually will be split into a few functions to parse /// different situations. - DeclGroupPtrTy ParseOpenACCD

[clang] [lldb] [llvm] [OpenACC] Implement initial parsing for Construct/Directive Names (PR #72661)

2023-11-17 Thread Erich Keane via cfe-commits
@@ -10,18 +10,240 @@ // //===--===// +#include "clang/Basic/OpenACCKinds.h" #include "clang/Parse/ParseDiagnostic.h" #include "clang/Parse/Parser.h" +#include "clang/Parse/RAIIObjectsForParser.h" +#include

[clang] [llvm] [lldb] [OpenACC] Implement initial parsing for Construct/Directive Names (PR #72661)

2023-11-17 Thread Erich Keane via cfe-commits
@@ -0,0 +1,72 @@ +//===--- OpenACCKinds.h - OpenACC Enums -*- 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: Apa

[libc] [clang-tools-extra] [libcxx] [clang] [lld] [lldb] [flang] [llvm] [OpenACC] Initial commits to support OpenACC (PR #70234)

2023-11-17 Thread Erich Keane via cfe-commits
erichkeane wrote: > We will want to have OpenACC label(s) such that people who are interested can > be notified. Done, see the next patch in the set here: https://github.com/llvm/llvm-project/pull/72661 I'll start adding them and see if I can get @llvmbot to teach me how to add it. https://

[clang] [lldb] [llvm] [OpenACC] Implement initial parsing for Construct/Directive Names (PR #72661)

2023-11-17 Thread Erich Keane via cfe-commits
@@ -10,18 +10,240 @@ // //===--===// +#include "clang/Basic/OpenACCKinds.h" #include "clang/Parse/ParseDiagnostic.h" #include "clang/Parse/Parser.h" +#include "clang/Parse/RAIIObjectsForParser.h" +#include

[lldb] [clang] [llvm] [OpenACC] Implement initial parsing for Construct/Directive Names (PR #72661)

2023-11-17 Thread Erich Keane via cfe-commits
@@ -0,0 +1,72 @@ +//===--- OpenACCKinds.h - OpenACC Enums -*- 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: Apa

[lldb] [llvm] [clang] [OpenACC] Implement initial parsing for Construct/Directive Names (PR #72661)

2023-11-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/72661 >From 01fc81b37ad744a265f712b26fd6c3a85430c719 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Fri, 17 Nov 2023 06:29:35 -0800 Subject: [PATCH 1/3] [OpenACC] Implement initial parsing for Construct/Directive

[lldb] [llvm] [clang] [OpenACC] Implement initial parsing for `parallel` construct (PR #72661)

2023-11-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/72661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lldb] [llvm] [clang] [OpenACC] Implement initial parsing for `parallel` construct (PR #72661)

2023-11-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/72661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lldb] [llvm] [clang] [OpenACC] Implement initial parsing for `parallel` construct (PR #72661)

2023-11-17 Thread Erich Keane via cfe-commits
erichkeane wrote: @alexey-bataev : Patch reduced to just parallel as requested. https://github.com/llvm/llvm-project/pull/72661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [clang-tools-extra] [compiler-rt] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-17 Thread Erich Keane via cfe-commits
@@ -322,6 +322,73 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const ParsedAttr &A, return ::new (S.Context) UnlikelyAttr(S.Context, A); } +CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI, +Expr *E) { + if

[llvm] [lldb] [clang] [OpenACC] Implement initial parsing for `parallel` construct (PR #72661)

2023-11-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane closed https://github.com/llvm/llvm-project/pull/72661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [llvm] [clang-tools-extra] [clang] [compiler-rt] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-17 Thread Erich Keane via cfe-commits
@@ -322,6 +322,77 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const ParsedAttr &A, return ::new (S.Context) UnlikelyAttr(S.Context, A); } +CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI, +Expr *E) { + if

[clang-tools-extra] [llvm] [compiler-rt] [flang] [clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-17 Thread Erich Keane via cfe-commits
@@ -322,6 +322,77 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const ParsedAttr &A, return ::new (S.Context) UnlikelyAttr(S.Context, A); } +CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI, +Expr *E) { + if

[clang] [Clang] Fix finding instantiated decls for class template specializations during instantiation (PR #72346)

2023-11-17 Thread Erich Keane via cfe-commits
erichkeane wrote: > Thanks for the review, @erichkeane. I am wondering what you mean by this > needs "release note"? Ah, yes! See `docs/ReleaseNotes.rst`. For each new bug fix (and most patches!) we require an entry into our release notes document. https://github.com/llvm/llvm-project/pull/

[clang] [OpenACC] Implement compound construct parsing (PR #72692)

2023-11-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/72692 This patch implements the compound construct parsing, which allows 'parallel loop', 'serial loop', and 'kernel loop' to act as their own constructs. Note that this doesn't end up making any changes to the tes

[clang-tools-extra] [llvm] [compiler-rt] [flang] [clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-17 Thread Erich Keane via cfe-commits
@@ -322,6 +322,81 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const ParsedAttr &A, return ::new (S.Context) UnlikelyAttr(S.Context, A); } +CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI, +Expr *E) { + if

[clang-tools-extra] [flang] [llvm] [clang] [compiler-rt] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-17 Thread Erich Keane via cfe-commits
@@ -0,0 +1,164 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,c-local -x c %s +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cpp-local -pedantic -x c++ -std=c++11 %s + +void foo() { + int i; + int a[10], b[10]; + + [[clang::code_align(8)]] + for (i = 0; i < 10; ++i

[clang] [OpenACC] Implement compound construct parsing (PR #72692)

2023-11-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/72692 >From 33ca88871b48fcfb16bdf7fa636a9ecfa4f38e08 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Fri, 17 Nov 2023 11:34:43 -0800 Subject: [PATCH 1/2] [OpenACC] Implement compound construct parsing This patch im

[clang] [OpenACC] Implement compound construct parsing (PR #72692)

2023-11-17 Thread Erich Keane via cfe-commits
@@ -50,6 +52,35 @@ OpenACCDirectiveKind ParseOpenACCDirectiveKind(Parser &P) { if (DirKind == OpenACCDirectiveKind::Invalid) P.Diag(FirstTok, diag::err_acc_invalid_directive) << FirstTokSpelling; + // Combined Constructs allows parallel loop, serial loop, or kernels loo

[clang] [OpenACC] Implement compound construct parsing (PR #72692)

2023-11-17 Thread Erich Keane via cfe-commits
@@ -45,11 +47,36 @@ OpenACCDirectiveKind ParseOpenACCDirectiveKind(Parser &P) { P.ConsumeToken(); std::string FirstTokSpelling = P.getPreprocessor().getSpelling(FirstTok); - OpenACCDirectiveKind DirKind = GetOpenACCDirectiveKind(FirstTokSpelling); + OpenACCDirectiveKind

[clang] [OpenACC] Implement compound construct parsing (PR #72692)

2023-11-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/72692 >From 33ca88871b48fcfb16bdf7fa636a9ecfa4f38e08 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Fri, 17 Nov 2023 11:34:43 -0800 Subject: [PATCH 1/3] [OpenACC] Implement compound construct parsing This patch im

[clang] [OpenACC] Implement compound construct parsing (PR #72692)

2023-11-17 Thread Erich Keane via cfe-commits
@@ -45,11 +47,36 @@ OpenACCDirectiveKind ParseOpenACCDirectiveKind(Parser &P) { P.ConsumeToken(); std::string FirstTokSpelling = P.getPreprocessor().getSpelling(FirstTok); - OpenACCDirectiveKind DirKind = GetOpenACCDirectiveKind(FirstTokSpelling); + OpenACCDirectiveKind

[clang] [Clang][Sema] Diagnose friend function specialization definitions (PR #72863)

2023-11-20 Thread Erich Keane via cfe-commits
@@ -4,7 +4,8 @@ void f(T); template struct A { - // expected-error@+1{{cannot declare an explicit specialization in a friend}} + // expected-error@+2{{cannot declare an explicit specialization in a friend}} + // expected-error@+1{{friend function specialization cannot be de

[clang] [Clang][Sema] Diagnose friend function specialization definitions (PR #72863)

2023-11-20 Thread Erich Keane via cfe-commits
@@ -373,6 +373,7 @@ template void foo() {} // expected-note{{candidate ignored: not a memb } using ns::foo; template struct A { + // expected-error@+1{{friend function specialization cannot be defined}} erichkeane wrote: These already error, and doing a do

[clang] [Clang][Sema] Diagnose friend function specialization definitions (PR #72863)

2023-11-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/72863 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Diagnose friend function specialization definitions (PR #72863)

2023-11-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Needs a release note, + this should be replacing errors in the below cases. https://github.com/llvm/llvm-project/pull/72863 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [OpenACC] Implement compound construct parsing (PR #72692)

2023-11-20 Thread Erich Keane via cfe-commits
erichkeane wrote: > Need to add tests I mentioned in the commit message, that unfortunately this doesn't change behavior in a way that we can discover in our testing (unless you know how to check which character a diagnostic was issued on with `VerifyDiagnosticsConsumer`?). I'd left the test

[clang] [OpenACC] Implement compound construct parsing (PR #72692)

2023-11-20 Thread Erich Keane via cfe-commits
erichkeane wrote: > > Need to add tests > > I mentioned in the commit message, that unfortunately this doesn't change > behavior in a way that we can discover in our testing (unless you know how to > check which character a diagnostic was issued on with > `VerifyDiagnosticsConsumer`?). I'd le

[clang] [OpenACC] Implement compound construct parsing (PR #72692)

2023-11-20 Thread Erich Keane via cfe-commits
@@ -45,11 +47,36 @@ OpenACCDirectiveKind ParseOpenACCDirectiveKind(Parser &P) { P.ConsumeToken(); std::string FirstTokSpelling = P.getPreprocessor().getSpelling(FirstTok); - OpenACCDirectiveKind DirKind = GetOpenACCDirectiveKind(FirstTokSpelling); + OpenACCDirectiveKind

[clang] [OpenACC] Implement compound construct parsing (PR #72692)

2023-11-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/72692 >From 33ca88871b48fcfb16bdf7fa636a9ecfa4f38e08 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Fri, 17 Nov 2023 11:34:43 -0800 Subject: [PATCH 1/4] [OpenACC] Implement compound construct parsing This patch im

[clang] [OpenACC] Implement compound construct parsing (PR #72692)

2023-11-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/72692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang-tools-extra] [compiler-rt] [clang] [llvm] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/70762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement compound construct parsing (PR #72692)

2023-11-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane closed https://github.com/llvm/llvm-project/pull/72692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix finding instantiated decls for class template specializations during instantiation (PR #72346)

2023-11-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/72346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement enter data/exit data construct parsing (PR #72916)

2023-11-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/72916 These two constructs, 'enter data' and 'exit data', are novel compared to what is currently in the parser, as this is the first set implemented where the first token is itself not a valid construct. Because

[clang] [clang] Fix lit test failure caused by https://github.com/llvm/llvm-project/pull/70762 (PR #72928)

2023-11-21 Thread Erich Keane via cfe-commits
https://github.com/erichkeane closed https://github.com/llvm/llvm-project/pull/72928 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement enter data/exit data construct parsing (PR #72916)

2023-11-21 Thread Erich Keane via cfe-commits
@@ -91,10 +140,19 @@ OpenACCDirectiveKind ParseOpenACCDirectiveKind(Parser &P) { P.ConsumeToken(); std::string FirstTokSpelling = P.getPreprocessor().getSpelling(FirstTok); - OpenACCDirectiveKind DirKind = getOpenACCDirectiveKind(FirstTokSpelling); + OpenACCDirectiveKind

[clang] [OpenACC] Implement enter data/exit data construct parsing (PR #72916)

2023-11-21 Thread Erich Keane via cfe-commits
@@ -91,10 +140,19 @@ OpenACCDirectiveKind ParseOpenACCDirectiveKind(Parser &P) { P.ConsumeToken(); std::string FirstTokSpelling = P.getPreprocessor().getSpelling(FirstTok); - OpenACCDirectiveKind DirKind = getOpenACCDirectiveKind(FirstTokSpelling); + OpenACCDirectiveKind

[clang] [OpenACC] Implement enter data/exit data construct parsing (PR #72916)

2023-11-21 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/72916 >From 5bdbe165e73eea4c01d0a02dec33afdd752a1858 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Mon, 20 Nov 2023 13:07:55 -0800 Subject: [PATCH 1/2] [OpenACC] Implement enter data/exit data construct parsing

[clang] [OpenACC] Implement enter data/exit data construct parsing (PR #72916)

2023-11-21 Thread Erich Keane via cfe-commits
https://github.com/erichkeane closed https://github.com/llvm/llvm-project/pull/72916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement Atomic construct variants (PR #73015)

2023-11-21 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/73015 `atomic` is required to be followed by a special `atomic clause`, so this patch manages the parsing of that. We are representing each of the variants of the atomic construct as separate kinds, because they h

[clang] [clang] Fix a bug with qualified name lookup into current instantiation (PR #73018)

2023-11-21 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. The patch makes sense to me, though my knowledge of this function is limited. Please give @cor3ntin a chance to look at it too in case he sees something I don't. https://github.com/llvm/llvm-project/pull/73018 _

[clang] [OpenACC] Implement Atomic construct variants (PR #73015)

2023-11-21 Thread Erich Keane via cfe-commits
@@ -59,9 +60,21 @@ OpenACCDirectiveKindEx getOpenACCDirectiveKind(StringRef Name) { return llvm::StringSwitch(Name) .Case("enter", OpenACCDirectiveKindEx::Enter) .Case("exit", OpenACCDirectiveKindEx::Exit) + .Case("atomic", OpenACCDirectiveKindEx::Atomic)

[clang] [OpenACC] Implement Atomic construct variants (PR #73015)

2023-11-21 Thread Erich Keane via cfe-commits
@@ -59,9 +60,21 @@ OpenACCDirectiveKindEx getOpenACCDirectiveKind(StringRef Name) { return llvm::StringSwitch(Name) .Case("enter", OpenACCDirectiveKindEx::Enter) .Case("exit", OpenACCDirectiveKindEx::Exit) + .Case("atomic", OpenACCDirectiveKindEx::Atomic)

[clang] [OpenACC] Implement Atomic construct variants (PR #73015)

2023-11-21 Thread Erich Keane via cfe-commits
@@ -94,6 +94,37 @@ void func() { #pragma acc kernels loop for(;;){} + int i = 0, j = 0, k = 0; + // expected-error@+2{{missing OpenACC 'atomic-clause'; expected 'read', 'write', 'update', or 'capture'}} + // expected-warning@+1{{OpenACC directives not yet implemented, pr

[clang] [OpenACC] Implement Atomic construct variants (PR #73015)

2023-11-21 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/73015 >From e656fb03feeafa1997a4b93126063ad77ecf5b2c Mon Sep 17 00:00:00 2001 From: erichkeane Date: Tue, 21 Nov 2023 08:56:00 -0800 Subject: [PATCH 1/2] [OpenACC] Implement Atomic construct variants `atomic` is re

[clang] [OpenACC] Implement Atomic construct variants (PR #73015)

2023-11-21 Thread Erich Keane via cfe-commits
@@ -59,9 +60,21 @@ OpenACCDirectiveKindEx getOpenACCDirectiveKind(StringRef Name) { return llvm::StringSwitch(Name) .Case("enter", OpenACCDirectiveKindEx::Enter) .Case("exit", OpenACCDirectiveKindEx::Exit) + .Case("atomic", OpenACCDirectiveKindEx::Atomic)

[clang] [OpenACC] Implement Atomic construct variants (PR #73015)

2023-11-21 Thread Erich Keane via cfe-commits
@@ -143,26 +139,25 @@ ParseOpenACCEnterExitDataDirective(Parser &P, Token FirstTok, : OpenACCDirectiveKind::ExitData; } -OpenACCDirectiveKind ParseOpenACCAtomicDirective(Parser &P) { +OpenACCAtomicKind ParseOpenACCAtomicKind(Parser &P) { Token AtomicClauseToke

[clang] [OpenACC] Implement Atomic construct variants (PR #73015)

2023-11-21 Thread Erich Keane via cfe-commits
https://github.com/erichkeane closed https://github.com/llvm/llvm-project/pull/73015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland "[clang][Sema] Use original template pattern when declaring implicit deduction guides for nested template classes" (PR #73087)

2023-11-22 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/73087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement 'routine' construct parsing (PR #73143)

2023-11-22 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/73143 The 'routine' construct applies either to a function directly, or, when provided a name, applies to the function named (and is visible in the current scope). This patch implements the parsing for this. The ide

[clang] [OpenACC] Implement 'routine' construct parsing (PR #73143)

2023-11-22 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/73143 >From c6b9245f7865a99cd5024fc62aca0f496bcce12b Mon Sep 17 00:00:00 2001 From: erichkeane Date: Tue, 21 Nov 2023 14:04:41 -0800 Subject: [PATCH 1/2] [OpenACC] Implement 'routine' construct parsing The 'routine

[clang] [OpenACC] Implement 'routine' construct parsing (PR #73143)

2023-11-22 Thread Erich Keane via cfe-commits
@@ -232,32 +235,87 @@ void ParseOpenACCClauseList(Parser &P) { P.Diag(P.getCurToken(), diag::warn_pragma_acc_unimplemented_clause_parsing); } -void ParseOpenACCDirective(Parser &P) { - OpenACCDirectiveKind DirKind = ParseOpenACCDirectiveKind(P); +} // namespace + +// Rou

[clang] [OpenACC] Implement 'routine' construct parsing (PR #73143)

2023-11-22 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/73143 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement 'routine' construct parsing (PR #73143)

2023-11-22 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/73143 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Differentiate between identifier and string EnumArgument (PR #68550)

2023-10-30 Thread Erich Keane via cfe-commits
@@ -274,20 +274,27 @@ class DefaultIntArgument : IntArgument { } // This argument is more complex, it includes the enumerator type name, -// a list of strings to accept, and a list of enumerators to map them to. -class EnumArgument values, +// a list of possible values, and a

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-30 Thread Erich Keane via cfe-commits
@@ -3553,6 +3553,56 @@ static unsigned getPackIndexForParam(Sema &S, llvm_unreachable("parameter index would not be produced from template"); } +// if `Specialization` is a `CXXConstructorDecl` or `CXXConversionDecl` +// we try to instantiate and update its explicit specifie

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-30 Thread Erich Keane via cfe-commits
@@ -3553,6 +3553,56 @@ static unsigned getPackIndexForParam(Sema &S, llvm_unreachable("parameter index would not be produced from template"); } +// if `Specialization` is a `CXXConstructorDecl` or `CXXConversionDecl` +// we try to instantiate and update its explicit specifie

[clang] [clang] Remove diagnostic that came with `[[clang::preferred_type]]` (PR #70632)

2023-10-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Why doesn't this result in any changes to tests? I would expect having to remove them, right? https://github.com/llvm/llvm-project/pull/70632 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [clang] Remove diagnostic that came with `[[clang::preferred_type]]` (PR #70632)

2023-10-30 Thread Erich Keane via cfe-commits
erichkeane wrote: > > Why doesn't this result in any changes to tests? I would expect having to > > remove them, right? > > There was a single test that was relying on sign mismatch, and then during > code review we made the diagnostic to ignore signness. So it ended up merged > without test

[clang] [clang] Remove diagnostic that came with `[[clang::preferred_type]]` (PR #70632)

2023-10-30 Thread Erich Keane via cfe-commits
@@ -5928,28 +5928,6 @@ static void handlePreferredTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { S.RequireCompleteType(ParmTSI->getTypeLoc().getBeginLoc(), QT, diag::err_incomplete_type); - if (QT->isEnumeralType()) { -auto IsCorrespondingTy

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-30 Thread Erich Keane via cfe-commits
@@ -3553,6 +3553,56 @@ static unsigned getPackIndexForParam(Sema &S, llvm_unreachable("parameter index would not be produced from template"); } +// if `Specialization` is a `CXXConstructorDecl` or `CXXConversionDecl` +// we try to instantiate and update its explicit specifie

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. This is fine to me, please give other reviewers another day to take a look before merging though. https://github.com/llvm/llvm-project/pull/70548 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [clang] Use new interpreter in EvaluateAsConstantExpr if requested (PR #70763)

2023-10-31 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I don't have a good idea how a release note could be phrased here, but if you could try one, it would be appreciated and I think it is worth doing. Side note: it would be really cool if at the end of the release cycle, you did a section in the release-n

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-31 Thread Erich Keane via cfe-commits
@@ -3553,6 +3553,49 @@ static unsigned getPackIndexForParam(Sema &S, llvm_unreachable("parameter index would not be produced from template"); } +// if `Specialization` is a `CXXConstructorDecl` or `CXXConversionDecl` +// we try to instantiate and update its explicit specifie

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-31 Thread Erich Keane via cfe-commits
@@ -3553,6 +3553,49 @@ static unsigned getPackIndexForParam(Sema &S, llvm_unreachable("parameter index would not be produced from template"); } +// if `Specialization` is a `CXXConstructorDecl` or `CXXConversionDecl` +// we try to instantiate and update its explicit specifie

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-31 Thread Erich Keane via cfe-commits
@@ -3553,6 +3553,49 @@ static unsigned getPackIndexForParam(Sema &S, llvm_unreachable("parameter index would not be produced from template"); } +// if `Specialization` is a `CXXConstructorDecl` or `CXXConversionDecl` +// we try to instantiate and update its explicit specifie

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-31 Thread Erich Keane via cfe-commits
@@ -3553,6 +3553,49 @@ static unsigned getPackIndexForParam(Sema &S, llvm_unreachable("parameter index would not be produced from template"); } +// if `Specialization` is a `CXXConstructorDecl` or `CXXConversionDecl` +// we try to instantiate and update its explicit specifie

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-31 Thread Erich Keane via cfe-commits
@@ -3580,16 +3580,12 @@ static Sema::TemplateDeductionResult instantiateExplicitSpecifierDeferred( if (!Expr->isValueDependent()) { return Sema::TDK_Success; } - // The `InstantiatingTemplate` here is used to restore `ActiveInstType` to - // `DeducedTemplateArgumentS

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-31 Thread Erich Keane via cfe-commits
@@ -3553,6 +3553,47 @@ static unsigned getPackIndexForParam(Sema &S, llvm_unreachable("parameter index would not be produced from template"); } +// if `Specialization` is a `CXXConstructorDecl` or `CXXConversionDecl`, +// we'll try to instantiate and update its explicit spec

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-31 Thread Erich Keane via cfe-commits
@@ -3553,6 +3553,47 @@ static unsigned getPackIndexForParam(Sema &S, llvm_unreachable("parameter index would not be produced from template"); } +// if `Specialization` is a `CXXConstructorDecl` or `CXXConversionDecl`, +// we'll try to instantiate and update its explicit spec

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-31 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/70548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-31 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Did a better run-through again, so these are all thats left for me. Thanks for the patience! https://github.com/llvm/llvm-project/pull/70548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-31 Thread Erich Keane via cfe-commits
@@ -3553,6 +3553,47 @@ static unsigned getPackIndexForParam(Sema &S, llvm_unreachable("parameter index would not be produced from template"); } +// if `Specialization` is a `CXXConstructorDecl` or `CXXConversionDecl`, +// we'll try to instantiate and update its explicit spec

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-31 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/70548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Erich Keane via cfe-commits
@@ -19,11 +19,12 @@ #include "clang/AST/Type.h" #include "clang/Basic/AttrKinds.h" #include "clang/Basic/AttributeCommonInfo.h" -#include "clang/Basic/LangOptions.h" #include "clang/Basic/LLVM.h" +#include "clang/Basic/LangOptions.h" #include "clang/Basic/OpenMPKinds.h" #inc

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Erich Keane via cfe-commits
@@ -1010,14 +1022,17 @@ namespace { // trivial because some enumeration values have multiple named // enumerators, such as type_visibility(internal) and // type_visibility(hidden) both mapping to TypeVisibilityAttr::Hidden. - OS << "const char *" << getAt

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Erich Keane via cfe-commits
@@ -898,23 +898,29 @@ namespace { } class EnumArgument : public Argument { -std::string type; +std::string fullType; +StringRef shortType; std::vector values, enums, uniques; +bool isExternal; public: EnumArgument(const Record &Arg, StringRef

[clang-tools-extra] [clang] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Erich Keane via cfe-commits
@@ -279,12 +279,13 @@ class DefaultIntArgument : IntArgument { // This argument is more complex, it includes the enumerator type name, // a list of strings to accept, and a list of enumerators to map them to. -class EnumArgument values, +class EnumArgument values, ---

[clang] [clang] Ignore GCC 11 `[[malloc(x)]]` attribute (PR #68059)

2023-10-31 Thread Erich Keane via cfe-commits
erichkeane wrote: > > I see that the fix is almost ready, good. But generally it would also have > > helped if the `__has_c_attribute` feature test for this type of borrowed > > attributes would provide means to distinguish different versions. Here gcc > > as well as clang only have the value

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Erich Keane via cfe-commits
@@ -279,12 +279,13 @@ class DefaultIntArgument : IntArgument { // This argument is more complex, it includes the enumerator type name, // a list of strings to accept, and a list of enumerators to map them to. -class EnumArgument values, +class EnumArgument values, ---

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Its a bit of a shame that the `VariadicEnumArgument` isn't being included here/updated here, I typically appreciate the variadic versions being kept in sync. But since we don't have a use for it at the moment, I think a 'fixme' (or a future patch!) wou

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Erich Keane via cfe-commits
@@ -1010,14 +1022,17 @@ namespace { // trivial because some enumeration values have multiple named // enumerators, such as type_visibility(internal) and // type_visibility(hidden) both mapping to TypeVisibilityAttr::Hidden. - OS << "const char *" << getAt

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/70835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Erich Keane via cfe-commits
@@ -930,77 +936,83 @@ namespace { OS << getLowerName() << "(" << getUpperName() << ")"; } void writeCtorDefaultInitializers(raw_ostream &OS) const override { - OS << getLowerName() << "(" << type << "(0))"; + OS << getLowerName() << "(" << fullType << "(

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Erich Keane via cfe-commits
@@ -1015,7 +1018,8 @@ def ExternalSourceSymbol : InheritableAttr { def Blocks : InheritableAttr { let Spellings = [Clang<"blocks">]; - let Args = [EnumArgument<"Type", "BlockType", ["byref"], ["ByRef"]>]; + let Args = [EnumArgument<"Type", "BlockType", eri

[clang] [clang] Ignore GCC 11 `[[malloc(x)]]` attribute (PR #68059)

2023-10-31 Thread Erich Keane via cfe-commits
erichkeane wrote: > Hi, yes the really bad choice here is by gcc to have the same name for > basically two different attributes. For the value, they also missed the > opportunity to do something sensible when moving to C++ attributes, what a > pitty. For a concrete guideline in that jungle, wh

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Erich Keane via cfe-commits
@@ -898,23 +898,29 @@ namespace { } class EnumArgument : public Argument { -std::string type; +std::string fullType; +StringRef shortType; std::vector values, enums, uniques; +bool isExternal; public: EnumArgument(const Record &Arg, StringRef

[lld] [clang] [lldb] [llvm] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-11-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane closed https://github.com/llvm/llvm-project/pull/70548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lld] [clang] [lldb] [llvm] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-11-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/70548 >From 11ceaed39b3f0c60c5a44c3b3a2b5856e7ee9a8d Mon Sep 17 00:00:00 2001 From: letrec Date: Sat, 28 Oct 2023 18:05:36 +0800 Subject: [PATCH 1/7] Defer the instantiation of explicit-specifier after constraint c

[clang] [clang] Improve `_Alignas` on a `struct` declaration diagnostic (PR #65638)

2023-11-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/65638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Improve `_Alignas` on a `struct` declaration diagnostic (PR #65638)

2023-11-01 Thread Erich Keane via cfe-commits
@@ -192,6 +192,13 @@ class AttributeCommonInfo { bool isC23Attribute() const { return SyntaxUsed == AS_C23; } + bool isAlignas() const { +// In the current state of code, IsAlignas is only configured to return erichkeane wrote: This comment is immedia

[clang] [clang] Improve `_Alignas` on a `struct` declaration diagnostic (PR #65638)

2023-11-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: The comments Aaron made should be fixed, plus 1 more from me, else LGTM. https://github.com/llvm/llvm-project/pull/65638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang-tools-extra] [clang] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-11-01 Thread Erich Keane via cfe-commits
@@ -277,23 +277,28 @@ class DefaultIntArgument : IntArgument { int Default = default; } -// This argument is more complex, it includes the enumerator type name, -// a list of strings to accept, and a list of enumerators to map them to. +// This argument is more complex, it

[clang-tools-extra] [clang] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-11-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/70835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-11-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Just 1 more comment (the name of `External` everywhere), else LGTM. https://github.com/llvm/llvm-project/pull/70835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

<    1   2   3   4   5   6   7   8   9   10   >