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

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

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-07 Thread Erich Keane via cfe-commits
erichkeane wrote: > > I see the 2nds commit doesn't add any tests! Please make it do so > > I've tried and I'm not quite sure how to do it. The issue is we need to test > AST printing of «implicitly declared» functions, such as builtins and > functions instrumented by lldb, such as `log` for

[clang] [clang] always use resolved arguments for default argument deduction (PR #94756)

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

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-07 Thread Erich Keane via cfe-commits
erichkeane wrote: I see the 2nds commit doesn't add any tests! Please make it do so, else LGTM (plus might want to do a 'merge' commit to reset the CI to a more stable state). https://github.com/llvm/llvm-project/pull/93913 ___ cfe-commits mailing

[clang] [libcxx] [Clang] Implement resolution for CWG1835 (PR #92957)

2024-06-06 Thread Erich Keane via cfe-commits
@@ -1790,24 +1782,25 @@ ExprResult Sema::ActOnMemberAccessExpr(Scope *S, Expr *Base, const TemplateArgumentListInfo *TemplateArgs; DecomposeUnqualifiedId(Id, TemplateArgsBuffer, NameInfo, TemplateArgs); - - bool IsArrow = (OpKind == tok::arrow);

[clang] [libcxx] [Clang] Implement resolution for CWG1835 (PR #92957)

2024-06-06 Thread Erich Keane via cfe-commits
@@ -390,29 +390,37 @@ bool Sema::isAcceptableNestedNameSpecifier(const NamedDecl *SD, /// (e.g., Base::), perform name lookup for that identifier as a /// nested-name-specifier within the given scope, and return the result of that /// name lookup. -NamedDecl

[clang] [libcxx] [Clang] Implement resolution for CWG1835 (PR #92957)

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

[clang] [libcxx] [Clang] Implement resolution for CWG1835 (PR #92957)

2024-06-06 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Sorry this took so long! Apparently I'd left some comments without finishing my review. Did another look through, everything looks good, just some minor nits. Apply/merge at your convenience.

[clang] [libcxx] [Clang] Implement resolution for CWG1835 (PR #92957)

2024-06-06 Thread Erich Keane via cfe-commits
@@ -1442,19 +1442,27 @@ SourceLocation CXXUnresolvedConstructExpr::getBeginLoc() const { CXXDependentScopeMemberExpr::CXXDependentScopeMemberExpr( const ASTContext , Expr *Base, QualType BaseType, bool IsArrow, SourceLocation OperatorLoc, NestedNameSpecifierLoc

[clang] [clang][Sema] Add missing scope flags to Scope::dumpImpl (PR #94529)

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

[clang] [OpenACC] Loop construct basic Sema and AST work (PR #93742)

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

[clang] Disable constexpr function body checking in more situations (PR #94347)

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

[clang] [clang] Add tests for Core issues about friend templates (PR #94288)

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

[clang] Disable constexpr function body checking in more situations (PR #94347)

2024-06-04 Thread Erich Keane via cfe-commits
@@ -2469,11 +2469,20 @@ static bool CheckConstexprFunctionBody(Sema , const FunctionDecl *Dcl, // base class sub-objects shall be a constexpr constructor. // // Note that this rule is distinct from the "requirements for a constexpr - // function", so is not checked

[clang] Disable constexpr function body checking in more situations (PR #94347)

2024-06-04 Thread Erich Keane via cfe-commits
@@ -505,6 +505,9 @@ COMPATIBLE_LANGOPT(IncrementalExtensions, 1, 0, " True if we want to process sta BENIGN_LANGOPT(CheckNew, 1, 0, "Do not assume C++ operator new may not return NULL") +BENIGN_LANGOPT(CheckConstexprFunctionBodies, 1, 1, + "True if we want to

[clang] Disable constexpr function body checking in more situations (PR #94347)

2024-06-04 Thread Erich Keane via cfe-commits
@@ -961,6 +961,10 @@ def Wdeprecated : Flag<["-"], "Wdeprecated">, Group, HelpText<"Enable warnings for deprecated constructs and define __DEPRECATED">; def Wno_deprecated : Flag<["-"], "Wno-deprecated">, Group, Visibility<[ClangOption, CC1Option]>; +def

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-06-04 Thread Erich Keane via cfe-commits
@@ -5813,6 +5813,23 @@ static TypoCorrection TryTypoCorrectionForCall(Sema , Expr *Fn, return TypoCorrection(); } +static bool isParenthetizedAndQualifiedAddressOfExpr(Expr *Fn) { + if (!isa(Fn)) +return false; + + Fn = Fn->IgnoreParens(); erichkeane

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-06-04 Thread Erich Keane via cfe-commits
@@ -7807,6 +7833,7 @@ void Sema::AddTemplateOverloadCandidate( Candidate.IgnoreObjectArgument = isa(Candidate.Function) && !isa(Candidate.Function); +Candidate.TookAddressOfOverload = false; erichkeane wrote: Feel like Candidate should

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-06-04 Thread Erich Keane via cfe-commits
@@ -3048,10 +3050,12 @@ class OverloadExpr : public Expr { Result.HasFormOfMemberPointer = (E == Ovl && Ovl->getQualifier()); Result.IsAddressOfOperand = true; + Result.IsAddressOfOperandWithParen = HasParen; erichkeane wrote: Cleanup nit: I

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

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

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

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

[clang] Reapply "[CUDA] Fix a couple of driver tests that really weren't bein… (PR #94000)

2024-06-03 Thread Erich Keane via cfe-commits
erichkeane wrote: Yep! I added it to the 'run' line as well, and adding it there fixes the test on my machine. So I suspect that would be the fix? https://github.com/llvm/llvm-project/pull/94000 ___ cfe-commits mailing list

[clang] Reapply "[CUDA] Fix a couple of driver tests that really weren't bein… (PR #94000)

2024-06-03 Thread Erich Keane via cfe-commits
erichkeane wrote: Bizarrely if I run the piped version, I get no error: ``` ekeane@dev-epyc4:/local/home/ekeane/llvm-project/build$ /local/home/ekeane/llvm-project/build/bin/clang -### -x cuda --target=powerpc64le-linux-gnu -std=c++11 --cuda-gpu-arch=sm_35 -nocudainc -nocudalib

[clang] [OpenACC] Loop construct basic Sema and AST work (PR #93742)

2024-06-03 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/93742 >From 51792c63e8fee3ad662174d6a53bbca195cbc1b4 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Fri, 24 May 2024 12:12:29 -0700 Subject: [PATCH 1/4] [OpenACC] Loop construct basic Sema and AST work This patch

[clang] Reapply "[CUDA] Fix a couple of driver tests that really weren't bein… (PR #94000)

2024-06-03 Thread Erich Keane via cfe-commits
erichkeane wrote: I've been having this fail in my local build for a few days now: ``` TEST 'Clang :: Driver/offloading-interoperability.c' FAILED Exit Code: 1 Command Output (stderr): -- RUN: at line 4: /local/home/ekeane/llvm-project/build/bin/clang

[clang] [OpenACC] Loop construct basic Sema and AST work (PR #93742)

2024-05-31 Thread Erich Keane via cfe-commits
erichkeane wrote: Did another merge to help with my work on followups. https://github.com/llvm/llvm-project/pull/93742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Loop construct basic Sema and AST work (PR #93742)

2024-05-31 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/93742 >From 51792c63e8fee3ad662174d6a53bbca195cbc1b4 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Fri, 24 May 2024 12:12:29 -0700 Subject: [PATCH 1/3] [OpenACC] Loop construct basic Sema and AST work This patch

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

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

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Erich Keane via cfe-commits
@@ -14,9 +14,11 @@ #define LLVM_CLANG_SEMA_SEMASYCL_H #include "clang/AST/Decl.h" +#include "clang/AST/DeclBase.h" erichkeane wrote: Wonder same about declbase as well, probably a bit of work on a few of these includes to do that sort of analysis.

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Erich Keane via cfe-commits
@@ -18,6 +18,7 @@ #include "clang/AST/Type.h" #include "clang/Basic/SourceLocation.h" #include "clang/Basic/TargetInfo.h" +#include "clang/Sema/ParsedAttr.h" erichkeane wrote: Same question here. https://github.com/llvm/llvm-project/pull/93966

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Erich Keane via cfe-commits
@@ -3825,6 +3843,115 @@ class Sema final : public SemaBase { void redelayDiagnostics(sema::DelayedDiagnosticPool ); + /// Diagnose mutually exclusive attributes when present on a given erichkeane wrote: Where did this section of stuff come from? At

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Erich Keane via cfe-commits
@@ -0,0 +1,57 @@ +//===- SemaSwift.h --- Swift language-specific routines ---*- 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:

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Erich Keane via cfe-commits
@@ -32,6 +32,7 @@ #include "clang/Basic/Specifiers.h" #include "clang/Sema/DeclSpec.h" #include "clang/Sema/Ownership.h" +#include "clang/Sema/ParsedAttr.h" erichkeane wrote: Could this be a forward decl? https://github.com/llvm/llvm-project/pull/93966

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I didn't take a close look at the individual .cpp files, I assume that is mostly just Copy & paste. I would like us to be a little more forward-decl aggressive in the headers however, and perhpas try to minimize what gets pushed up to Sema.h.

[clang] [Clang][Sema] Push an evaluation context for type constraints (PR #93945)

2024-05-31 Thread Erich Keane via cfe-commits
@@ -5004,6 +5004,20 @@ static bool CheckDeducedPlaceholderConstraints(Sema , const AutoType , return true; MultiLevelTemplateArgumentList MLTAL(Concept, CanonicalConverted, /*Final=*/false); + // Build up an EvaluationContext with

[clang] [clang] require template arg list after template kw (PR #80801)

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

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-31 Thread Erich Keane via cfe-commits
erichkeane wrote: > > No worries, and I reverted it for you. When you have the fix ready, I'm > > happy to verify it on our builders before you reland. > > Can you also reopen this PR, please? For documentation/history reasons, it's > probably better to provide a fix within the scope of this

[clang] [Clang][Sema] Diagnose variable template explicit specializations with storage-class-specifiers (PR #93873)

2024-05-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Sensible to me! Definitely needs a release note. Perhaps an alert on discourse about 'potentially breaking' changes. https://github.com/llvm/llvm-project/pull/93873 ___ cfe-commits mailing

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

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

[clang] [clang][NFC] Move `PDiag` into `SemaBase` (PR #93849)

2024-05-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Sensible to me, I'm all for it. https://github.com/llvm/llvm-project/pull/93849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-30 Thread Erich Keane via cfe-commits
erichkeane wrote: > What should be the next step following the approvals? If you do not have 'squash and merge' rights here, one of us can do it for you once testing completes. https://github.com/llvm/llvm-project/pull/93131 ___ cfe-commits mailing

[clang] [OpenACC] Loop construct basic Sema and AST work (PR #93742)

2024-05-30 Thread Erich Keane via cfe-commits
erichkeane wrote: Did a merge which will hopefully fix the build failures this was seeing. https://github.com/llvm/llvm-project/pull/93742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [OpenACC] Loop construct basic Sema and AST work (PR #93742)

2024-05-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/93742 >From 51792c63e8fee3ad662174d6a53bbca195cbc1b4 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Fri, 24 May 2024 12:12:29 -0700 Subject: [PATCH 1/3] [OpenACC] Loop construct basic Sema and AST work This patch

[clang] [OpenACC] Loop construct basic Sema and AST work (PR #93742)

2024-05-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/93742 >From 51792c63e8fee3ad662174d6a53bbca195cbc1b4 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Fri, 24 May 2024 12:12:29 -0700 Subject: [PATCH 1/3] [OpenACC] Loop construct basic Sema and AST work This patch

[clang] [OpenACC] Loop construct basic Sema and AST work (PR #93742)

2024-05-30 Thread Erich Keane via cfe-commits
@@ -0,0 +1,164 @@ + +// RUN: %clang_cc1 %s -fopenacc -ast-dump | FileCheck %s + +// Test this with PCH. +// RUN: %clang_cc1 %s -fopenacc -emit-pch -o %t %s +// RUN: %clang_cc1 %s -fopenacc -include-pch %t -ast-dump-all | FileCheck %s + +#ifndef PCH_HELPER +#define PCH_HELPER +

[clang] [OpenACC] Loop construct basic Sema and AST work (PR #93742)

2024-05-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/93742 >From 51792c63e8fee3ad662174d6a53bbca195cbc1b4 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Fri, 24 May 2024 12:12:29 -0700 Subject: [PATCH 1/2] [OpenACC] Loop construct basic Sema and AST work This patch

[clang] [OpenACC] Loop construct basic Sema and AST work (PR #93742)

2024-05-29 Thread Erich Keane via cfe-commits
@@ -0,0 +1,164 @@ + +// RUN: %clang_cc1 %s -fopenacc -ast-dump | FileCheck %s + +// Test this with PCH. +// RUN: %clang_cc1 %s -fopenacc -emit-pch -o %t %s +// RUN: %clang_cc1 %s -fopenacc -include-pch %t -ast-dump-all | FileCheck %s + +#ifndef PCH_HELPER +#define PCH_HELPER +

[clang] [OpenACC] Loop construct basic Sema and AST work (PR #93742)

2024-05-29 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/93742 This patch implements the 'loop' construct AST, as well as the basic appertainment rule. Additionally, it sets up the 'parent' compute construct, which is necessary for codegen/other diagnostics. A 'loop'

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-28 Thread Erich Keane via cfe-commits
erichkeane wrote: > One suggestion, if you are going to go about this problem systematically, try > to tackle the hardest problems first. > > For example: Try to make `MultiLevelTemplateArgumentList` const correct. I > would like other suggestions as well. Right, yeah. Unfortunately

[clang] [Clang][Sema] Use StructuralValues to model dependent NTTP arguments (PR #93556)

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

[clang] [Clang][Sema] Use StructuralValues to model dependent NTTP arguments (PR #93556)

2024-05-28 Thread Erich Keane via cfe-commits
@@ -221,8 +221,13 @@ static const ValueDecl *getAsSimpleValueDeclRef(const ASTContext , // We model class non-type template parameters as their template parameter // object declaration. - if (V.isStruct() || V.isUnion()) + if (V.isStruct() || V.isUnion()) { +//

[clang] [Clang][Sema] Use StructuralValues to model dependent NTTP arguments (PR #93556)

2024-05-28 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: This change seems smaller than I expected here, so I guess I'm not entirely sure what is going on. Can you better explain how this ends up using structural values instead of the TemplateParamObjectDecl? https://github.com/llvm/llvm-project/pull/93556

[clang] [Clang][Sema] Use StructuralValues to model dependent NTTP arguments (PR #93556)

2024-05-28 Thread Erich Keane via cfe-commits
@@ -221,8 +221,13 @@ static const ValueDecl *getAsSimpleValueDeclRef(const ASTContext , // We model class non-type template parameters as their template parameter // object declaration. - if (V.isStruct() || V.isUnion()) + if (V.isStruct() || V.isUnion()) { +//

[clang] [Clang][Sema] Use StructuralValues to model dependent NTTP arguments (PR #93556)

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

[clang] [Clang] Add support for [[msvc::noinline]] attribute. (PR #91720)

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

[clang] [Clang][Sema] Tweak tryCaptureVariable for unevaluated lambdas (PR #93206)

2024-05-28 Thread Erich Keane via cfe-commits
@@ -1576,7 +1576,10 @@ ExprResult Parser::ParseLambdaExpressionAfterIntroducer( TrailingReturnTypeLoc, ), std::move(Attributes), DeclEndLoc); -Actions.ActOnLambdaClosureQualifiers(Intro, MutableLoc); +// We have called

[clang] [clang] Avoid crash due to unimplemented StructuralValue support in the template differ (PR #93265)

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

[clang] [Clang][Sema] Tweak tryCaptureVariable for unevaluated lambdas (PR #93206)

2024-05-24 Thread Erich Keane via cfe-commits
@@ -1576,7 +1576,10 @@ ExprResult Parser::ParseLambdaExpressionAfterIntroducer( TrailingReturnTypeLoc, ), std::move(Attributes), DeclEndLoc); -Actions.ActOnLambdaClosureQualifiers(Intro, MutableLoc); +// We have called

[clang] [Clang][Sema] Tweak tryCaptureVariable for unevaluated lambdas (PR #93206)

2024-05-24 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I hope @cor3ntin comes and checks this out, but it generally looks OK to me. 1 oddity I'd like to hear about (why we can't do ActOnLambdaClosureQualifiers in the same place). https://github.com/llvm/llvm-project/pull/93206

[clang] [Clang][Sema] Tweak tryCaptureVariable for unevaluated lambdas (PR #93206)

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

[clang] [clang] Diagnose problematic diagnostic messages (PR #93229)

2024-05-23 Thread Erich Keane via cfe-commits
@@ -1302,7 +1302,8 @@ static void verifyDiagnosticWording(const Record ) { // closing '}', skipping intermediary {} pairs. size_t BraceCount = 1; -auto Iter = FullDiagText.begin() + /*%select{*/ 8; +constexpr size_t PercentSelectBraceLen = sizeof("%select{") -

[clang] [clang] Diagnose problematic diagnostic messages (PR #93229)

2024-05-23 Thread Erich Keane via cfe-commits
@@ -1355,7 +1357,7 @@ static void verifyDiagnosticWording(const Record ) { if (isDigit(FullDiagText.back()) && *(FullDiagText.end() - 2) == '}') { // Scan backwards to find the opening curly brace. size_t BraceCount = 1; -auto Iter = FullDiagText.end() - /*}0*/

[clang] [clang] Diagnose problematic diagnostic messages (PR #93229)

2024-05-23 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. 1 suggestion on improving the diagnostics, else, LGTM. https://github.com/llvm/llvm-project/pull/93229 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Diagnose problematic diagnostic messages (PR #93229)

2024-05-23 Thread Erich Keane via cfe-commits
@@ -1213,6 +1213,194 @@ static bool isRemark(const Record ) { return ClsName == "CLASS_REMARK"; } +// Presumes the text has been split at the first whitespace or hyphen. +static bool isExemptAtStart(StringRef Text) { + // Fast path, the first character is lowercase or not

[clang] [clang] Diagnose problematic diagnostic messages (PR #93229)

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

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-23 Thread Erich Keane via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -ast-print %s -o - | FileCheck %s + +// CHECK: extern "C" int printf(const char *, ...); +extern "C" int printf(const char *...); + +// CHECK: extern "C++" { +// CHECK-NEXT: int f(int); +// CHECK-NEXT: int g(int); +// CHECK-NEXT: } +extern

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-23 Thread Erich Keane via cfe-commits
@@ -1145,13 +1145,15 @@ void DeclPrinter::VisitLinkageSpecDecl(LinkageSpecDecl *D) { l = "C++"; } + bool HasMoreThanOneDecl = + *D->decls_begin() && D->decls_begin()->getNextDeclInContext(); erichkeane wrote: It just seems a bit more readable to

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-23 Thread Erich Keane via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -ast-print %s -o - | FileCheck %s + +// CHECK: extern "C" int printf(const char *, ...); +extern "C" int printf(const char *...); + +// CHECK: extern "C++" { erichkeane wrote: We don't really have much guarantees besides

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-23 Thread Erich Keane via cfe-commits
@@ -1145,13 +1145,15 @@ void DeclPrinter::VisitLinkageSpecDecl(LinkageSpecDecl *D) { l = "C++"; } + bool HasMoreThanOneDecl = + *D->decls_begin() && D->decls_begin()->getNextDeclInContext(); erichkeane wrote: ```suggestion

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-23 Thread Erich Keane via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -ast-print %s -o - | FileCheck %s + +// CHECK: extern "C" int printf(const char *, ...); +extern "C" int printf(const char *...); + +// CHECK: extern "C++" { +// CHECK-NEXT: int f(int); +// CHECK-NEXT: int g(int); +// CHECK-NEXT: } +extern

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-23 Thread Erich Keane via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -ast-print %s -o - | FileCheck %s + +// CHECK: extern "C" int printf(const char *, ...); +extern "C" int printf(const char *...); + +// CHECK: extern "C++" { erichkeane wrote: @AaronBallman : What do we think of this? This

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

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

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-23 Thread Erich Keane via cfe-commits
@@ -3548,6 +3561,56 @@ class Sema final : public SemaBase { BuiltinFunction }; + /// A helper function to provide Attribute Location for the Attr types erichkeane wrote: Right, my concern is the comment claims it is for both, but I see you copied it

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-23 Thread Erich Keane via cfe-commits
@@ -67,6 +67,7 @@ #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallSet.h" #include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/StringExtras.h" erichkeane wrote: Got it, thanks! https://github.com/llvm/llvm-project/pull/93179

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-23 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I'm in favor here, the changes to SemaDeclAttr are reasonable. https://github.com/llvm/llvm-project/pull/93179 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-23 Thread Erich Keane via cfe-commits
@@ -3548,6 +3561,56 @@ class Sema final : public SemaBase { BuiltinFunction }; + /// A helper function to provide Attribute Location for the Attr types erichkeane wrote: Is this comment right? ParsedAttr will always call the non-template version

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

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

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-23 Thread Erich Keane via cfe-commits
@@ -67,6 +67,7 @@ #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallSet.h" #include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/StringExtras.h" erichkeane wrote: What do we need this addition for? https://github.com/llvm/llvm-project/pull/93179

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

2024-05-22 Thread Erich Keane via cfe-commits
erichkeane wrote: > > the GNU `__attribute__((assume))` spelling is no longer diagnosed as a > > C++23 extension > > @erichkeane @AaronBallman Just wanted to double-check whether this is fine > because I committed this change after this pr was approved. Yep, that makes sense to me. Still

[clang] [clang-tools-extra] [clang] NFCI: use TemplateArgumentLoc for NTTP DefaultArgument (PR #92852)

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

[clang] [OpenACC] Implement 'reduction' sema for compute constructs (PR #92808)

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

[clang] [C] Disallow declarations where a statement is required (PR #92908)

2024-05-21 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: The original patch changed some of the ParsedStmtContext's in ParseOMP that might need to be changed back? Looking back, I think the intent there was in part to not specify OMP standalone directives, so that part should be reverted as well perhaps?

[clang] [Clang] Add support for [[msvc::noinline]] attribute. (PR #91720)

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

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #92527)

2024-05-21 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. I think this looks ok, I'd love it if @cor3ntin took another look, but I'm as happy as before. https://github.com/llvm/llvm-project/pull/92527 ___ cfe-commits mailing list

[clang] [clang] add unnamed_addr function attribute (PR #92499)

2024-05-21 Thread Erich Keane via cfe-commits
erichkeane wrote: > > Hmm... I'm not sure this meets our requirements for inclusion as an > > attribute. The semantics of this are pretty opaque, no obvious significant > > motivation/applicability in the base languages, etc. There doesn't seem to > > be any reasonable use case that I can

[clang] [clang] Introduce `SemaAccess` (PR #92674)

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

[clang] [OpenACC] Implement 'reduction' sema for compute constructs (PR #92808)

2024-05-20 Thread Erich Keane via cfe-commits
@@ -130,5 +130,33 @@ void foo() { //CHECK: #pragma acc parallel device_type(SomeStructImpl) #pragma acc parallel device_type (SomeStructImpl) while(true); + +//CHECK: #pragma acc parallel reduction(+: iPtr) +#pragma acc parallel reduction(+: iPtr) erichkeane

[clang] [OpenACC] Implement 'reduction' sema for compute constructs (PR #92808)

2024-05-20 Thread Erich Keane via cfe-commits
@@ -715,6 +787,65 @@ SemaOpenACC::ActOnClause(ArrayRef ExistingClauses, return nullptr; } +/// OpenACC 3.3 section 2.5.15: +/// At a mininmum, the supported data types include ... the numerical data types +/// in C, C++, and Fortran. +/// +/// If the reduction var is a

[clang] [OpenACC] Implement 'reduction' sema for compute constructs (PR #92808)

2024-05-20 Thread Erich Keane via cfe-commits
@@ -426,6 +438,24 @@ SemaOpenACC::ActOnClause(ArrayRef ExistingClauses, << /*NoArgs=*/1 << Clause.getDirectiveKind() << MaxArgs << Clause.getIntExprs().size(); +// OpenACC 3.3 Section 2.5.4: +// A reduction clause may not appear on a parallel

[clang] [llvm] Disable compiling and testing Flang on Clang changes (PR #92740)

2024-05-20 Thread Erich Keane via cfe-commits
@@ -68,7 +68,7 @@ function compute-projects-to-test() { done ;; clang) - for p in clang-tools-extra compiler-rt flang lldb cross-project-tests; do + for p in clang-tools-extra compiler-rt lldb cross-project-tests; do erichkeane wrote:

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

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

[clang] [clang] Introduce `SemaConcept` (PR #92672)

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

[clang] [clang] Introduce `SemaExceptionSpec` (PR #92653)

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

[clang] [clang] Introduce `SemaAccess` (PR #92674)

2024-05-20 Thread Erich Keane via cfe-commits
@@ -1459,11 +1460,11 @@ static AccessResult CheckEffectiveAccess(Sema , llvm_unreachable("invalid access result"); } -static Sema::AccessResult CheckAccess(Sema , SourceLocation Loc, - AccessTarget ) { +static SemaAccess::AccessResult

[clang] [clang] Introduce `SemaAccess` (PR #92674)

2024-05-20 Thread Erich Keane via cfe-commits
@@ -0,0 +1,112 @@ +//===- SemaAccess.h - C++ Access Control --===// +// +// 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-tools-extra] [Clang][Sema] Diagnose current instantiation used as an incomplete base class (PR #92597)

2024-05-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Agreed, I think the standards compliance here is worth it to see what falls out of this. https://github.com/llvm/llvm-project/pull/92597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[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] [Clang] Add support for [[msvc::noinline]] attribute. (PR #91720)

2024-05-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: You seem to have lost the tests in the latest version of this commit. https://github.com/llvm/llvm-project/pull/91720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[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] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #92527)

2024-05-20 Thread Erich Keane via cfe-commits
@@ -5695,19 +5694,35 @@ ExprResult Sema::BuildCXXDefaultInitExpr(SourceLocation Loc, FieldDecl *Field) { ImmediateCallVisitor V(getASTContext()); if (!NestedDefaultChecking) V.TraverseDecl(Field); - if (V.HasImmediateCalls) { + + // CWG1815 + // Support lifetime

  1   2   3   4   5   6   7   8   9   10   >