[clang] [OpenACC] Implement Default clause for Compute Constructs (PR #88135)

2024-04-10 Thread Erich Keane via cfe-commits
@@ -15,3 +15,22 @@ #include "clang/AST/ASTContext.h" using namespace clang; + +OpenACCDefaultClause *OpenACCDefaultClause::Create(const ASTContext , + OpenACCDefaultClauseKind K, +

[clang] [OpenACC] Implement Default clause for Compute Constructs (PR #88135)

2024-04-09 Thread Erich Keane via cfe-commits
@@ -419,6 +419,29 @@ enum class OpenACCDefaultClauseKind { Invalid, }; +template +inline StreamTy (StreamTy , erichkeane wrote: Note I noticed that we got this wrong in the other two places in this file ( where I copied this from :D), so I've fixed them

[clang] [OpenACC] Implement Default clause for Compute Constructs (PR #88135)

2024-04-09 Thread Erich Keane via 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/2] g This is a combination of 3 commits. [OpenACC] Implement

[clang] [Clang][AST] Track whether template template parameters used the 'typename' keyword (PR #88139)

2024-04-09 Thread Erich Keane via cfe-commits
erichkeane wrote: > @erichkeane I added a release note. Regarding the addition of an enumeration > type, how about: > > ```c++ > enum class TypeParmKeyword { > Class, > Typename > }; > ``` > > (I used `TypeParm` because a template template parameter is a > _type-parameter_ in the C++

[clang] [Clang][AST] Track whether template template parameters used the 'typename' keyword (PR #88139)

2024-04-09 Thread Erich Keane via cfe-commits
@@ -1634,6 +1640,14 @@ class TemplateTemplateParmDecl final using TemplateParmPosition::setPosition; using TemplateParmPosition::getIndex; + /// Whether this template template parameter was declared with + /// the 'typename' keyword. + bool wasDeclaredWithTypename()

[clang] [Clang][AST] Track whether template template parameters used the 'typename' keyword (PR #88139)

2024-04-09 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Could also use a release note as this is noticable now. https://github.com/llvm/llvm-project/pull/88139 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][AST] Track whether template template parameters used the 'typename' keyword (PR #88139)

2024-04-09 Thread Erich Keane via cfe-commits
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

[clang] [Clang][AST] Track whether template template parameters used the 'typename' keyword (PR #88139)

2024-04-09 Thread Erich Keane via 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'

[clang] [OpenACC] Implement Default clause for Compute Constructs (PR #88135)

2024-04-09 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/88135 As a followup to my previous commits, this is an implementation of a single clause, in this case the 'default' clause. This implements all semantic analysis for it on compute clauses, and continues to leave

[clang] [clang] Introduce `SemaSYCL` (PR #88086)

2024-04-09 Thread Erich Keane via cfe-commits
@@ -0,0 +1,66 @@ +//===- SemaOpenACC.h 000- Semantic Analysis for SYCL constructs ---===// erichkeane wrote: ```suggestion //===- SemaSYCL.h 000- Semantic Analysis for SYCL constructs ---===// ``` https://github.com/llvm/llvm-project/pull/88086

[clang] [clang] Introduce `SemaSYCL` (PR #88086)

2024-04-09 Thread Erich Keane via cfe-commits
@@ -0,0 +1,66 @@ +//===- SemaOpenACC.h 000- Semantic Analysis for SYCL constructs ---===// +// +// 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:

[clang] [clang] Introduce `SemaSYCL` (PR #88086)

2024-04-09 Thread Erich Keane via cfe-commits
@@ -0,0 +1,66 @@ +//===- SemaOpenACC.h 000- Semantic Analysis for SYCL constructs ---===// +// +// 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:

[clang] [clang][c++20] Fix code coverage mapping crash with generalized NTTPs (PR #85837)

2024-04-09 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. This seems fine to me, but please give @efriedma-quic a few days to do a final pass through. https://github.com/llvm/llvm-project/pull/85837 ___ cfe-commits mailing list

[clang] Update __cpp_concepts macro (PR #87998)

2024-04-09 Thread Erich Keane via cfe-commits
https://github.com/erichkeane closed https://github.com/llvm/llvm-project/pull/87998 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base clas

2024-04-08 Thread Erich Keane via cfe-commits
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

[clang] [Clang][Sema] Fix crash when 'this' is used in a dependent class scope function template specialization that instantiates to a static member function (PR #87541)

2024-04-08 Thread Erich Keane via cfe-commits
erichkeane wrote: I'm OK with this, but would like @cor3ntin to take another look since he engaged earlier. https://github.com/llvm/llvm-project/pull/87541 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Update __cpp_concepts macro (PR #87998)

2024-04-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/87998 >From 477ca3032a26467dfb67ef5d2f9b54bb2f958a33 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Mon, 8 Apr 2024 07:28:50 -0700 Subject: [PATCH 1/2] Update __cpp_concepts macro After discussion with a few

[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

2024-04-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. This seems right to me, thanks! https://github.com/llvm/llvm-project/pull/88042 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Add test for CWG593 (PR #87752)

2024-04-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. I hte this behavior, but it is to standard. https://github.com/llvm/llvm-project/pull/87752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Add CodeGen tests for CWG 6xx issues (PR #87876)

2024-04-08 Thread Erich Keane via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -std=c++98 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK +// RUN: %clang_cc1 -std=c++11 %s -triple x86_64-linux-gnu -emit-llvm -o -

[clang] [clang] Add CodeGen tests for CWG 6xx issues (PR #87876)

2024-04-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/87876 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add CodeGen tests for CWG 6xx issues (PR #87876)

2024-04-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/87876 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Rework the printing of attributes (PR #87281)

2024-04-08 Thread Erich Keane via cfe-commits
erichkeane wrote: > > > @erichkeane, thank you. What's the process of including this in the next > > > release? > > > > > > After CI is complete, you can click "Squash and Merge" below (if you > > cannot, let us know and someone can do it for you), and it'll be included > > in the 19.1

[clang] Rework the printing of attributes (PR #87281)

2024-04-08 Thread Erich Keane via cfe-commits
erichkeane wrote: > @erichkeane, thank you. What's the process of including this in the next > release? After CI is complete, you can click "Squash and Merge" below (if you cannot, let us know and someone can do it for you), and it'll be included in the 19.1 release this summer.

[clang] Rework the printing of attributes (PR #87281)

2024-04-08 Thread Erich Keane via cfe-commits
@@ -250,87 +238,47 @@ raw_ostream& DeclPrinter::Indent(unsigned Indentation) { return Out; } -// For CLANG_ATTR_LIST_CanPrintOnLeft macro. -#include "clang/Basic/AttrLeftSideCanPrintList.inc" +static DeclPrinter::AttrPosAsWritten getPosAsWritten(const Attr *A, +

[clang] Rework the printing of attributes (PR #87281)

2024-04-08 Thread Erich Keane via cfe-commits
@@ -250,87 +238,50 @@ raw_ostream& DeclPrinter::Indent(unsigned Indentation) { return Out; } -// For CLANG_ATTR_LIST_CanPrintOnLeft macro. -#include "clang/Basic/AttrLeftSideCanPrintList.inc" +static DeclPrinter::AttrPosAsWritten getPosAsWritten(const Attr *A, +

[clang] Rework the printing of attributes (PR #87281)

2024-04-08 Thread Erich Keane via cfe-commits
@@ -250,87 +238,50 @@ raw_ostream& DeclPrinter::Indent(unsigned Indentation) { return Out; } -// For CLANG_ATTR_LIST_CanPrintOnLeft macro. -#include "clang/Basic/AttrLeftSideCanPrintList.inc" +static DeclPrinter::AttrPosAsWritten getPosAsWritten(const Attr *A, +

[clang] Rework the printing of attributes (PR #87281)

2024-04-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/87281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Rework the printing of attributes (PR #87281)

2024-04-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/87281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane closed https://github.com/llvm/llvm-project/pull/87821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/87821 >From ca5f957bb002d79997e630cdf1aaad5703ea2ba4 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Fri, 5 Apr 2024 10:53:47 -0700 Subject: [PATCH 1/6] [OpenACC] Implement Sema work for OpenACC Clauses Now that

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-08 Thread Erich Keane via cfe-commits
erichkeane wrote: Build failure is completely unrelated, but I think this does everything you've asked for @alexey-bataev . Let me know what you think! https://github.com/llvm/llvm-project/pull/87821 ___ cfe-commits mailing list

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-04-08 Thread Erich Keane via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= Message-ID: In-Reply-To: @@ -0,0 +1,99 @@ +// RUN: %clang_cc1 -verify -std=c++2a -fsyntax-only %s +// expected-no-diagnostics + +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/87821 >From ca5f957bb002d79997e630cdf1aaad5703ea2ba4 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Fri, 5 Apr 2024 10:53:47 -0700 Subject: [PATCH 1/5] [OpenACC] Implement Sema work for OpenACC Clauses Now that

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-08 Thread Erich Keane via cfe-commits
@@ -82,22 +119,22 @@ bool SemaOpenACC::ActOnStartStmtDirective(OpenACCDirectiveKind K, return diagnoseConstructAppertainment(*this, K, StartLoc, /*IsStmt=*/true); } -StmtResult SemaOpenACC::ActOnEndStmtDirective(OpenACCDirectiveKind K, -

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-08 Thread Erich Keane via cfe-commits
@@ -11077,16 +11077,65 @@ OMPClause *TreeTransform::TransformOMPXBareClause(OMPXBareClause *C) { //===--===// // OpenACC transformation

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-08 Thread Erich Keane via cfe-commits
@@ -37,6 +37,32 @@ bool diagnoseConstructAppertainment(SemaOpenACC , OpenACCDirectiveKind K, } return false; } + +bool doesClauseApplyToDirective(OpenACCDirectiveKind DirectiveKind, +OpenACCClauseKind ClauseKind) { + switch (ClauseKind) {

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-08 Thread Erich Keane via cfe-commits
@@ -82,22 +119,22 @@ bool SemaOpenACC::ActOnStartStmtDirective(OpenACCDirectiveKind K, return diagnoseConstructAppertainment(*this, K, StartLoc, /*IsStmt=*/true); } -StmtResult SemaOpenACC::ActOnEndStmtDirective(OpenACCDirectiveKind K, -

[clang] Update __cpp_concepts macro (PR #87998)

2024-04-08 Thread Erich Keane via cfe-commits
@@ -544,16 +544,8 @@ C++20 implementation status https://wg21.link/p0848r3;>P0848R3 - - -Clang 16 (Partial) -Because of other concepts implementation deficits, the __cpp_concepts macro is not yet set to 202002L.

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-08 Thread Erich Keane via cfe-commits
@@ -11077,16 +11077,65 @@ OMPClause *TreeTransform::TransformOMPXBareClause(OMPXBareClause *C) { //===--===// // OpenACC transformation

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-08 Thread Erich Keane via cfe-commits
@@ -37,6 +37,32 @@ bool diagnoseConstructAppertainment(SemaOpenACC , OpenACCDirectiveKind K, } return false; } + +bool doesClauseApplyToDirective(OpenACCDirectiveKind DirectiveKind, +OpenACCClauseKind ClauseKind) { + switch (ClauseKind) {

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/87821 >From ca5f957bb002d79997e630cdf1aaad5703ea2ba4 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Fri, 5 Apr 2024 10:53:47 -0700 Subject: [PATCH 1/3] [OpenACC] Implement Sema work for OpenACC Clauses Now that

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-08 Thread Erich Keane via cfe-commits
@@ -37,6 +37,32 @@ bool diagnoseConstructAppertainment(SemaOpenACC , OpenACCDirectiveKind K, } return false; } + +bool doesClauseApplyToDirective(OpenACCDirectiveKind DirectiveKind, +OpenACCClauseKind ClauseKind) { + switch (ClauseKind) {

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-08 Thread Erich Keane via cfe-commits
@@ -82,22 +119,22 @@ bool SemaOpenACC::ActOnStartStmtDirective(OpenACCDirectiveKind K, return diagnoseConstructAppertainment(*this, K, StartLoc, /*IsStmt=*/true); } -StmtResult SemaOpenACC::ActOnEndStmtDirective(OpenACCDirectiveKind K, -

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-08 Thread Erich Keane via cfe-commits
@@ -11077,16 +11077,65 @@ OMPClause *TreeTransform::TransformOMPXBareClause(OMPXBareClause *C) { //===--===// // OpenACC transformation

[clang] Update __cpp_concepts macro (PR #87998)

2024-04-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/87998 After discussion with a few others, and seeing the state of our concepts support, I believe it is worth trying to see if we can update this for Clang19. The forcing function is that libstdc++'s header is

[clang] [clang][Sema] Avoid guessing unexpanded packs' size in getFullyPackExpandedSize (PR #87768)

2024-04-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/87768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add CodeGen tests for CWG 6xx issues (PR #87876)

2024-04-08 Thread Erich Keane via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -std=c++98 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK +// RUN: %clang_cc1 -std=c++11 %s -triple x86_64-linux-gnu -emit-llvm -o -

[clang] [clang] Add CodeGen tests for CWG 6xx issues (PR #87876)

2024-04-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/87876 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add CodeGen tests for CWG 6xx issues (PR #87876)

2024-04-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/87876 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/87821 >From ca5f957bb002d79997e630cdf1aaad5703ea2ba4 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Fri, 5 Apr 2024 10:53:47 -0700 Subject: [PATCH 1/2] [OpenACC] Implement Sema work for OpenACC Clauses Now that

[clang] [Clang] Reduce the size of Decl and classes derived from it (PR #87361)

2024-04-08 Thread Erich Keane via cfe-commits
@@ -268,17 +268,34 @@ class alignas(8) Decl { /// } /// void A::f(); // SemanticDC == namespace 'A' ///// LexicalDC == global namespace - llvm::PointerUnion DeclCtx; + llvm::PointerIntPair< erichkeane wrote: I don't think it ends

[clang] [Clang] Reduce the size of Decl and classes derived from it (PR #87361)

2024-04-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/87361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Reduce the size of Decl and classes derived from it (PR #87361)

2024-04-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/87361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base clas

2024-04-08 Thread Erich Keane via cfe-commits
erichkeane wrote: > @erichkeane PR updated. > > When we encounter a class member access expression with a > nested-name-specifier that is invalid, should we simply ignore it and instead > use the type of the object expression as the lookup context? This is the > current behavior, but it

[clang] Match against all plugins when parsing microsoft attributes (PR #86426)

2024-04-08 Thread Erich Keane via cfe-commits
@@ -345,6 +345,9 @@ Bug Fixes to Compiler Builtins Bug Fixes to Attribute Support ^^ +- Clang now correctly matches plugin attributes with microsoft ``[attribute]`` syntax. erichkeane wrote: > Microsoft attributes use single

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/87821 >From ca5f957bb002d79997e630cdf1aaad5703ea2ba4 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Fri, 5 Apr 2024 10:53:47 -0700 Subject: [PATCH 1/2] [OpenACC] Implement Sema work for OpenACC Clauses Now that

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -3594,11 +3595,26 @@ class Parser : public CodeCompletionHandler { OpenACCDirectiveKind DirKind; SourceLocation StartLoc; SourceLocation EndLoc; -// TODO OpenACC: Add Clause list here once we have a type for that. +SmallVector Clauses; // TODO

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/87821 Now that we have AST nodes for OpenACC Clauses, this patch adds their creation to Sema and makes the Parser call all the required functions. This also redoes TreeTransform to work with the clauses/make sure

[clang] Match against all plugins when parsing microsoft attributes (PR #86426)

2024-04-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: This has enough to do with parsing that i think Aaron should take a look too. Also, this needs a parser test, not just the plugin test. The plugins/examples aren't built often enough, so this needs to be a full lit test.

[clang] Match against all plugins when parsing microsoft attributes (PR #86426)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -345,6 +345,9 @@ Bug Fixes to Compiler Builtins Bug Fixes to Attribute Support ^^ +- Clang now correctly matches plugin attributes with microsoft ``[attribute]`` syntax. erichkeane wrote: Should this be double-brackets?

[clang] Match against all plugins when parsing microsoft attributes (PR #86426)

2024-04-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/86426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Erich Keane via cfe-commits
erichkeane wrote: > I really appreciate the suggestions. `alias-unused.cpp` and > `alias-unused-win.cpp` contain test improvement that should be pre-commited > once they look good enough. Then this PR can be changed to show the > difference. > > On a separate note, I wanted to clarify that

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane closed https://github.com/llvm/llvm-project/pull/87675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (PR #84050)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -1055,9 +1045,19 @@ Sema::BuildMemberReferenceExpr(Expr *BaseExpr, QualType BaseExprType, } } -Diag(R.getNameLoc(), diag::err_no_member) - << MemberName << DC - << (BaseExpr ? BaseExpr->getSourceRange() : SourceRange()); +if (SS.isNotEmpty() &&

[clang] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (PR #84050)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -126,12 +126,15 @@ struct BuiltinTypeDeclBuilder { static DeclRefExpr *lookupBuiltinFunction(ASTContext , Sema , StringRef Name) { -CXXScopeSpec SS; IdentifierInfo = AST.Idents.get(Name, tok::TokenKind::identifier);

[clang] [clang] CTAD: build aggregate deduction guides for alias templates. (PR #85904)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -2792,6 +2811,24 @@ void DeclareImplicitDeductionGuidesForTypeAlias( } else { assert(false && "unhandled RHS type of the alias"); } + return {Template, AliasRhsTemplateArgs}; +} + +// Build deduction guides for a type alias template. +void

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/87675 >From 2e05458175478002a14c9316a7fde66f7301dd94 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Thu, 4 Apr 2024 10:59:34 -0700 Subject: [PATCH 1/2] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure

[clang] [Sema] Remove the duplicated `DeduceTemplateArguments` for partial specialization, NFC (PR #87782)

2024-04-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/87782 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -101,24 +113,45 @@ class OpenACCAssociatedStmtConstruct : public OpenACCConstructStmt { /// those three, as they are semantically identical, and have only minor /// differences in the permitted list of clauses, which can be differentiated by /// the 'Kind'. -class

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -101,24 +113,45 @@ class OpenACCAssociatedStmtConstruct : public OpenACCConstructStmt { /// those three, as they are semantically identical, and have only minor /// differences in the permitted list of clauses, which can be differentiated by /// the 'Kind'. -class

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -94,9 +94,10 @@ StmtResult SemaOpenACC::ActOnEndStmtDirective(OpenACCDirectiveKind K, case OpenACCDirectiveKind::Parallel: case OpenACCDirectiveKind::Serial: case OpenACCDirectiveKind::Kernels: +// TODO OpenACC: Add clauses to the construct here. return

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -101,24 +113,45 @@ class OpenACCAssociatedStmtConstruct : public OpenACCConstructStmt { /// those three, as they are semantically identical, and have only minor /// differences in the permitted list of clauses, which can be differentiated by /// the 'Kind'. -class

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -94,9 +94,10 @@ StmtResult SemaOpenACC::ActOnEndStmtDirective(OpenACCDirectiveKind K, case OpenACCDirectiveKind::Parallel: case OpenACCDirectiveKind::Serial: case OpenACCDirectiveKind::Kernels: +// TODO OpenACC: Add clauses to the construct here. return

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -30,13 +31,23 @@ class OpenACCConstructStmt : public Stmt { /// the directive. SourceRange Range; - // TODO OPENACC: Clauses should probably be collected in this class. + /// The list of clauses. This is stored here as an ArrayRef, as this is the + /// most

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-04 Thread Erich Keane via cfe-commits
@@ -30,13 +31,23 @@ class OpenACCConstructStmt : public Stmt { /// the directive. SourceRange Range; - // TODO OPENACC: Clauses should probably be collected in this class. + /// The list of clauses. This is stored here as an ArrayRef, as this is the + /// most

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-04 Thread Erich Keane via cfe-commits
@@ -30,13 +31,23 @@ class OpenACCConstructStmt : public Stmt { /// the directive. SourceRange Range; - // TODO OPENACC: Clauses should probably be collected in this class. + /// The list of clauses. This is stored here as an ArrayRef, as this is the

[clang] [Clang][AST][NFC] Move template argument dependence computations for MemberExpr to computeDependence (PR #86682)

2024-04-02 Thread Erich Keane via cfe-commits
erichkeane wrote: Ah, i see... yeah, i think there is value to submitting them separately, feel free to do so. https://github.com/llvm/llvm-project/pull/86682 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-02 Thread Erich Keane via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle the

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-02 Thread Erich Keane via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle the

[clang] Rework the printing of attributes (PR #87281)

2024-04-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Since this adds so much logic, we definitely need tests that handle when the attribute is defined in a macro, when there are multiples on each side, when there are multiples in macros/etc. https://github.com/llvm/llvm-project/pull/87281

[clang] Rework the printing of attributes (PR #87281)

2024-04-02 Thread Erich Keane via cfe-commits
@@ -250,87 +241,43 @@ raw_ostream& DeclPrinter::Indent(unsigned Indentation) { return Out; } -// For CLANG_ATTR_LIST_CanPrintOnLeft macro. -#include "clang/Basic/AttrLeftSideCanPrintList.inc" - -// For CLANG_ATTR_LIST_PrintOnLeft macro. -#include

[clang] Rework the printing of attributes (PR #87281)

2024-04-02 Thread Erich Keane via cfe-commits
@@ -250,87 +241,43 @@ raw_ostream& DeclPrinter::Indent(unsigned Indentation) { return Out; } -// For CLANG_ATTR_LIST_CanPrintOnLeft macro. -#include "clang/Basic/AttrLeftSideCanPrintList.inc" - -// For CLANG_ATTR_LIST_PrintOnLeft macro. -#include

[clang] Rework the printing of attributes (PR #87281)

2024-04-02 Thread Erich Keane via cfe-commits
@@ -129,11 +118,13 @@ namespace { const TemplateParameterList *Params); void printTemplateArguments(llvm::ArrayRef Args, const TemplateParameterList *Params); - -inline void prettyPrintAttributes(Decl *D)

[clang] Rework the printing of attributes (PR #87281)

2024-04-02 Thread Erich Keane via cfe-commits
@@ -250,87 +241,43 @@ raw_ostream& DeclPrinter::Indent(unsigned Indentation) { return Out; } -// For CLANG_ATTR_LIST_CanPrintOnLeft macro. -#include "clang/Basic/AttrLeftSideCanPrintList.inc" - -// For CLANG_ATTR_LIST_PrintOnLeft macro. -#include

[clang] Rework the printing of attributes (PR #87281)

2024-04-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/87281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AST][NFC] Move template argument dependence computations for MemberExpr to computeDependence (PR #86682)

2024-04-02 Thread Erich Keane via cfe-commits
erichkeane wrote: > @erichkeane Requested changes applied... should I wait for other reviews on > the other PR (#86678), or do you think I should go ahead and merge #86678 and > then this one? #86678 is entirely 'contained' in this review, right? Seems like it is 'reviewed', so you can

[clang] [BitInt] Expose a _BitInt literal suffix in C++ (PR #86586)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -974,6 +974,7 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, bool isFixedPointConstant = isFixedPointLiteral(); bool isFPConstant = isFloatingLiteral(); bool HasSize = false; + bool PossibleBitInt = false; erichkeane wrote:

[clang] [BitInt] Expose a _BitInt literal suffix in C++ (PR #86586)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -1117,6 +1118,26 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, if (isImaginary) break; // Cannot be repeated. isImaginary = true; continue; // Success. +case '_': + if (isFPConstant) +break; // Invalid for floats

[clang] [BitInt] Expose a _BitInt literal suffix in C++ (PR #86586)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -80,7 +80,8 @@ class NumericLiteralParser { bool isFloat128 : 1; // 1.0q bool isFract : 1; // 1.0hr/r/lr/uhr/ur/ulr bool isAccum : 1; // 1.0hk/k/lk/uhk/uk/ulk - bool isBitInt : 1;// 1wb, 1uwb (C23) + bool isBitInt : 1; // 1wb, 1uwb (C23)

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle the

[clang] [Clang] [Sema] Fix dependence of DREs in lambdas with an explicit object parameter (PR #84473)

2024-04-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. This seems sensible to me. Please give @cor3ntin a few days to review, after which, feel free to commit. https://github.com/llvm/llvm-project/pull/84473 ___ cfe-commits mailing list

[clang] [libclc] [llvm] [openmp] [Clang] `__attribute__((assume))` refactor (PR #84934)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -1,58 +0,0 @@ -// RUN: %clang_cc1 -emit-llvm -triple i386-linux-gnu %s -o - | FileCheck %s erichkeane wrote: would be great if we could just rename/update this test rather than deleting it? https://github.com/llvm/llvm-project/pull/84934

[clang] [libclc] [llvm] [openmp] [Clang] `__attribute__((assume))` refactor (PR #84934)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -1,14 +0,0 @@ -// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -verify %s erichkeane wrote: Same here, can we just rename this to attr-omp-assume.c and change the name in the test? https://github.com/llvm/llvm-project/pull/84934

[clang] [libclc] [llvm] [openmp] [Clang] `__attribute__((assume))` refactor (PR #84934)

2024-04-01 Thread Erich Keane via cfe-commits
erichkeane wrote: OpenCL is "C" based, not C++. However, C23 DID add namespacing to attributes, so if OpenCL can use C23, we should be able to make the spelling `[[omp::assume]]`. That said, I DO see value for an `__attribute__` spelling, so I think `omp_assume` is probably an unfortunate

[clang] [Clang] [Sema] Improve support for `__restrict`-qualified member functions (PR #83855)

2024-04-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I did a review, but didn't stop to decide whether we SHOULD :) Aaron should be around 'sometime' to make that judgement, my restrict knowledge/reasoning is slim/none. https://github.com/llvm/llvm-project/pull/83855

[clang] [Clang] [Sema] Improve support for `__restrict`-qualified member functions (PR #83855)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -5052,6 +5052,21 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, Function->setInnerLocStart(PatternDecl->getInnerLocStart()); Function->setRangeEnd(PatternDecl->getEndLoc()); + // Propagate '__restrict' properly. + if (auto MD =

[clang] [Clang] [Sema] Improve support for `__restrict`-qualified member functions (PR #83855)

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

[clang] [Clang][Sema] set declaration invalid earlier to prevent crash in calculating record layout (PR #87173)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -3899,6 +3899,9 @@ static QualType GetDeclSpecTypeForDeclarator(TypeProcessingState , SemaRef.Diag(OwnedTagDecl->getLocation(), DiagID) << SemaRef.Context.getTypeDeclType(OwnedTagDecl); D.setInvalidType(true); +

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -80,6 +80,81 @@ struct Response { return R; } }; + +// Retrieve the primary template for a lambda call operator. It's +// unfortunate that we only have the mappings of call operators rather +// than lambda classes. +const FunctionDecl *

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