[clang] [Clang] Disallow explicit object parameters in more contexts (PR #89078)

2024-04-17 Thread via cfe-commits
@@ -5287,6 +5287,36 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, // Check for auto functions and trailing return type and adjust the // return type accordingly. if (!D.isInvalidType()) { +// [dcl.fct]p6: +// +

[clang] [Clang] Disallow explicit object parameters in more contexts (PR #89078)

2024-04-17 Thread via cfe-commits
@@ -5,7 +5,7 @@ void f(this); // expected-error{{variable has incomplete type 'void'}} \ // expected-error{{invalid use of 'this' outside of a non-static member function}} -void g(this auto); // expected-error{{an explicit object parameter cannot appear in a no

[clang] [Clang] Disallow explicit object parameters in more contexts (PR #89078)

2024-04-17 Thread via cfe-commits
@@ -5287,6 +5287,36 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, // Check for auto functions and trailing return type and adjust the // return type accordingly. if (!D.isInvalidType()) { +// [dcl.fct]p6: +// +

[clang] [Clang] Disallow explicit object parameters in more contexts (PR #89078)

2024-04-17 Thread via cfe-commits
Sirraide wrote: > Note this PR is related to > https://github.com/llvm/llvm-project/pull/88974/files That’s pr covers a different code path from what I can tell though (unless requires expressions are also modelled as function declarators, I’m honestly not sure about that one). It also remind

[clang] [Clang] Disallow explicit object parameters in more contexts (PR #89078)

2024-04-17 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: I'm going to merge #88974 shortly, but I don't think this interferes with anything here https://github.com/llvm/llvm-project/pull/89078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [Clang] Disallow explicit object parameters in more contexts (PR #89078)

2024-04-17 Thread via cfe-commits
Sirraide wrote: > I'm going to merge #88974 shortly, but I don't think this interferes with > anything here Yeah, it seems orthogonal to this patch from what I can tell at least. https://github.com/llvm/llvm-project/pull/89078 ___ cfe-commits mailing

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-17 Thread Orlando Cazalet-Hyams via cfe-commits
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const TemplateSpecializationType *Ty, auto PP = getPrintingPolicy(); Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None); + SourceLocation Loc = AliasDecl->getLocation(); + + if (CGM.getCodeGenO

[clang] 458328a - [clang][NFC] Refactor `Sema::RedeclarationKind`

2024-04-17 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-04-17T18:02:48+03:00 New Revision: 458328ae23d318a5055d5bac66426b8551bce01f URL: https://github.com/llvm/llvm-project/commit/458328ae23d318a5055d5bac66426b8551bce01f DIFF: https://github.com/llvm/llvm-project/commit/458328ae23d318a5055d5bac66426b8551bce01f.

[libclc] [libclc] Add initial LIT tests (PR #87989)

2024-04-17 Thread Fraser Cormack via cfe-commits
@@ -1,3 +1,6 @@ -__kernel void foo(int *i) { +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s frasercrmck wrote: I wasn't so much thinking that it would pretend to be generic, but rather that it'd use a custom test format (something like [analyzer_test.py](

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-17 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/88865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-04-17 Thread Dinar Temirbulatov via cfe-commits
dtemirbulatov wrote: ok, Reverting now. https://github.com/llvm/llvm-project/pull/79842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce `SemaObjC` (PR #89086)

2024-04-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This is continuation of efforts to split `Sema` up, following the example of OpenMP, OpenACC, etc. Context can be found in https://github.com/llvm/llvm-project/pull/82217 and https://github.com/llvm/l

[clang-tools-extra] [clang-tidy] bugprone-lambda-function-name ignore macro in captures (PR #89076)

2024-04-17 Thread Piotr Zegar via cfe-commits
@@ -69,9 +71,8 @@ void LambdaFunctionNameCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { } void LambdaFunctionNameCheck::registerMatchers(MatchFinder *Finder) { - // Match on PredefinedExprs inside a lambda. - Finder->addMatcher(predefinedExpr(hasAncestor(lambdaExp

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-17 Thread Paul T Robinson via cfe-commits
@@ -310,6 +310,24 @@ namespace llvm { DINode::DIFlags Flags = DINode::FlagZero, DINodeArray Annotations = nullptr); +/// Create debugging information entry for a template alias. +/// \param Ty O

[clang] [clang] Introduce `SemaObjC` (PR #89086)

2024-04-17 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 458328ae23d318a5055d5bac66426b8551bce01f 520b7fe2990ab92169e718647181499577410ac4 --

[clang] [Clang][Sema] placement new initializes typedef array with correct size (PR #83124)

2024-04-17 Thread via cfe-commits
mahtohappy wrote: @Sterling-Augustine please provide a reproducer script for your errors. https://github.com/llvm/llvm-project/pull/83124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] 950bb09 - Revert "[Clang][AArch64] Warn when calling non/streaming about vector size difference (#79842)"

2024-04-17 Thread Dinar Temirbulatov via cfe-commits
Author: Dinar Temirbulatov Date: 2024-04-17T15:30:40Z New Revision: 950bb097e11d6ee26533c00519c62df99438 URL: https://github.com/llvm/llvm-project/commit/950bb097e11d6ee26533c00519c62df99438 DIFF: https://github.com/llvm/llvm-project/commit/950bb097e11d6ee26533c00519c62df99438.diff

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-04-17 Thread Dinar Temirbulatov via cfe-commits
dtemirbulatov wrote: Reverted with 950bb097e11d6ee26533c00519c62df99438 https://github.com/llvm/llvm-project/pull/79842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader creates extra HeaderFileInfo, breaks PCM reuse (PR #89005)

2024-04-17 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: > getExistingFileInfo(, /*WantExternal=*/false) Until [recently](https://github.com/llvm/llvm-project/pull/87848) that function still consulted `ExternalSource` for `HeaderFileInfo` that `IsValid && !External && !Resolved`. Maybe you want to try the new `getExistingLocalFi

[clang] [polly] [clang-format] Revert breaking stream operators to previous default (PR #89016)

2024-04-17 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. I'd be happy to see this, I'm sure you can come up with a better choice of options than I did. https://github.com/llvm/llvm-project/pull/89016 ___ cfe-commits mailing list cfe-commits@lists

[clang] [Clang][Parse] Diagnose requires expressions with explicit object parameters (PR #88974)

2024-04-17 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/88974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 8656d4c - [Clang][Parse] Diagnose requires expressions with explicit object parameters (#88974)

2024-04-17 Thread via cfe-commits
Author: Krystian Stasiowski Date: 2024-04-17T11:41:03-04:00 New Revision: 8656d4c6a7a742c6fa6ee02c2ace7415163e65e4 URL: https://github.com/llvm/llvm-project/commit/8656d4c6a7a742c6fa6ee02c2ace7415163e65e4 DIFF: https://github.com/llvm/llvm-project/commit/8656d4c6a7a742c6fa6ee02c2ace7415163e65e4

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-17 Thread Michael Buch via cfe-commits
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const TemplateSpecializationType *Ty, auto PP = getPrintingPolicy(); Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None); + SourceLocation Loc = AliasDecl->getLocation(); + + if (CGM.getCodeGenO

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-17 Thread Michael Buch via cfe-commits
@@ -1313,6 +1313,61 @@ llvm::DIType *CGDebugInfo::CreateType(const BlockPointerType *Ty, return DBuilder.createPointerType(EltTy, Size); } +static llvm::SmallVector +GetTemplateArgs(const TemplateDecl *TD, const TemplateSpecializationType *Ty) { + assert(Ty->isTypeAlias())

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

2024-04-17 Thread via cfe-commits
cor3ntin wrote: @hubert-reinterpretcast ping! https://github.com/llvm/llvm-project/pull/87933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-04-17 Thread Erich Keane via cfe-commits
@@ -6390,6 +6394,7 @@ TEST(HasTemplateArgumentLoc, BindsToSpecializationWithDoubleArgument) { 0, hasTypeLoc(loc(asString("double"))); } +#if 0 erichkeane wrote: Ping on this. https://github.com/llvm/llvm-project/pull/81

[libclc] [libclc] Add initial LIT tests (PR #87989)

2024-04-17 Thread Matt Arsenault via cfe-commits
@@ -1,3 +1,6 @@ -__kernel void foo(int *i) { +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s arsenm wrote: This just requires additional REQUIRES support in lit for the built targets when running the test, the same as other built-backend dependent codegen t

[clang] [ASTImporter] Fix infinite recurse on return type declared inside body (#68775) (PR #89096)

2024-04-17 Thread Ding Fei via cfe-commits
https://github.com/danix800 created https://github.com/llvm/llvm-project/pull/89096 Lambda without trailing auto could has return type declared inside the body too. >From 6390eb0618e88c1c176329c6d49a45e16944f248 Mon Sep 17 00:00:00 2001 From: dingfei Date: Thu, 18 Apr 2024 00:03:14 +0800 Subje

[clang] [clang-tools-extra] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-04-17 Thread Erich Keane via cfe-commits
@@ -2596,27 +2588,14 @@ class VarTemplateSpecializationDecl : public VarDecl, llvm::PointerUnion SpecializedTemplate; - /// Further info for explicit template specialization/instantiation. - struct ExplicitSpecializationInfo { -/// The type-as-written. -TypeSourc

[clang] [ASTImporter] Fix infinite recurse on return type declared inside body (#68775) (PR #89096)

2024-04-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ding Fei (danix800) Changes Lambda without trailing auto could has return type declared inside the body too. --- Full diff: https://github.com/llvm/llvm-project/pull/89096.diff 2 Files Affected: - (modified) clang/lib/AST/ASTImporter.cp

[clang] [ASTImporter] Fix infinite recurse on return type declared inside body (#68775) (PR #89096)

2024-04-17 Thread Ding Fei via cfe-commits
https://github.com/danix800 edited https://github.com/llvm/llvm-project/pull/89096 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [FMV] Remove useless features according the latest ACLE spec. (PR #88965)

2024-04-17 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea closed https://github.com/llvm/llvm-project/pull/88965 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 19c6a7f - [FMV] Remove useless features according the latest ACLE spec. (#88965)

2024-04-17 Thread via cfe-commits
Author: Alexandros Lamprineas Date: 2024-04-17T17:16:58+01:00 New Revision: 19c6a7feca6e1558ef7cbe18efd2477c1126899d URL: https://github.com/llvm/llvm-project/commit/19c6a7feca6e1558ef7cbe18efd2477c1126899d DIFF: https://github.com/llvm/llvm-project/commit/19c6a7feca6e1558ef7cbe18efd2477c112689

[clang] [clang-tools-extra] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-04-17 Thread Krystian Stasiowski via cfe-commits
@@ -6390,6 +6394,7 @@ TEST(HasTemplateArgumentLoc, BindsToSpecializationWithDoubleArgument) { 0, hasTypeLoc(loc(asString("double"))); } +#if 0 sdkrystian wrote: @erichkeane I just pushed a commit which converts all the `

[clang] [clang] Introduce `SemaObjC` (PR #89086)

2024-04-17 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Removing `ObjC` from the names of functions inside `SemaObjC` in an obvious next step we can take, but I'm leaving this for a subsequent PR, because this one is large enough already. https://github.com/llvm/llvm-project/pull/89086 ___

[clang] [llvm] [ASTImporter] Fix infinite recurse on return type declared inside body (#68775) (PR #89096)

2024-04-17 Thread Ding Fei via cfe-commits
https://github.com/danix800 updated https://github.com/llvm/llvm-project/pull/89096 >From 0f7ddbfef8ca9c93efacfb2a437ddb5645ca07b1 Mon Sep 17 00:00:00 2001 From: dingfei Date: Thu, 18 Apr 2024 00:03:14 +0800 Subject: [PATCH] [ASTImporter] Fix infinite recurse on return type declared inside bod

[clang] [ASTImporter] Fix infinite recurse on return type declared inside body (#68775) (PR #89096)

2024-04-17 Thread Ding Fei via cfe-commits
https://github.com/danix800 updated https://github.com/llvm/llvm-project/pull/89096 >From 0d6d52365a5d31045c347412c3a0fe8be7119006 Mon Sep 17 00:00:00 2001 From: dingfei Date: Thu, 18 Apr 2024 00:33:29 +0800 Subject: [PATCH] [ASTImporter] Fix infinite recurse on return type declared inside bod

[clang] [ASTImporter] Fix infinite recurse on return type declared inside body (#68775) (PR #89096)

2024-04-17 Thread Ding Fei via cfe-commits
https://github.com/danix800 edited https://github.com/llvm/llvm-project/pull/89096 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Add initial LIT tests (PR #87989)

2024-04-17 Thread Fraser Cormack via cfe-commits
@@ -1,3 +1,6 @@ -__kernel void foo(int *i) { +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s frasercrmck wrote: Fair enough, I hadn't really appreciated that `update_cc_test_checks` was orthogonal to all of these other LIT concepts like `REQUIRES` and featu

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-17 Thread Orlando Cazalet-Hyams via cfe-commits
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const TemplateSpecializationType *Ty, auto PP = getPrintingPolicy(); Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None); + SourceLocation Loc = AliasDecl->getLocation(); + + if (CGM.getCodeGenO

[clang] [llvm] [InstCombine] Add canonicalization of `sitofp` -> `uitofp nneg` (PR #88299)

2024-04-17 Thread via cfe-commits
@@ -1964,11 +1964,25 @@ Instruction *InstCombinerImpl::visitFPToSI(FPToSIInst &FI) { } Instruction *InstCombinerImpl::visitUIToFP(CastInst &CI) { - return commonCastTransforms(CI); + if (Instruction *R = commonCastTransforms(CI)) +return R; + if (!CI.hasNonNeg() && isK

[clang] [ASTImporter] Fix infinite recurse on return type declared inside body (#68775) (PR #89096)

2024-04-17 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/89096 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ASTImporter] Fix infinite recurse on return type declared inside body (#68775) (PR #89096)

2024-04-17 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov commented: I think it would be a good idea to double check this for performance regressions, since this case will recurse into the function every time with this patch. Though I don't know if there is a better way to test it than to merge it and wait for it to be pic

[clang] [ASTImporter] Fix infinite recurse on return type declared inside body (#68775) (PR #89096)

2024-04-17 Thread Matheus Izvekov via cfe-commits
@@ -3649,19 +3649,15 @@ class IsTypeDeclaredInsideVisitor /// This function checks if the function has 'auto' return type that contains /// a reference (in any way) to a declaration inside the same function. mizvekov wrote: ```suggestion /// This function che

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-17 Thread Michael Buch via cfe-commits
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const TemplateSpecializationType *Ty, auto PP = getPrintingPolicy(); Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None); + SourceLocation Loc = AliasDecl->getLocation(); + + if (CGM.getCodeGenO

[clang] Carving out -Wformat warning about scoped enums into a subwarning (PR #88595)

2024-04-17 Thread via cfe-commits
pirama-arumuga-nainar wrote: > Please mention that this fixes #81647 in the patch summary so that the issue > is automatically closed. > > You should also add a release note so that users know about the change (and > link to the issue being closed). This is also pending. The rest of the chan

[clang] Carving out -Wformat warning about scoped enums into a subwarning (PR #88595)

2024-04-17 Thread via cfe-commits
@@ -1,5 +1,6 @@ // RUN: %clang_cc1 -fsyntax-only -verify -Wformat %s -// RUN: %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits -Wformat %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits -Wformat-pedantic %s 2>&1 | FileCheck %s --

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader creates extra HeaderFileInfo, breaks PCM reuse (PR #89005)

2024-04-17 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > > @ilya-biryukov can you check that this fixes your running out of source > > location space problem please? > > Just tried it. The patch as is did not help. I've also tried changing the > previous line to `getExistingFileInfo(, /*WantExternal=*/false)` and it > did

[libclc] [libclc] Add initial LIT tests (PR #87989)

2024-04-17 Thread Matt Arsenault via cfe-commits
@@ -1,3 +1,6 @@ -__kernel void foo(int *i) { +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s arsenm wrote: You can have different target coexist in the same test files when appropriate and just multi-list REQUIRES. Clang does this regularly (OpenMP in parti

[clang] [llvm] [FMV] Rectify incomplete ExtensionInfo entries in TargetParser. (PR #89106)

2024-04-17 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/89106 This patch is sorting out inconsistencies in TargetParser regarding: * features without corresponding ArchExtKind * features without (Neg)Feature string * features with incorrect DependentFeatures string Also f

[clang] [llvm] [FMV] Rectify incomplete ExtensionInfo entries in TargetParser. (PR #89106)

2024-04-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alexandros Lamprineas (labrinea) Changes This patch is sorting out inconsistencies in TargetParser regarding: * features without corresponding ArchExtKind * features without (Neg)Feature string * features with incorrect DependentFeatures s

[clang] [llvm] [arm] Support reserving r4 and r5 alongside r9 (PR #88981)

2024-04-17 Thread via cfe-commits
https://github.com/benisxdxd updated https://github.com/llvm/llvm-project/pull/88981 >From 24453d337187e43a5901337681098d2e7520b740 Mon Sep 17 00:00:00 2001 From: benisxdxd <164242179+benisx...@users.noreply.github.com> Date: Tue, 16 Apr 2024 23:38:26 +0300 Subject: [PATCH 1/2] [arm] Support res

[clang] [llvm] [SpecialCaseList] Use glob by default (PR #74809)

2024-04-17 Thread Paul T Robinson via cfe-commits
pogo59 wrote: FTR, got an internal report about this. Luckily it was my turn to catch new bugs and I recognized the issue. @MaskRay Is it too late to add a Release Note for LLVM 18? https://github.com/llvm/llvm-project/pull/74809 ___ cfe-commits mail

[clang] [clang-tools-extra] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-04-17 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: I added a commit which adds support for matching the `TemplateArgumentLoc`s of explicit specializations directly. https://github.com/llvm/llvm-project/pull/81642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader creates extra HeaderFileInfo, breaks PCM reuse (PR #89005)

2024-04-17 Thread Richard Smith via cfe-commits
@@ -1313,6 +1313,14 @@ OptionalFileEntryRef HeaderSearch::LookupSubframeworkHeader( // File Info Management. //===--===// +static bool +headerFileInfoModuleBitsMatchRole(const HeaderFileInfo *HFI, +

[clang] [C23] [CLANG] Adding C23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/88978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] [CLANG] Adding C23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: C++23, not C23, right? (You should update the patch title and summary accordingly.) https://github.com/llvm/llvm-project/pull/88978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [C23] [CLANG] Adding C23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-17 Thread Aaron Ballman via cfe-commits
@@ -14547,6 +14547,18 @@ bool FloatExprEvaluator::VisitCallExpr(const CallExpr *E) { default: return false; + case Builtin::BI__builtin_frexpf: AaronBallman wrote: I think it would be helpful to also update `clang\lib\AST\Interp\InterpBuiltin.cpp` to

[clang] [C23] [CLANG] Adding C23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-17 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,51 @@ +// RUN: %clang_cc1 -x c++ -triple x86_64-unknown-unknown -std=c++23 \ +// RUN: -emit-llvm -o - %s | FileCheck %s + +// RUN %clang_cc1 -x c++ -triple x86_64-linux-gnu -emit-llvm -o - %s \ +// RUN -std=c++23 + +#define INFINITY ((float)(1e+300 * 1e+300)) --

[clang] [llvm] [FMV] Rectify incomplete ExtensionInfo entries in TargetParser. (PR #89106)

2024-04-17 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/89106 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA][HIP] Fix record layout on Windows (PR #87651)

2024-04-17 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. https://github.com/llvm/llvm-project/pull/87651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Annotate ampamp after new/delete as BinaryOperator (PR #89033)

2024-04-17 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/89033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AIX] set OpenMP include path (PR #88545)

2024-04-17 Thread David Tenty via cfe-commits
https://github.com/daltenty approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/88545 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-17 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/88978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] demangle function names in trace files (PR #87626)

2024-04-17 Thread via cfe-commits
Trass3r wrote: Thank you @jamieschmeiser, how to proceed? Should I rebase? Should I apply the clang-fornat diff (which makes things less readable IMHO)? https://github.com/llvm/llvm-project/pull/87626 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [clang]Treat arguments to builtin type traits as template type arguments (PR #87132)

2024-04-17 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: @cor3ntin Thank you! I don't have the permission to merge. Could you merge it for me? https://github.com/llvm/llvm-project/pull/87132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] b1dc62f - [clang]Treat arguments to builtin type traits as template type arguments (#87132)

2024-04-17 Thread via cfe-commits
Author: Amirreza Ashouri Date: 2024-04-17T20:58:11+02:00 New Revision: b1dc62f139ef265a36a2a739ce9ba4e1e48a6dbe URL: https://github.com/llvm/llvm-project/commit/b1dc62f139ef265a36a2a739ce9ba4e1e48a6dbe DIFF: https://github.com/llvm/llvm-project/commit/b1dc62f139ef265a36a2a739ce9ba4e1e48a6dbe.di

[clang] [clang]Treat arguments to builtin type traits as template type arguments (PR #87132)

2024-04-17 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/87132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Revert "[RISCV] Support Zama16b1p0" (PR #89122)

2024-04-17 Thread via cfe-commits
https://github.com/ZijunZhaoCCK created https://github.com/llvm/llvm-project/pull/89122 Reverts llvm/llvm-project#88474 ```CMake Error at /[tmpfs/src/git/out/llvm-project/llvm/cmake/modules/HandleLLVMOptions.cmake:396](https://cs.corp.google.com/piper///depot/google3/tmpfs/src/git/out/llvm-pro

[clang] [llvm] Revert "[RISCV] Support Zama16b1p0" (PR #89122)

2024-04-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v @llvm/pr-subscribers-clang Author: None (ZijunZhaoCCK) Changes Reverts llvm/llvm-project#88474 ```CMake Error at /[tmpfs/src/git/out/llvm-project/llvm/cmake/modules/HandleLLVMOptions.cmake:396](https://cs.corp.google.com/piper///depot/go

[clang] [llvm] Revert "[RISCV] Support Zama16b1p0" (PR #89122)

2024-04-17 Thread Craig Topper via cfe-commits
topperc wrote: I'm not sure how this can be related to the Zama16b patch. https://github.com/llvm/llvm-project/pull/89122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Revert "[RISCV] Support Zama16b1p0" (PR #89122)

2024-04-17 Thread via cfe-commits
https://github.com/ZijunZhaoCCK converted_to_draft https://github.com/llvm/llvm-project/pull/89122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader creates extra HeaderFileInfo, breaks PCM reuse (PR #89005)

2024-04-17 Thread Ian Anderson via cfe-commits
@@ -1313,6 +1313,14 @@ OptionalFileEntryRef HeaderSearch::LookupSubframeworkHeader( // File Info Management. //===--===// +static bool +headerFileInfoModuleBitsMatchRole(const HeaderFileInfo *HFI, +

[clang] [Clang] Handle structs with inner structs and no fields (PR #89126)

2024-04-17 Thread Bill Wendling via cfe-commits
https://github.com/bwendling created https://github.com/llvm/llvm-project/pull/89126 A struct that declares an inner struct, but no fields, won't have a field count. So getting the offset of the inner struct fails. This happens in both C and C++: struct foo { struct bar { int Quan

[clang] [Clang] Handle structs with inner structs and no fields (PR #89126)

2024-04-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Bill Wendling (bwendling) Changes A struct that declares an inner struct, but no fields, won't have a field count. So getting the offset of the inner struct fails. This happens in both C and C++: struct foo { struct bar { int

[clang] [Clang] Handle structs with inner structs and no fields (PR #89126)

2024-04-17 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 1460b4964c7ada2f7536006722c8585b5bd0a1b5 36ddb5811f11a1f6968705005713f34713026dbb --

[clang] [Clang] Handle structs with inner structs and no fields (PR #89126)

2024-04-17 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/89126 >From 36ddb5811f11a1f6968705005713f34713026dbb Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 17 Apr 2024 12:23:02 -0700 Subject: [PATCH 1/2] [Clang] Handle structs with inner structs and no fields A

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader creates extra HeaderFileInfo, breaks PCM reuse (PR #89005)

2024-04-17 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/89005 >From 0ea2af8066f2fb307f3bd273cf34da82189af0ab Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Tue, 16 Apr 2024 17:08:28 -0700 Subject: [PATCH] [clang][modules] HeaderSearch::MarkFileModuleHeader crea

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader creates extra HeaderFileInfo, breaks PCM reuse (PR #89005)

2024-04-17 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: Ok _this_ one should fix the logic I think. @ilya-biryukov can you give this a try please? https://github.com/llvm/llvm-project/pull/89005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader creates extra HeaderFileInfo, breaks PCM reuse (PR #89005)

2024-04-17 Thread Ian Anderson via cfe-commits
@@ -84,7 +84,9 @@ struct HeaderFileInfo { LLVM_PREFERRED_TYPE(bool) unsigned isModuleHeader : 1; - /// Whether this header is a `textual header` in a module. + /// Whether this header is a `textual header` in a module. If a header is + /// textual in one module and norm

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader creates extra HeaderFileInfo, breaks PCM reuse (PR #89005)

2024-04-17 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder edited https://github.com/llvm/llvm-project/pull/89005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV][HLSL] Add mad intrinsic lowering for spirv (PR #89130)

2024-04-17 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl created https://github.com/llvm/llvm-project/pull/89130 - `clang/lib/CodeGen/CGBuiltin.cpp` - Add a generic mull add implementation. Make DXIL implementation tied to target. - `clang/lib/CodeGen/CGHLSLRuntime.cpp` - existing target switching only lets you swap on int

[clang] [llvm] [SPIRV][HLSL] Add mad intrinsic lowering for spirv (PR #89130)

2024-04-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-directx @llvm/pr-subscribers-clang-codegen Author: Farzon Lotfi (farzonl) Changes - `clang/lib/CodeGen/CGBuiltin.cpp` - Add a generic mull add implementation. Make DXIL implementation tied to target. - `clang/lib/CodeGen/CGHLSLRuntime.cpp` - exi

[clang] [llvm] [SPIRV][HLSL] Add mad intrinsic lowering for spirv (PR #89130)

2024-04-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Farzon Lotfi (farzonl) Changes - `clang/lib/CodeGen/CGBuiltin.cpp` - Add a generic mull add implementation. Make DXIL implementation tied to target. - `clang/lib/CodeGen/CGHLSLRuntime.cpp` - existing target switching only lets you swap on

[clang] [llvm] [SPIRV][HLSL] Add mad intrinsic lowering for spirv (PR #89130)

2024-04-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Farzon Lotfi (farzonl) Changes - `clang/lib/CodeGen/CGBuiltin.cpp` - Add a generic mull add implementation. Make DXIL implementation tied to target. - `clang/lib/CodeGen/CGHLSLRuntime.cpp` - existing target switching only lets you swap on

[clang] [flang] [flang][driver] Avoid mentions of Clang in Flang's command line reference. (PR #88932)

2024-04-17 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. The changes in this PR look good to me. Thanks for the fix! https://github.com/llvm/llvm-project/pull/88932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader creates extra HeaderFileInfo, breaks PCM reuse (PR #89005)

2024-04-17 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > As a test, maybe you could probe the resulting PCM with `-module-file-info`. What would I be looking for? Presumably the problem is we import the same module twice but fail to find the built pcm in the module cache and so we build it again? I don't know what else wou

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader creates extra HeaderFileInfo, breaks PCM reuse (PR #89005)

2024-04-17 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: Also note that `ASTWriter` uses this logic in couple of places to avoid serializing unrelated headers: ```c++ if (!HFI || (HFI->isModuleHeader && !HFI->isCompilingModuleHeader)) continue; ``` Since textual headers from other modules have `isModuleHeader=false` and `isCom

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader creates extra HeaderFileInfo, breaks PCM reuse (PR #89005)

2024-04-17 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > Also note that `ASTWriter` uses this logic in couple of places to avoid > serializing unrelated headers: > > ```c++ > if (!HFI || (HFI->isModuleHeader && !HFI->isCompilingModuleHeader)) > continue; > ``` > > Since textual headers from other modules have `isModuleHe

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader creates extra HeaderFileInfo, breaks PCM reuse (PR #89005)

2024-04-17 Thread Richard Smith via cfe-commits
@@ -1313,6 +1313,14 @@ OptionalFileEntryRef HeaderSearch::LookupSubframeworkHeader( // File Info Management. //===--===// +static bool +headerFileInfoModuleBitsMatchRole(const HeaderFileInfo *HFI, +

[clang] [clang-tools-extra] [PAC][clang] Define `PointerAuthQualifier` and `PointerAuthenticationMode` (PR #84384)

2024-04-17 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/84384 >From ef23d427b48687b62da9e1062886ddfcc1649b6a Mon Sep 17 00:00:00 2001 From: John McCall Date: Mon, 16 Dec 2019 20:31:25 -0500 Subject: [PATCH 1/8] Abstract serialization fixes for the Apple Clang changes. ---

[clang] [llvm] [SPIRV][HLSL] map lerp to Fmix (PR #88976)

2024-04-17 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/88976 >From 4ba820a9a0fac5417d133c607df9854a43368356 Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Tue, 16 Apr 2024 15:28:25 -0400 Subject: [PATCH 1/3] [SPIRV][HLSL] map lerp to Fmix --- clang/lib/CodeGen/CGBuilt

[clang] [clang-tools-extra] [PAC][clang] Define `PointerAuthQualifier` and `PointerAuthenticationMode` (PR #84384)

2024-04-17 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: I've fixed the build failure https://buildkite.com/llvm-project/github-pull-requests/builds/55986 in clang-tidy by only taking fast qualifiers from the `uint64_t` opaque value and casting the value to `unsigned` - see e3cb910ebce1ffa187816a20ce52e6303799665a. It should be OK t

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-17 Thread Connor Sughrue via cfe-commits
@@ -0,0 +1,157 @@ +//=== Frontend.cpp ===// +// +// 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: Ap

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-17 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/88865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] Apply modernize-use-starts-ends-with on llvm-project (PR #89140)

2024-04-17 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank created https://github.com/llvm/llvm-project/pull/89140 Run `modernize-use-starts-ends-with` on llvm-project. Two instances are flagged, minor readability improvements, extremely minor performance improvements. ``` python3 clang-tools-extra/clang-tidy/tool/run-clan

[clang-tools-extra] [llvm] Apply modernize-use-starts-ends-with on llvm-project (PR #89140)

2024-04-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-support Author: Nicolas van Kempen (nicovank) Changes Run `modernize-use-starts-ends-with` on llvm-project. Two instances are flagged, minor readability improvements, extremely minor performance improvements. ``` python3 clang-tools-extra/clang-t

[clang-tools-extra] [llvm] Apply modernize-use-starts-ends-with on llvm-project (PR #89140)

2024-04-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Nicolas van Kempen (nicovank) Changes Run `modernize-use-starts-ends-with` on llvm-project. Two instances are flagged, minor readability improvements, extremely minor performance improvements. ``` python3 clang-tools-extra/cl

[clang] [clang-tools-extra] [PAC][clang] Define `PointerAuthQualifier` and `PointerAuthenticationMode` (PR #84384)

2024-04-17 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: @AaronBallman See test results from compile-time-tracker here: https://llvm-compile-time-tracker.com/compare.php?from=693a458287d019c5c6a66fe3019d099df2978cdb&to=dbb5e29d136a18060ba6759b328ad80fa9cea649. It looks like that there is a statistically meaningful difference, but it's

[clang] [llvm] [SpecialCaseList] Use glob by default (PR #74809)

2024-04-17 Thread Fangrui Song via cfe-commits
MaskRay wrote: > FTR, got an internal report about this. Luckily it was my turn to catch new > bugs and I recognized the issue. > > @MaskRay Is it too late to add a Release Note for LLVM 18? If it is not too late, #89141 will add it to `release/18.x`. https://github.com/llvm/llvm-project/pull

<    1   2   3   4   5   >