[clang-tools-extra] [clang] [Clang][NFC] Rename CXXMethodDecl::isPure -> is VirtualPure (PR #78463)

2024-01-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. I might suggest `isPureVirtual` as it better reflects the 'term of art' (https://en.cppreference.com/w/cpp/language/abstract_class see 'A pure virtual function is a). Else LG and SG TM. https://github.com/llvm/llvm-project/pull/78

[clang-tools-extra] [clang] [Clang][NFC] Rename CXXMethodDecl::isPure -> is VirtualPure (PR #78463)

2024-01-17 Thread Paul T Robinson via cfe-commits
pogo59 wrote: I think "pure virtual" is a more common phrasing than "virtual pure" so maybe `isPureVirtual` instead? Up to Aaron, though. https://github.com/llvm/llvm-project/pull/78463 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Erich Keane via cfe-commits
@@ -11792,6 +11792,26 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Erich Keane via cfe-commits
@@ -11792,6 +11792,26 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-17 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok edited https://github.com/llvm/llvm-project/pull/76976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-17 Thread Mital Ashok via cfe-commits
@@ -1561,16 +1577,21 @@ llvm::Value *CodeGenFunction::EmitCXXNewExpr(const CXXNewExpr *E) { // 1. Build a call to the allocation function. FunctionDecl *allocator = E->getOperatorNew(); - // If there is a brace-initializer, cannot allocate fewer elements than inits. +

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From b080d04eb30254502ccd5d59d76b5197db1fa88d Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 01/10] add warning and test --- clang/include/clang/Basic/Diagnostic

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-17 Thread Mital Ashok via cfe-commits
@@ -1073,7 +1075,7 @@ void CodeGenFunction::EmitNewArrayInitializer( return; } -InitListElements = ILE->getNumInits(); +InitListElements = ILE ? ILE->getNumInits() : CPLIE->getInitExprs().size(); MitalAshok wrote: ```suggestion ArrayRef

[clang-tools-extra] [clangd] Don't collect templated decls for builtin templates (PR #78466)

2024-01-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Younan Zhang (zyn0217) Changes Builtin templates e.g. `__make_integer_seq`, `__type_pack_element` are such that they don't have alias *Decls*. [D133262](https://reviews.llvm.org/D133262) marked these as alias templates, resulting in an a

[clang-tools-extra] [clangd] Don't collect templated decls for builtin templates (PR #78466)

2024-01-17 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/78466 Builtin templates e.g. `__make_integer_seq`, `__type_pack_element` are such that they don't have alias *Decls*. [D133262](https://reviews.llvm.org/D133262) marked these as alias templates, resulting in an attemp

[clang] [clang-tools-extra] [Clang][NFC] Rename CXXMethodDecl::isPure -> is VirtualPure (PR #78463)

2024-01-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes To avoid any possible confusion with the notion of pure function and the gnu::pure attribute. --- Patch is 27.47 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/7846

[clang-tools-extra] [clang] [Clang][NFC] Rename CXXMethodDecl::isPure -> is VirtualPure (PR #78463)

2024-01-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-debuginfo @llvm/pr-subscribers-clang-tidy Author: cor3ntin (cor3ntin) Changes To avoid any possible confusion with the notion of pure function and the gnu::pure attribute. --- Patch is 27.47 KiB, truncated to 20.00 KiB below, full version: https://gi

[clang-tools-extra] [clang] [Clang][NFC] Rename CXXMethodDecl::isPure -> is VirtualPure (PR #78463)

2024-01-17 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/78463 To avoid any possible confusion with the notion of pure function and the gnu::pure attribute. >From dccf65bc3771b1885c70e47e7d786c662c7f4fd3 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 17 Jan 2024

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From b080d04eb30254502ccd5d59d76b5197db1fa88d Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 1/9] add warning and test --- clang/include/clang/Basic/DiagnosticGr

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From b080d04eb30254502ccd5d59d76b5197db1fa88d Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 1/8] add warning and test --- clang/include/clang/Basic/DiagnosticGr

[clang-tools-extra] [clang] [lldb] [polly] [libcxx] [llvm] [mlir] [compiler-rt] [libunwind] [libc] [libcxxabi] [flang] [libc++][any] LWG3305: `any_cast` (PR #78215)

2024-01-17 Thread Mark de Wever via cfe-commits
mordante wrote: > > I see you implemented this code only for C++26. In general we retroactively > > apply LWG issues to all previous standard versions. Is there a reason why > > you only applied this to C++26? > > I am not familiar with this process. I'm happy to do what's needed to be > done

[clang] [lldb] [libcxx] [llvm] [compiler-rt] [libc] [flang] [clang] Fix assertion failure with deleted overloaded unary operators (PR #78316)

2024-01-17 Thread Mariya Podchishchaeva via cfe-commits
@@ -14310,8 +14310,8 @@ Sema::CreateOverloadedUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, PartialDiagnosticAt(OpLoc, PDiag(diag::err_ovl_deleted_oper) << UnaryOperator::getOpcodeStr(Opc)

[flang] [llvm] [clang] [AArch64][Driver] Better handling of target feature dependencies (PR #78270)

2024-01-17 Thread Tomas Matheson via cfe-commits
@@ -150,3 +153,137 @@ void AArch64::PrintSupportedExtensions(StringMap DescMap) { } } } + +const llvm::AArch64::ExtensionInfo & +lookupExtensionByID(llvm::AArch64::ArchExtKind ExtID) { + for (const auto &E : llvm::AArch64::Extensions) +if (E.ID == ExtID) + retu

[flang] [clang] [llvm] [AArch64][Driver] Better handling of target feature dependencies (PR #78270)

2024-01-17 Thread Tomas Matheson via cfe-commits
@@ -3,15 +3,14 @@ // FEAT_ITE is optional (off by default) for v8.9a/9.4a and older, and can be enabled using +ite // RUN: %clang -### --target=aarch64-none-elf -march=armv8.8-a %s 2>&1 | FileCheck %s --check-prefix=NOT_ENABLED // RUN: %clang -### --target=aarch64-none-

[clang] [llvm] [flang] [AArch64][Driver] Better handling of target feature dependencies (PR #78270)

2024-01-17 Thread Tomas Matheson via cfe-commits
@@ -1,20 +1,21 @@ // RAS is off by default for v8a, but can be enabled by +ras (this is not architecturally valid) // RUN: %clang --target=aarch64-none-elf -march=armv8a+ras -### -c %s 2>&1 | FileCheck --check-prefix=CHECK-RAS %s +// RUN: %clang --target=aarch64-none-elf -marc

[llvm] [clang] [flang] [AArch64][Driver] Better handling of target feature dependencies (PR #78270)

2024-01-17 Thread Tomas Matheson via cfe-commits
@@ -308,6 +312,104 @@ inline constexpr ExtensionInfo Extensions[] = { }; // clang-format on +struct ExtensionSet { + // Set of extensions which are currently enabled. + ExtensionBitset Enabled; + // Set of extensions which have been enabled or disabled at any point. Used +

[llvm] [clang] [flang] [AArch64][Driver] Better handling of target feature dependencies (PR #78270)

2024-01-17 Thread Tomas Matheson via cfe-commits
@@ -1,49 +1,51 @@ // RUN: %clang -target aarch64-linux-gnu -march=armv8-a+sme %s -### 2>&1 | FileCheck %s --check-prefix=SME-IMPLY -// SME-IMPLY: "-target-feature" "+sme" "-target-feature" "+bf16" +// SME-IMPLY: "-target-feature" "+bf16"{{.*}} "-target-feature" "+sme" // RUN:

[flang] [clang] [llvm] [AArch64][Driver] Better handling of target feature dependencies (PR #78270)

2024-01-17 Thread Tomas Matheson via cfe-commits
@@ -711,10 +819,10 @@ StringRef getArchExtFeature(StringRef ArchExt); StringRef resolveCPUAlias(StringRef CPU); // Information by Name -std::optional getArchForCpu(StringRef CPU); tmatheson-arm wrote: Why the switch back to raw pointers from std::optional? Th

[llvm] [clang] [flang] [AArch64][Driver] Better handling of target feature dependencies (PR #78270)

2024-01-17 Thread Tomas Matheson via cfe-commits
@@ -150,3 +153,137 @@ void AArch64::PrintSupportedExtensions(StringMap DescMap) { } } } + +const llvm::AArch64::ExtensionInfo & +lookupExtensionByID(llvm::AArch64::ArchExtKind ExtID) { + for (const auto &E : llvm::AArch64::Extensions) +if (E.ID == ExtID) + retu

[llvm] [flang] [clang] [AArch64][Driver] Better handling of target feature dependencies (PR #78270)

2024-01-17 Thread Tomas Matheson via cfe-commits
@@ -1,9 +1,9 @@ // RUN: %clang -### --target=aarch64-none-elf -march=armv8.4a+memtag %s 2>&1 | FileCheck %s // RUN: %clang -### --target=aarch64-none-elf -march=armv8.5a+memtag %s 2>&1 | FileCheck %s +// RUN: %clang -### --target=aarch64-none-elf -mcpu=cortex-a510 %s 2>&1 | F

[llvm] [clang] [flang] [AArch64][Driver] Better handling of target feature dependencies (PR #78270)

2024-01-17 Thread Tomas Matheson via cfe-commits
@@ -150,3 +153,137 @@ void AArch64::PrintSupportedExtensions(StringMap DescMap) { } } } + +const llvm::AArch64::ExtensionInfo & +lookupExtensionByID(llvm::AArch64::ArchExtKind ExtID) { + for (const auto &E : llvm::AArch64::Extensions) +if (E.ID == ExtID) + retu

[clang] [llvm] [flang] [AArch64][Driver] Better handling of target feature dependencies (PR #78270)

2024-01-17 Thread Tomas Matheson via cfe-commits
@@ -1,25 +1,25 @@ // RUN: %clang --target=aarch64 -### -c %s 2>&1 | FileCheck -check-prefix=GENERIC-V8A %s // RUN: %clang --target=aarch64 -march=armv8-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERIC-V8A %s -// GENERIC-V8A: "-cc1"{{.*}} "-triple" "aarch64{{(--)?}}"{{.*}} "

[llvm] [clang] [flang] [AArch64][Driver] Better handling of target feature dependencies (PR #78270)

2024-01-17 Thread Tomas Matheson via cfe-commits
@@ -150,3 +153,137 @@ void AArch64::PrintSupportedExtensions(StringMap DescMap) { } } } + +const llvm::AArch64::ExtensionInfo & +lookupExtensionByID(llvm::AArch64::ArchExtKind ExtID) { + for (const auto &E : llvm::AArch64::Extensions) +if (E.ID == ExtID) + retu

[flang] [clang] [llvm] [AArch64][Driver] Better handling of target feature dependencies (PR #78270)

2024-01-17 Thread Tomas Matheson via cfe-commits
@@ -1,20 +1,21 @@ // RAS is off by default for v8a, but can be enabled by +ras (this is not architecturally valid) // RUN: %clang --target=aarch64-none-elf -march=armv8a+ras -### -c %s 2>&1 | FileCheck --check-prefix=CHECK-RAS %s +// RUN: %clang --target=aarch64-none-elf -marc

[llvm] [clang] [flang] [AArch64][Driver] Better handling of target feature dependencies (PR #78270)

2024-01-17 Thread Tomas Matheson via cfe-commits
@@ -308,6 +312,104 @@ inline constexpr ExtensionInfo Extensions[] = { }; // clang-format on +struct ExtensionSet { + // Set of extensions which are currently enabled. + ExtensionBitset Enabled; + // Set of extensions which have been enabled or disabled at any point. Used +

[llvm] [clang] [flang] [AArch64][Driver] Better handling of target feature dependencies (PR #78270)

2024-01-17 Thread Tomas Matheson via cfe-commits
@@ -3,8 +3,7 @@ // FEAT_D128 is optional (off by default) for v9.4a and older, and can be enabled using +d128 // RUN: %clang -### --target=aarch64-none-elf -march=armv9.4-a%s 2>&1 | FileCheck %s --check-prefix=NOT_ENABLED // RUN: %clang -### --target=aarch64-none-elf

[clang] [flang] [llvm] [AArch64][Driver] Better handling of target feature dependencies (PR #78270)

2024-01-17 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm commented: This looks like a great improvement over the existing system to me. https://github.com/llvm/llvm-project/pull/78270 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[llvm] [flang] [clang] [AArch64][Driver] Better handling of target feature dependencies (PR #78270)

2024-01-17 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm edited https://github.com/llvm/llvm-project/pull/78270 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [flang] [compiler-rt] [lldb] [llvm] [clang] [libc] [clang] Fix assertion failure with deleted overloaded unary operators (PR #78316)

2024-01-17 Thread Mariya Podchishchaeva via cfe-commits
@@ -14306,12 +14306,17 @@ Sema::CreateOverloadedUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, return ExprError(); case OR_Deleted: +// CreateOverloadedUnaryOp fills first element of ArgsArray with the object +// whose method was called. Later in NoteCandi

[compiler-rt] [lldb] [flang] [llvm] [libcxx] [clang] [libc] [clang] Fix assertion failure with deleted overloaded unary operators (PR #78316)

2024-01-17 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/78316 >From cf33d7ce01aafe0fa29b8a38a9824a0b03d24f05 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Tue, 16 Jan 2024 09:16:10 -0800 Subject: [PATCH 1/4] [clang] Fix assertion failure with deleted overl

[llvm] [clang] [flang] [AArch64][Driver] Better handling of target feature dependencies (PR #78270)

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

[compiler-rt] [clang] [clang-tools-extra] [PGO] Reland PGO's Counter Reset and File Dumping APIs #76471 (PR #78285)

2024-01-17 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/78285 >From ebae7155814ad83ebd1a0159b86550c14c72b2b6 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Fri, 12 Jan 2024 11:45:50 -0500 Subject: [PATCH 1/2] Reland https://github.com/llvm/llvm-project/pull/76471 --- .

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-17 Thread Jimmy Z via cfe-commits
https://github.com/jimmy-zx updated https://github.com/llvm/llvm-project/pull/77269 >From a5379ca876d9531d48b37b9ad9c864db98c7dcd6 Mon Sep 17 00:00:00 2001 From: Jimmy Z <51149050+jimmy...@users.noreply.github.com> Date: Mon, 8 Jan 2024 04:36:27 + Subject: [PATCH 1/2] [libclang/python] Expos

[clang] [libunwind] [llvm] [mlir] [lldb] [libc] [flang] [polly] [libcxx] [compiler-rt] [clang-tools-extra] [libcxxabi] [libc++][any] LWG3305: `any_cast` (PR #78215)

2024-01-17 Thread Hristo Hristov via cfe-commits
https://github.com/H-G-Hristov updated https://github.com/llvm/llvm-project/pull/78215 >From 328c55879848d98a9bc068436d959b409b239bcc Mon Sep 17 00:00:00 2001 From: Zingam Date: Thu, 11 Jan 2024 09:46:26 +0200 Subject: [PATCH 1/2] [libc++][any] LWG3305: `any_cast` Implements: https://wg21.link

[clang] [flang] [llvm] [AArch64][Driver] Better handling of target feature dependencies (PR #78270)

2024-01-17 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/78270 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #75647)

2024-01-17 Thread Krzysztof Drewniak via cfe-commits
krzysz00 wrote: "dispatch size"? https://github.com/llvm/llvm-project/pull/75647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [clang] [flang] [llvm] [libcxx] [clang-tools-extra] [libc] [libc++] Implement LWG3940: std::expected::value() also needs E to be copy constructible (PR #71819)

2024-01-17 Thread via cfe-commits
huixie90 wrote: LGTM. @mordante could you please have another look if the current state addressed your concerns? https://github.com/llvm/llvm-project/pull/71819 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [flang] [flang][driver] Allow explicit specification of -lFortran_main (PR #78152)

2024-01-17 Thread Kelvin Li via cfe-commits
kkwli wrote: > > How would `flang-new -fno-fortran-main t.f -lFortran_main` work? > > This works because I only remove `-lFortran_main` when it is going to be > added implicitly. `-fno-fortran-main` ensures that we never reach this > branch. I've added a test to verify this. I don't know what

[clang] [clang-tools-extra] [llvm] [AMDGPU] Src1 of VOP3 DPP instructions can be SGPR on GFX12 (PR #77929)

2024-01-17 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed https://github.com/llvm/llvm-project/pull/77929 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-17 Thread Erich Keane via cfe-commits
@@ -7081,10 +7085,10 @@ QualType TreeTransform::TransformAttributedType( // FIXME: dependent operand expressions? if (getDerived().AlwaysRebuild() || modifiedType != oldType->getModifiedType()) { -// TODO: this is really lame; we should really be rebuilding the -

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-17 Thread Aaron Ballman via cfe-commits
@@ -7081,10 +7085,10 @@ QualType TreeTransform::TransformAttributedType( // FIXME: dependent operand expressions? if (getDerived().AlwaysRebuild() || modifiedType != oldType->getModifiedType()) { -// TODO: this is really lame; we should really be rebuilding the -

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Erich Keane via cfe-commits
@@ -11792,6 +11792,32 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] [llvm] [Clang] Update Unicode version to 15.1 (PR #77147)

2024-01-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/77147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread via cfe-commits
https://github.com/kelbon edited https://github.com/llvm/llvm-project/pull/78200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread via cfe-commits
https://github.com/kelbon edited https://github.com/llvm/llvm-project/pull/78200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread via cfe-commits
@@ -11792,6 +11792,32 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Erich Keane via cfe-commits
@@ -11792,6 +11792,32 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread via cfe-commits
@@ -11792,6 +11792,32 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] [flang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-01-17 Thread Kelvin Li via cfe-commits
kkwli wrote: > My plan is the following: > > * Try to fix isysroot.f90 test by making DEFAULT_SYSROOT a LIT "feature". > > * Keep using -isysroot on Flang's tests, on Darwin, as it seems to be the > recommended way to select an SDK. > > * Add support for -sysroot. > > > Does it

[clang] [llvm] [RISCV] Add experimental support of Zaamo and Zalrsc (PR #77424)

2024-01-17 Thread Alex Bradbury via cfe-commits
asb wrote: CC @jyknight who can hopefully confirm if my interpretation is correct. Based on your comment on #77814, perhaps the expectation is that libatomic would have a lock-free implementation for any __sync calls used up to the max atomic width (e.g. lr/sc based if there's no AMO instructi

[flang] [llvm] [clang] [clang-tools-extra] [flang] add SYSTEM runtime and lowering intrinsics support (PR #74309)

2024-01-17 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/74309 >From 14f8c3e38791cc6b06455b8beffe37a6f7105e03 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 4 Dec 2023 10:32:03 + Subject: [PATCH 01/17] Add SYSTEM runtime and lowering intrinsic support Calls std::syst

[clang] [flang] [llvm] [clang-tools-extra] [flang] add SYSTEM runtime and lowering intrinsics support (PR #74309)

2024-01-17 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/74309 >From 14f8c3e38791cc6b06455b8beffe37a6f7105e03 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 4 Dec 2023 10:32:03 + Subject: [PATCH 01/16] Add SYSTEM runtime and lowering intrinsic support Calls std::syst

[compiler-rt] [llvm] [clang] [clang-tools-extra] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2024-01-17 Thread via cfe-commits
@@ -35,20 +36,32 @@ class InstrProfCorrelator { /// correlate. enum ProfCorrelatorKind { NONE, DEBUG_INFO, BINARY }; + struct WarningCounter { zmodem wrote: Could the WarningCounter refactoring be split out and landed separately? https://github.com/llvm

[compiler-rt] [llvm] [clang] [clang-tools-extra] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2024-01-17 Thread via cfe-commits
@@ -42,6 +43,21 @@ template BuildIDRef getBuildID(const ELFFile &Obj) { return {}; } +BuildIDRef getBuildID(const COFFObjectFile *Obj) { zmodem wrote: Could this (the ability to extract a build id from pe/coff) be split out and landed separately? https:

[clang] [clang-tools-extra] [llvm] [compiler-rt] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2024-01-17 Thread via cfe-commits
@@ -0,0 +1,41 @@ +// REQUIRES: target={{.*windows-msvc.*}} zmodem wrote: Do we need this? I think tests in the Windows/ dir will only run on windows hosts anyway. https://github.com/llvm/llvm-project/pull/75957 ___ cf

[clang-tools-extra] [compiler-rt] [clang] [llvm] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2024-01-17 Thread via cfe-commits
@@ -0,0 +1,33 @@ +// Test llvm-profdata merging with multiple correlation files mixing different correlation modes. + +// RUN: %clang_pgogen -o %t.normal -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-fo

[compiler-rt] [llvm] [clang] [clang-tools-extra] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2024-01-17 Thread via cfe-commits
@@ -0,0 +1,33 @@ +// Test llvm-profdata merging with multiple correlation files mixing different correlation modes. + +// RUN: %clang_pgogen -o %t.normal -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-fo

[clang] [Clang] Implement CWG2598: Union of non-literal types (PR #78195)

2024-01-17 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > @groundswellaudio actually, that should be fixed by > https://github.com/llvm/llvm-project/pull/77753 @Fznamznon Can you confirm? Yes, it does make an error to go away. However the function `foo` from the [code](https://github.com/llvm/llvm-project/pull/78195#issuecomment-18

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-17 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= ,

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Erich Keane via cfe-commits
@@ -11792,6 +11792,32 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Erich Keane via cfe-commits
@@ -11792,6 +11792,32 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] [flang] [llvm] [clang-tools-extra] [flang] add SYSTEM runtime and lowering intrinsics support (PR #74309)

2024-01-17 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/74309 >From 14f8c3e38791cc6b06455b8beffe37a6f7105e03 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 4 Dec 2023 10:32:03 + Subject: [PATCH 01/15] Add SYSTEM runtime and lowering intrinsic support Calls std::syst

[clang] [llvm] [clang][Driver] Don't ignore -gmodules .gch files (PR #77711)

2024-01-17 Thread Jake Egan via cfe-commits
jakeegan wrote: Hi, on AIX we are seeing ``` error: input is not a PCH file: '/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/PCH/Output/gch-probe.c.tmp.h.gch' fatal error: file '/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/PCH/O

[clang] [Clang] Implement CWG2598: Union of non-literal types (PR #78195)

2024-01-17 Thread via cfe-commits
cor3ntin wrote: @groundswellaudio actually, that should be fixed by https://github.com/llvm/llvm-project/pull/77753 @Fznamznon Can you confirm? https://github.com/llvm/llvm-project/pull/78195 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Aaron Ballman via cfe-commits
@@ -11792,6 +11792,32 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-01-17 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan updated https://github.com/llvm/llvm-project/pull/78445 >From 6fdb42e20cc07a2f378239c6b7c6182e42544f18 Mon Sep 17 00:00:00 2001 From: Egor Zhdan Date: Wed, 17 Jan 2024 13:41:25 + Subject: [PATCH] [APINotes] Upstream Sema logic to apply API Notes to decls This u

[clang] [Clang] Implement CWG2598: Union of non-literal types (PR #78195)

2024-01-17 Thread via cfe-commits
cor3ntin wrote: @groundswellaudio Thanks for letting me know. can you create a separate issue ? https://github.com/llvm/llvm-project/pull/78195 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [clang][ExtractAPI] Record availability information only for the target platform (PR #76823)

2024-01-17 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg approved this pull request. https://github.com/llvm/llvm-project/pull/76823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-17 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= ,

[clang] [lld] [flang] [llvm] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-01-17 Thread Konstantin Zhuravlyov via cfe-commits
@@ -253,6 +274,12 @@ AMDGPU::IsaVersion AMDGPU::getIsaVersion(StringRef GPU) { case GK_GFX1151: return {11, 5, 1}; case GK_GFX1200: return {12, 0, 0}; case GK_GFX1201: return {12, 0, 1}; + + // Generic targets use the earliest ISA version in their group.

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-17 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= ,

[clang] [lld] [flang] [llvm] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-01-17 Thread Konstantin Zhuravlyov via cfe-commits
kzhuravl wrote: @t-tye, can you please help reviewing the documentation? https://github.com/llvm/llvm-project/pull/76955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [clang-tidy] fix misc-const-correctnes false-positive for fold expressions (PR #78320)

2024-01-17 Thread Julian Schmidt via cfe-commits
@@ -382,7 +382,8 @@ Changes in existing checks using pointer to member function. Additionally, the check no longer emits a diagnostic when a variable that is not type-dependent is an operand of a type-dependent binary operator. Improved performance of the check through -

[clang] [clang-tools-extra] [clang-tidy] fix misc-const-correctnes false-positive for fold expressions (PR #78320)

2024-01-17 Thread Julian Schmidt via cfe-commits
5chmidti wrote: I fixed the clang-tidy test case by separating them and I have added a test case to check that using a variable in the pack side of the fold expression would be detected (that did not change with this patch though, just as a sanity check). https://github.com/llvm/llvm-project/

[clang-tools-extra] [llvm] [clang] [AMDGPU] CodeGen for GFX12 S_WAIT_* instructions (PR #77438)

2024-01-17 Thread Jay Foad via cfe-commits
jayfoad wrote: @Pierre-vh @arsen ping! (Sorry, I know it has only been a few days.) https://github.com/llvm/llvm-project/pull/77438 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] fix misc-const-correctnes false-positive for fold expressions (PR #78320)

2024-01-17 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/78320 >From 1951630fd6a0edc5258f5a775c95b9e9c30106df Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Sat, 28 Oct 2023 18:39:18 +0200 Subject: [PATCH 1/3] [clang-tidy] fi

[clang] [lld] [flang] [llvm] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-01-17 Thread Konstantin Zhuravlyov via cfe-commits
kzhuravl wrote: @AlexVlx, can you please go over versioning? https://github.com/llvm/llvm-project/pull/76955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Record availability information only for the target platform (PR #76823)

2024-01-17 Thread Daniel Grumberg via cfe-commits
@@ -16,67 +16,61 @@ #define LLVM_CLANG_EXTRACTAPI_AVAILABILITY_INFO_H #include "clang/AST/Decl.h" -#include "llvm/ADT/SmallVector.h" #include "llvm/Support/Error.h" #include "llvm/Support/VersionTuple.h" #include "llvm/Support/raw_ostream.h" - -using llvm::VersionTuple; +#i

[clang] [lld] [flang] [llvm] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-01-17 Thread Konstantin Zhuravlyov via cfe-commits
kzhuravl wrote: > @arsenm Hi, can you take a look - especially on the testing? I don't know if > this is tested well enough I have not looked at the tests thoroughly. Would adding tests that make sure trimmed features are not used in generics be beneficial? E.g. testing that generic-gfx9 does

[clang] [Clang] NFC: Move Arm type attributes to separate trailing object. (PR #78424)

2024-01-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! Thank you! https://github.com/llvm/llvm-project/pull/78424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread via cfe-commits
https://github.com/kelbon edited https://github.com/llvm/llvm-project/pull/78200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Add a interpreter-specific overload of operator new for C++ (PR #76218)

2024-01-17 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/76218 >From 9d24f6d18450ba035279945bb8bb780c1a1f126f Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Fri, 22 Dec 2023 08:38:23 + Subject: [PATCH] [clang-repl] Add a interpreter-specific overload of operator

[clang] [clang][dataflow] Consider `CXXDefaultInitExpr` to be an "original record ctor". (PR #78423)

2024-01-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/78423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread via cfe-commits
@@ -11792,6 +11792,32 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] [flang] [llvm] [AArch64][Driver] Better handling of target feature dependencies (PR #78270)

2024-01-17 Thread David Spickett via cfe-commits
@@ -308,6 +312,104 @@ inline constexpr ExtensionInfo Extensions[] = { }; // clang-format on +struct ExtensionSet { + // Set of extensions which are currently enabled. + ExtensionBitset Enabled; + // Set of extensions which have been enabled or disabled at any point. Used +

[clang] [clang-repl] Add a interpreter-specific overload of operator new for C++ (PR #76218)

2024-01-17 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo approved this pull request. Looks good (sorry, this fell through) https://github.com/llvm/llvm-project/pull/76218 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [lld] [flang] [llvm] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-01-17 Thread Konstantin Zhuravlyov via cfe-commits
@@ -280,6 +295,11 @@ def : ProcessorModel<"gfx1151", GFX11SpeedModel, FeatureISAVersion11_5_1.Features >; +// [gfx1100, gfx1101, gfx1102, gfx1103, 1150, 1151] kzhuravl wrote: gfx1150, gfx1151 https://github.com/llvm/llvm-project/pull/76955

[lld] [clang] [flang] [llvm] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-01-17 Thread Konstantin Zhuravlyov via cfe-commits
@@ -787,11 +788,15 @@ enum : unsigned { EF_AMDGPU_MACH_AMDGCN_GFX942= 0x04c, EF_AMDGPU_MACH_AMDGCN_RESERVED_0X4D = 0x04d, EF_AMDGPU_MACH_AMDGCN_GFX1201 = 0x04e, + EF_AMDGPU_MACH_AMDGCN_GFX9_GENERIC = 0x04f, kzhuravl wrote: If you coul

[lld] [llvm] [flang] [clang] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-01-17 Thread Konstantin Zhuravlyov via cfe-commits
@@ -253,6 +274,12 @@ AMDGPU::IsaVersion AMDGPU::getIsaVersion(StringRef GPU) { case GK_GFX1151: return {11, 5, 1}; case GK_GFX1200: return {12, 0, 0}; case GK_GFX1201: return {12, 0, 1}; + + // Generic targets use the earliest ISA version in their group.

[flang] [clang] [lld] [llvm] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-01-17 Thread Konstantin Zhuravlyov via cfe-commits
@@ -787,11 +788,15 @@ enum : unsigned { EF_AMDGPU_MACH_AMDGCN_GFX942= 0x04c, EF_AMDGPU_MACH_AMDGCN_RESERVED_0X4D = 0x04d, EF_AMDGPU_MACH_AMDGCN_GFX1201 = 0x04e, + EF_AMDGPU_MACH_AMDGCN_GFX9_GENERIC = 0x04f, + EF_AMDGPU_MACH_AMDGCN_GFX10_1_GENERIC =

[llvm] [flang] [clang] [lld] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-01-17 Thread Konstantin Zhuravlyov via cfe-commits
@@ -49,6 +49,11 @@ constexpr uint32_t VersionMajorV5 = 1; /// HSA metadata minor version for code object V5. constexpr uint32_t VersionMinorV5 = 2; +/// HSA metadata major version for code object V5. +constexpr uint32_t VersionMajorV6 = 1; +/// HSA metadata minor version for c

[clang] [lld] [llvm] [flang] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-01-17 Thread Konstantin Zhuravlyov via cfe-commits
@@ -280,6 +295,11 @@ def : ProcessorModel<"gfx1151", GFX11SpeedModel, FeatureISAVersion11_5_1.Features >; +// [gfx1100, gfx1101, gfx1102, gfx1103, 1150, 1151] +def : ProcessorModel<"gfx11-generic", GFX11SpeedModel, + FeatureISAVersion11_Generic.Features +>; + //===---

[clang] [lld] [flang] [llvm] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-01-17 Thread Konstantin Zhuravlyov via cfe-commits
@@ -787,11 +788,15 @@ enum : unsigned { EF_AMDGPU_MACH_AMDGCN_GFX942= 0x04c, EF_AMDGPU_MACH_AMDGCN_RESERVED_0X4D = 0x04d, EF_AMDGPU_MACH_AMDGCN_GFX1201 = 0x04e, + EF_AMDGPU_MACH_AMDGCN_GFX9_GENERIC = 0x04f, + EF_AMDGPU_MACH_AMDGCN_GFX10_1_GENERIC =

[lld] [clang] [llvm] [flang] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-01-17 Thread Konstantin Zhuravlyov via cfe-commits
@@ -49,6 +49,11 @@ constexpr uint32_t VersionMajorV5 = 1; /// HSA metadata minor version for code object V5. constexpr uint32_t VersionMinorV5 = 2; +/// HSA metadata major version for code object V5. kzhuravl wrote: Typo, did you mean V6? https://github.com/

[flang] [clang] [lld] [llvm] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-01-17 Thread Konstantin Zhuravlyov via cfe-commits
@@ -787,11 +788,15 @@ enum : unsigned { EF_AMDGPU_MACH_AMDGCN_GFX942= 0x04c, EF_AMDGPU_MACH_AMDGCN_RESERVED_0X4D = 0x04d, EF_AMDGPU_MACH_AMDGCN_GFX1201 = 0x04e, + EF_AMDGPU_MACH_AMDGCN_GFX9_GENERIC = 0x04f, kzhuravl wrote: 0x04f is al

<    1   2   3   4   5   6   >