[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

[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
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/92527 ___ 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-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Not the best one to be reviewing this, but the code generally looks good to me. https://github.com/llvm/llvm-project/pull/92527 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-05-20 Thread Erich Keane via cfe-commits
erichkeane wrote: > @erichkeane Can you please take a look? Looking now, I was out on Friday due to illness. https://github.com/llvm/llvm-project/pull/87933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][Sema] Fix crash when diagnosing near-match for 'constexpr' redeclaration in C++11 (PR #92452)

2024-05-20 Thread Erich Keane via cfe-commits
@@ -9203,15 +9203,15 @@ static NamedDecl *DiagnoseInvalidRedeclaration( << Idx << FDParam->getType() << NewFD->getParamDecl(Idx - 1)->getType(); } else if (FDisConst != NewFDisConst) { - SemaRef.Diag(FD->getLocation(),

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

2024-05-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: 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

[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

2024-05-20 Thread Erich Keane via cfe-commits
erichkeane wrote: FWIW, I've been working actively on Open ACC Sema, and I found that the split so far has made development much more organized/easier, and makes naming of things a lot less awkward. I realize splitting out actual language features is concerning to some, but I'm cautiously

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

2024-05-17 Thread Erich Keane via cfe-commits
@@ -1997,9 +1997,12 @@ def Convergent : InheritableAttr { def NoInline : DeclOrStmtAttr { let Spellings = [CustomKeyword<"__noinline__">, GCC<"noinline">, CXX11<"clang", "noinline">, C23<"clang", "noinline">, + CXX11<"msvc", "noinline">,

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

2024-05-17 Thread Erich Keane via cfe-commits
@@ -0,0 +1,72 @@ +// RUN: %clang_cc1 -verify -fsyntax-only %s -Wno-c++17-extensions erichkeane wrote: This test is a copy/paste of the other one, I'd rather see this added into the other test/merged instead to show off both spellings in one place (particularly

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

2024-05-17 Thread Erich Keane via cfe-commits
@@ -1997,9 +1997,12 @@ def Convergent : InheritableAttr { def NoInline : DeclOrStmtAttr { let Spellings = [CustomKeyword<"__noinline__">, GCC<"noinline">, CXX11<"clang", "noinline">, C23<"clang", "noinline">, + CXX11<"msvc", "noinline">,

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

2024-05-17 Thread Erich Keane via cfe-commits
@@ -0,0 +1,53 @@ +// RUN: %clang_cc1 -emit-llvm %s -triple x86_64-unknown-linux-gnu -o - | FileCheck %s erichkeane wrote: Perhaps the same here, re merging the tests. https://github.com/llvm/llvm-project/pull/91720

[clang] [Clang][Sema] Fix crash when diagnosing near-match for 'constexpr' redeclaration in C++11 (PR #92452)

2024-05-17 Thread Erich Keane via cfe-commits
@@ -9203,15 +9203,15 @@ static NamedDecl *DiagnoseInvalidRedeclaration( << Idx << FDParam->getType() << NewFD->getParamDecl(Idx - 1)->getType(); } else if (FDisConst != NewFDisConst) { - SemaRef.Diag(FD->getLocation(),

[clang] [clang] CTAD alias: Fix missing template arg packs during the transformation (PR #92535)

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

[clang] [clang][Sema] Warn consecutive builtin comparisons in an expression (PR #92200)

2024-05-17 Thread Erich Keane via cfe-commits
@@ -85,7 +85,7 @@ void f(int x, int y, int z) { if ((ayy` or something). So something like: `comparison 'a>yhttps://github.com/llvm/llvm-project/pull/92200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [libclc] libclc: remove __attribute__((assume)) for clspv targets (PR #92126)

2024-05-17 Thread Erich Keane via cfe-commits
erichkeane wrote: > Is there something else needed on my side to get that PR merged? My apologies, I thought you'd been around LLVM enough that you had merge rights. I've done it now. https://github.com/llvm/llvm-project/pull/92126 ___ cfe-commits

[clang] [libclc] libclc: remove __attribute__((assume)) for clspv targets (PR #92126)

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

[clang] [clang][NFC] Remove const-qualification from `FunctionTemplateSpecializationInfo::TemplateArguments` (PR #92500)

2024-05-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/92500 ___ 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 diagnosing near-match for 'constexpr' redeclaration in C++11 (PR #92452)

2024-05-16 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: @AaronBallman is probably the best one to review DeclChunk stuff, perhaps @cor3ntin https://github.com/llvm/llvm-project/pull/92452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][Sema] Fix crash when diagnosing near-match for 'constexpr' redeclaration in C++11 (PR #92452)

2024-05-16 Thread Erich Keane via cfe-commits
@@ -9203,15 +9203,15 @@ static NamedDecl *DiagnoseInvalidRedeclaration( << Idx << FDParam->getType() << NewFD->getParamDecl(Idx - 1)->getType(); } else if (FDisConst != NewFDisConst) { - SemaRef.Diag(FD->getLocation(),

[clang] [Clang][Sema] Fix crash when diagnosing near-match for 'constexpr' redeclaration in C++11 (PR #92452)

2024-05-16 Thread Erich Keane via cfe-commits
@@ -1527,20 +1527,20 @@ struct DeclaratorChunk { /// Retrieve the location of the 'const' qualifier. SourceLocation getConstQualifierLoc() const { - assert(MethodQualifiers); - return MethodQualifiers->getConstSpecLoc(); + return MethodQualifiers ?

[clang] [Clang][Sema] Fix crash when diagnosing near-match for 'constexpr' redeclaration in C++11 (PR #92452)

2024-05-16 Thread Erich Keane via cfe-commits
@@ -9203,15 +9203,15 @@ static NamedDecl *DiagnoseInvalidRedeclaration( << Idx << FDParam->getType() << NewFD->getParamDecl(Idx - 1)->getType(); } else if (FDisConst != NewFDisConst) { - SemaRef.Diag(FD->getLocation(),

[clang] [Clang][Sema] Fix crash when diagnosing near-match for 'constexpr' redeclaration in C++11 (PR #92452)

2024-05-16 Thread Erich Keane via cfe-commits
@@ -724,6 +724,8 @@ Bug Fixes to C++ Support templates during partial ordering when deducing template arguments from a function declaration or when taking the address of a function template. - Fix a bug with checking constrained non-type template parameters for

[clang] [Clang][Sema] Fix crash when diagnosing near-match for 'constexpr' redeclaration in C++11 (PR #92452)

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

[clang] [Clang][Sema] Do not add implicit 'const' when matching constexpr function template explicit specializations after C++14 (PR #92449)

2024-05-16 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Release note, else LGTM https://github.com/llvm/llvm-project/pull/92449 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clang-query] Remove support for srcloc output (PR #92442)

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

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

2024-05-16 Thread Erich Keane via cfe-commits
erichkeane wrote: I think we have enough evidence that we have to revert this, so I've done so in 224116ab9f4d97acb0cca76dc63c1d3d4a253078 @yronglin : Please submit a PR that includes the original patch + whatever it takes to fix the above issues. Unfortunately reverts happen :/ But I

[clang] Reapply "[Clang][Sema] Earlier type checking for builtin unary operators (#90500)" (PR #92283)

2024-05-16 Thread Erich Keane via cfe-commits
erichkeane wrote: > Hi @sdkrystian - this appears to break in a circumstance where a custom > iterator class defines the postfix operator: > > ``` > FAILED: host_x64/obj/src/lib/zbitl/tests/zbitl-unittests.mem-config-test.cc.o > ../../prebuilt/third_party/clang/custom/bin/clang++ -MD -MF >

[clang] [Clang][Sema] ASTContext::getUnconstrainedType propagates dependence (PR #92425)

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

[clang] [Clang][Sema] ASTContext::getUnconstrainedType propagates dependence (PR #92425)

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

[clang] [clang] visit constraint of NTTP (PR #91842)

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

[clang] [clang] visit constraint of NTTP (PR #91842)

2024-05-16 Thread Erich Keane via cfe-commits
erichkeane wrote: > > Yeah, that seems incredibly reasonable and a much lower touch here with > > fewer concerns about the side-effects that we got here. > > Should I open a PR then? Yep, I think you should. Sorry @jcsxky : We're going to close this one, it seems that @sdkrystian has a

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-16 Thread Erich Keane via cfe-commits
erichkeane wrote: > Well assume attribute is a good example of where gcc and clang disagree and > might cause issues. Gcc implemented the assume attribute just the same as the > standard one. While clang implemented before standardization and now they > differ and could cause issues. This is

[clang] [clang] visit constraint of NTTP (PR #91842)

2024-05-16 Thread Erich Keane via cfe-commits
erichkeane wrote: > I don't think this is the right approach. I stepped though the example and > the reason we reject is because: > > * We substitute a dependent `AutoType` in for the types of the template > parameters when they are initially built. > > * We call `getMoreSpecialized`

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-16 Thread Erich Keane via cfe-commits
@@ -1435,6 +1435,38 @@ def CXX11NoReturn : InheritableAttr { let Documentation = [CXX11NoReturnDocs]; } +def NonBlocking : TypeAttr { + let Spellings = [CXX11<"clang", "nonblocking">, erichkeane wrote: I agree with Aaron here, doing that sort of prefix is

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

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

[clang] [clang] Implement provisional wording for CWG2398 regarding packs (PR #90820)

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

[clang] [clang] Introduce `SemaCodeCompletion` (PR #92311)

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

[clang] [clang] Create new warning group for deprecation of '-fno-relaxed-template-template-args' (PR #92324)

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

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-15 Thread Erich Keane via cfe-commits
erichkeane wrote: Great, I agree that is the right way forward. A more complicated flag like that might be cool someday, but not something we need today. https://github.com/llvm/llvm-project/pull/89807 ___ cfe-commits mailing list

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-15 Thread Erich Keane via cfe-commits
erichkeane wrote: > > Would it be reasonable to add a > > `-Wno-deprecated-relaxed-template-template-args` flag (or something like > > that) for this specific deprecation? > > I had similar idea, but what about instead implementing something generic to > ignore deprecation of any driver

[clang] Reapply "[Clang][Sema] Earlier type checking for builtin unary operators (#90500)" (PR #92283)

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

[clang] Reapply "[Clang][Sema] Earlier type checking for builtin unary operators (#90500)" (PR #92283)

2024-05-15 Thread Erich Keane via cfe-commits
erichkeane wrote: Can you point out the 'diff' inline what the change from the previous commit is? https://github.com/llvm/llvm-project/pull/92283 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][Sema] Do not mark template parameters in the exception specification as used during partial ordering (PR #91534)

2024-05-15 Thread Erich Keane via cfe-commits
@@ -5485,20 +5485,40 @@ static bool isAtLeastAsSpecializedAs(Sema , SourceLocation Loc, switch (TPOC) { case TPOC_Call: for (unsigned I = 0, N = Args2.size(); I != N; ++I) - ::MarkUsedTemplateParameters(S.Context, Args2[I], false, -

[clang] [libclc] libclc: remove __attribute__((assume)) for clspv targets (PR #92126)

2024-05-15 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Still fine once CI approves https://github.com/llvm/llvm-project/pull/92126 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Earlier type checking for builtin unary operators (PR #90500)

2024-05-14 Thread Erich Keane via cfe-commits
erichkeane wrote: > Well this took forever to reduce: > > ```c++ > template > struct A; > > template > bool operator==(const A&, const A&); > > template > void f(int *x) > { > [&](auto *y) { return x == y; }; > } > > void g() > { > f(nullptr); > } > ``` > > We initially build a

[clang] [Clang][Sema] Earlier type checking for builtin unary operators (PR #90500)

2024-05-14 Thread Erich Keane via cfe-commits
erichkeane wrote: This is unfortunately one of the cases where if you can't fix it 'quickly', a revert is necessary, as it breaks the build. https://github.com/llvm/llvm-project/pull/90500 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][Sema] Earlier type checking for builtin unary operators (PR #90500)

2024-05-14 Thread Erich Keane via cfe-commits
erichkeane wrote: > @erichkeane Since I addressed @shafik's comments, it this good to be merged? Yep, go for it! https://github.com/llvm/llvm-project/pull/90500 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [libclc] libclc: remove __attribute__((assume)) for clspv targets (PR #92126)

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

[clang] [libclc] libclc: remove __attribute__((assume)) for clspv targets (PR #92126)

2024-05-14 Thread Erich Keane via cfe-commits
@@ -393,6 +393,8 @@ Attribute Changes in Clang - Clang now warns that the ``exclude_from_explicit_instantiation`` attribute is ignored when applied to a local class or a member thereof. +- The ``clspv_libclc_builtin`` attribute has been added to allow clspv to identified

[clang] [libclc] libclc: remove __attribute__((assume)) for clspv targets (PR #92126)

2024-05-14 Thread Erich Keane via cfe-commits
@@ -8087,3 +8087,10 @@ requirement: } }]; } + +def ClspvLibclcBuiltinDoc : Documentation { + let Category = DocCatFunction; + let Content = [{ +Attribute used by clspv to identified functions coming from libclc. erichkeane wrote: I think this needs

[clang] [libclc] libclc: remove __attribute__((assume)) for clspv targets (PR #92126)

2024-05-14 Thread Erich Keane via cfe-commits
erichkeane wrote: > @erichkeane, I don't know what you expect for the release note, where should > I write something? See `ReleaseNotes.rst`, find a section that makes sense (probably attribute changes), and write a quick blurb about the attribute, likely a very condensed version of the

[clang] [libclc] libclc: remove __attribute__((assume)) for clspv targets (PR #92126)

2024-05-14 Thread Erich Keane via cfe-commits
@@ -4561,3 +4561,9 @@ def CodeAlign: StmtAttr { static constexpr int MaximumAlignment = 4096; }]; } + +def ClspvLibclcBuiltin: DeclOrStmtAttr { + let Spellings = [Clang<"clspv_libclc_builtin">]; + let Documentation = [Undocumented]; erichkeane wrote:

[clang] [libclc] libclc: remove __attribute__((assume)) for clspv targets (PR #92126)

2024-05-14 Thread Erich Keane via cfe-commits
@@ -4561,3 +4561,9 @@ def CodeAlign: StmtAttr { static constexpr int MaximumAlignment = 4096; }]; } + +def ClspvLibclcBuiltin: DeclOrStmtAttr { + let Spellings = [Clang<"clspv_libclc_builtin">]; + let Documentation = [Undocumented]; erichkeane wrote:

[clang] [libclc] libclc: remove __attribute__((assume)) for clspv targets (PR #92126)

2024-05-14 Thread Erich Keane via cfe-commits
@@ -4561,3 +4561,9 @@ def CodeAlign: StmtAttr { static constexpr int MaximumAlignment = 4096; }]; } + +def ClspvLibclcBuiltin: DeclOrStmtAttr { + let Spellings = [Clang<"clspv_libclc_builtin">]; + let Documentation = [Undocumented]; + let SimpleHandler = 1;

[clang] [libclc] libclc: remove __attribute__((assume)) for clspv targets (PR #92126)

2024-05-14 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Also needs: -a release note -A test: At least a test against LLVM-IR (CodeGen test). https://github.com/llvm/llvm-project/pull/92126 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [libclc] libclc: remove __attribute__((assume)) for clspv targets (PR #92126)

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

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

2024-05-14 Thread Erich Keane via cfe-commits
erichkeane wrote: > > Yep, understood. I'll do my best to do quick review cycles on the other > > patch. > > Alright, I’ll do that then; as I said though, I’m a bit busy, so I’ll > probably only get to this sometime next week unfortunately... Note @rjodinchr has offered to do the PR for that

  1   2   3   4   5   6   7   8   9   10   >