[llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-05 Thread Ellis Hoag via cfe-commits
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject , GlobalValue::LinkageTypes Linkage, StringRef FileName) { SmallString<64> Name; - if (llvm::GlobalValue::isLocalLinkage(Linkage)) { -

[llvm] [clang] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)

2023-12-05 Thread Nikita Popov via cfe-commits
@@ -343,7 +343,7 @@ static bool verifyTripCount(Value *RHS, Loop *L, // If the RHS of the compare is equal to the backedge taken count we need // to add one to get the trip count. if (SCEVRHS == BackedgeTCExt || SCEVRHS == BackedgeTakenCount) { - ConstantInt

[llvm] [clang] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)

2023-12-05 Thread Paul Walker via cfe-commits
@@ -343,7 +343,7 @@ static bool verifyTripCount(Value *RHS, Loop *L, // If the RHS of the compare is equal to the backedge taken count we need // to add one to get the trip count. if (SCEVRHS == BackedgeTCExt || SCEVRHS == BackedgeTakenCount) { - ConstantInt

[llvm] [clang] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)

2023-12-05 Thread Paul Walker via cfe-commits
@@ -98,6 +99,13 @@ class ConstantInt final : public ConstantData { /// value. Otherwise return a ConstantInt for the given value. static Constant *get(Type *Ty, uint64_t V, bool IsSigned = false); + /// WARNING: Incomplete support, do not use. These methods exist for

[llvm] [clang] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)

2023-12-05 Thread Paul Walker via cfe-commits
@@ -136,7 +144,11 @@ class ConstantInt final : public ConstantData { inline const APInt () const { return Val; } /// getBitWidth - Return the bitwidth of this constant. - unsigned getBitWidth() const { return Val.getBitWidth(); } + unsigned getBitWidth() const { +

[lld] [llvm] [clang-tools-extra] [compiler-rt] [clang] [lldb] [flang] [libc] [libcxx] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-12-05 Thread Tom Honermann via cfe-commits
@@ -4114,8 +4114,26 @@ void CodeGenModule::emitMultiVersionFunctions() { } llvm::Constant *ResolverConstant = GetOrCreateMultiVersionResolver(GD); -if (auto *IFunc = dyn_cast(ResolverConstant)) +if (auto *IFunc = dyn_cast(ResolverConstant)) {

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-05 Thread Bill Wendling via cfe-commits
bwendling wrote: The problem with adding the code to `CodeGenFunction::EmitArraySubscriptExpr` is that we need to emit the counted_by "count" for more than just an `ArraySubscriptExpr`. Where `ExprLValueMap` is placed catches all of the expressions we're interested in. We're doing something

[clang-tools-extra] [mlir] [compiler-rt] [llvm] [lldb] [clang] [flang] [Profile] Add binary profile correlation for code coverage. (PR #69493)

2023-12-05 Thread Petr Hosek via cfe-commits
petrhosek wrote: Can you break up all the changes to tests that replace `-debug-info-correlate` with `--profile-correlate=debug-info` into a separate PR to reduce the size of this PR? https://github.com/llvm/llvm-project/pull/69493 ___ cfe-commits

[clang-tools-extra] [clang] [clang][tidy] Ensure rewriter has the correct CWD (PR #67839)

2023-12-05 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/67839 >From 9c798ed914b0008d98587c94f8ee3bb914412215 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Fri, 8 Sep 2023 16:39:10 -0700 Subject: [PATCH 1/3] [clang][tidy] Ensure rewriter has the correct CWD This

[clang] [OpenACC] Implement 'cache' construct parsing (PR #74324)

2023-12-05 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/74324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [mlir] [compiler-rt] [llvm] [lldb] [clang] [flang] [Profile] Add binary profile correlation for code coverage. (PR #69493)

2023-12-05 Thread Petr Hosek via cfe-commits
@@ -702,6 +708,8 @@ serializeValueProfDataFrom(ValueProfRecordClosure *Closure, #define INSTR_PROF_COVMAP_COMMON __llvm_covmap #define INSTR_PROF_COVFUN_COMMON __llvm_covfun #define INSTR_PROF_ORDERFILE_COMMON __llvm_orderfile petrhosek wrote: This just a

[clang] [OpenACC] Implement 'cache' construct parsing (PR #74324)

2023-12-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/74324 >From 31fe05335fce5f7c593e4c3f3595c548cf54bba0 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Wed, 29 Nov 2023 11:12:02 -0800 Subject: [PATCH 1/6] [OpenACC] Implement 'cache' construct parsing The 'cache'

[llvm] [clang-tools-extra] [lldb] [clang] [lldb][test] Apply @expectedFailureAll/@skipIf early for debug_info tests (PR #73067)

2023-12-05 Thread Adrian Prantl via cfe-commits
adrian-prantl wrote: Is this a performance optimization or a function al change? https://github.com/llvm/llvm-project/pull/73067 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Disable missing definition warning on pure virtual functions (PR #74510)

2023-12-05 Thread via cfe-commits
@@ -4952,7 +4952,8 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, std::make_pair(Function, PointOfInstantiation)); } else if (TSK == TSK_ImplicitInstantiation) { if (AtEndOfTU && !getDiagnostics().hasErrorOccurred() && -

[clang] [OpenACC] Implement 'cache' construct parsing (PR #74324)

2023-12-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/74324 >From 31fe05335fce5f7c593e4c3f3595c548cf54bba0 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Wed, 29 Nov 2023 11:12:02 -0800 Subject: [PATCH 1/5] [OpenACC] Implement 'cache' construct parsing The 'cache'

[clang] [clang] Strict aliasing warning ala GCC [PR50066] (PR #74155)

2023-12-05 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Making Sema pull the TBAA info out of clang/lib/CodeGen is a layering violation (and probably breaks if we aren't actually generating code). If we need some notion of "aliasing" in Sema, we should pull the relevant code into clang/lib/AST. I don't have any experience

[llvm] [clang] [RISCV] Collapse fast unaligned access into a single feature [nfc-ish] (PR #73971)

2023-12-05 Thread Nico Weber via cfe-commits
nico wrote: ref https://github.com/rust-lang/rust/pull/118610 https://github.com/llvm/llvm-project/pull/73971 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2023-12-05 Thread via cfe-commits
@@ -655,6 +655,9 @@ Bug Fixes in This Version Fixes (`#64467 `_) - Clang's ``-Wchar-subscripts`` no longer warns on chars whose values are known non-negative constants. Fixes (`#18763

[clang] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2023-12-05 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM modulo nitpick. Thanks a lot for the quick fix https://github.com/llvm/llvm-project/pull/74512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2023-12-05 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/74512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement 'cache' construct parsing (PR #74324)

2023-12-05 Thread Erich Keane via cfe-commits
@@ -268,6 +270,71 @@ ExprResult Parser::ParseOpenACCRoutineName() { return getActions().CorrectDelayedTyposInExpr(Res); } +void Parser::ParseOpenACCCacheVar() { + ExprResult ArrayName = ParseOpenACCIDExpression(); + // FIXME: Pass this to Sema. + (void)ArrayName; + + //

[clang] [OpenACC] Implement 'cache' construct parsing (PR #74324)

2023-12-05 Thread via cfe-commits
@@ -268,6 +270,71 @@ ExprResult Parser::ParseOpenACCRoutineName() { return getActions().CorrectDelayedTyposInExpr(Res); } +void Parser::ParseOpenACCCacheVar() { + ExprResult ArrayName = ParseOpenACCIDExpression(); + // FIXME: Pass this to Sema. + (void)ArrayName; + + //

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-05 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I don't like the "ExprLValueMap" approach for array bounds checking; it's fragile and doesn't handle cases we should be able to handle. In particular, we should be able to handle arbitrary base expressions for array bounds checking, I think; there should be a constant

[clang] [clang] Disable missing definition warning on pure virtual functions (PR #74510)

2023-12-05 Thread Charalampos Mitrodimas via cfe-commits
@@ -4952,7 +4952,8 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, std::make_pair(Function, PointOfInstantiation)); } else if (TSK == TSK_ImplicitInstantiation) { if (AtEndOfTU && !getDiagnostics().hasErrorOccurred() && -

[lldb] [libcxx] [clang] [clang-tools-extra] [llvm] [lld] [compiler-rt] [libc] [flang] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-12-05 Thread via cfe-commits
elizabethandrews wrote: Thanks for reviews everyone! I think I have addressed all pending comments. I will merge the PR in a couple of hours unless someone has remaining concerns. https://github.com/llvm/llvm-project/pull/71706 ___ cfe-commits

[clang] [clang] Disable missing definition warning on pure virtual functions (PR #74510)

2023-12-05 Thread Charalampos Mitrodimas via cfe-commits
@@ -0,0 +1,20 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wundefined-func-template %s +// expected-no-diagnostics + +namespace PR74016 { charmitro wrote: Fixed. I wasn't aware of this, thanks! https://github.com/llvm/llvm-project/pull/74510

[clang] [clang] Disable missing definition warning on pure virtual functions (PR #74510)

2023-12-05 Thread Charalampos Mitrodimas via cfe-commits
https://github.com/charmitro updated https://github.com/llvm/llvm-project/pull/74510 >From 0be0d65a74cf7a6a06150362b68adff122a3a39b Mon Sep 17 00:00:00 2001 From: Charalampos Mitrodimas Date: Tue, 5 Dec 2023 11:46:56 +0200 Subject: [PATCH] [clang] Disable missing definition warning on pure

[clang] [clang][NFC] Refactor expected directives in C++ DRs 600-699 (PR #74477)

2023-12-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/74477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] af03e29 - [clang][NFC] Refactor expected directives in C++ DRs 600-699 (#74477)

2023-12-05 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2023-12-05T23:49:44+04:00 New Revision: af03e2928971bbed2901e096b446e1e1a078de43 URL: https://github.com/llvm/llvm-project/commit/af03e2928971bbed2901e096b446e1e1a078de43 DIFF:

[llvm] [lldb] [flang] [lld] [libc] [clang] [compiler-rt] [clang-tools-extra] [libcxx] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-12-05 Thread via cfe-commits
https://github.com/elizabethandrews updated https://github.com/llvm/llvm-project/pull/71706 >From 534fad70af45a6a22ba2d03f474089e896f4fcd6 Mon Sep 17 00:00:00 2001 From: Elizabeth Andrews Date: Thu, 26 Oct 2023 08:53:54 -0700 Subject: [PATCH 1/5] [Clang] Fix linker error for function

[clang] [AArch64] Add soft-float ABI (PR #74460)

2023-12-05 Thread David Green via cfe-commits
@@ -534,7 +540,8 @@ Address AArch64ABIInfo::EmitAAPCSVAArg(Address VAListAddr, QualType Ty, BaseTy = ArrTy->getElementType(); NumRegs = ArrTy->getNumElements(); } - bool IsFPR = BaseTy->isFloatingPointTy() || BaseTy->isVectorTy(); + bool IsFPR = Kind ==

[clang] [AArch64] Add soft-float ABI (PR #74460)

2023-12-05 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I'm a little surprised we don't need any LLVM backend changes, but I guess in soft-float mode we basically treat floats as ints anyway, so maybe things just work. I'd like to see appropriate regression tests, though (if they don't already exist).

[clang] a855b2c - Formatting change; NFC

2023-12-05 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2023-12-05T14:43:49-05:00 New Revision: a855b2c89419c3689aff6fd0381fdeb02491 URL: https://github.com/llvm/llvm-project/commit/a855b2c89419c3689aff6fd0381fdeb02491 DIFF: https://github.com/llvm/llvm-project/commit/a855b2c89419c3689aff6fd0381fdeb02491.diff

[clang-tools-extra] [clang] [clang][tidy] Ensure rewriter has the correct CWD (PR #67839)

2023-12-05 Thread Piotr Zegar via cfe-commits
@@ -189,9 +191,12 @@ class ErrorReporter { void finish() { if (TotalFixes > 0) { - Rewriter Rewrite(SourceMgr, LangOpts); + bool AnyNotWritten = false; for (const auto : FileReplacements) { +Rewriter Rewrite(SourceMgr, LangOpts);

[clang] [clang-tools-extra] [llvm] [lldb] [lldb][test] Apply @expectedFailureAll/@skipIf early for debug_info tests (PR #73067)

2023-12-05 Thread Jordan Rupprecht via cfe-commits
rupprecht wrote: ping :) https://github.com/llvm/llvm-project/pull/73067 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [clang] [llvm] Support IFuncs on Darwin platforms (PR #73686)

2023-12-05 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/73686 >From bc152095691b32d1ad8539dfd60f5089df5eed8d Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Tue, 28 Nov 2023 10:39:44 -0800 Subject: [PATCH 1/9] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[clang] [Clang] Emit TBAA info for enums in C (PR #73326)

2023-12-05 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: The C notion of "compatibility" with regard to enums is a bit weird... clang and gcc disagree whether `enum e : int; enum e2: int; enum e x; int x; enum e2 x;` is valid because 6.2.7 doesn't actually define what's supposed to happen. Probably this should be illegal, but

[clang] [clang-tools-extra] [clang][tidy] Ensure rewriter has the correct CWD (PR #67839)

2023-12-05 Thread Jan Svoboda via cfe-commits
@@ -227,6 +227,14 @@ class ErrorReporter { llvm::errs() << "Can't apply replacements for file " << File << "\n"; } } + + auto BuildDir = Context.getCurrentBuildDirectory(); jansvoboda11 wrote: You're right, the

[clang-tools-extra] [clang] [clang][tidy] Ensure rewriter has the correct CWD (PR #67839)

2023-12-05 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/67839 >From 9c798ed914b0008d98587c94f8ee3bb914412215 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Fri, 8 Sep 2023 16:39:10 -0700 Subject: [PATCH 1/2] [clang][tidy] Ensure rewriter has the correct CWD This

[flang] [libcxx] [lldb] [clang] [compiler-rt] [lld] [mlir] [libc] [clang-tools-extra] [openmp] [llvm] [MLIR] Enable GPU Dialect to SYCL runtime integration (PR #71430)

2023-12-05 Thread Fabian Mora via cfe-commits
https://github.com/fabianmcg approved this pull request. LGTM! I'll squash and merge as soon it passes all pre check tests. https://github.com/llvm/llvm-project/pull/71430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[lld] [clang] [flang] [libcxx] [clang-tools-extra] [llvm] [compiler-rt] [lldb] [libc] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-12-05 Thread Tom Honermann via cfe-commits
@@ -2515,6 +2515,12 @@ example, the following will emit 4 versions of the function: __attribute__((target_clones("arch=atom,avx2","arch=ivybridge","default"))) void foo() {} +Dispatch is done via ``ifunc`` mechanism. The assembler name of the indirect +function is

[lldb] [compiler-rt] [libcxx] [clang] [flang] [clang-tools-extra] [llvm] [lld] [libc] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-12-05 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann edited https://github.com/llvm/llvm-project/pull/71706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [libcxx] [lldb] [clang] [compiler-rt] [lld] [libc] [clang-tools-extra] [llvm] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-12-05 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann approved this pull request. This looks good to me. I suggested some edits to the doc; take or leave as you see fit! https://github.com/llvm/llvm-project/pull/71706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [flang] [llvm] [mlir] [libcxx] [libc] [compiler-rt] [clang] [mlir][gpu] Support dynamic_shared_memory Op with vector dialect (PR #74475)

2023-12-05 Thread Guray Ozen via cfe-commits
https://github.com/grypp updated https://github.com/llvm/llvm-project/pull/74475 >From 2848c9011cb4db5e91754300eb466927738a363a Mon Sep 17 00:00:00 2001 From: Guray Ozen Date: Tue, 5 Dec 2023 15:16:20 +0100 Subject: [PATCH] [mlir][gpu] Support dynamic_shared_memory Op with vector dialect

[clang-tools-extra] [llvm] [lldb] [openmp] [lld] [libc] [flang] [mlir] [libcxx] [clang] [compiler-rt] [MLIR] Enable GPU Dialect to SYCL runtime integration (PR #71430)

2023-12-05 Thread Sang Ik Lee via cfe-commits
@@ -61,6 +63,7 @@ registerAllGPUToLLVMIRTranslations(DialectRegistry ) { registerLLVMDialectTranslation(registry); registerNVVMDialectTranslation(registry); registerROCDLDialectTranslation(registry); + registerSPIRVDialectTranslation(registry); silee2

[lld] [llvm] [lldb] [libc] [clang] [openmp] [clang-tools-extra] [flang] [compiler-rt] [libcxx] [mlir] [MLIR] Enable GPU Dialect to SYCL runtime integration (PR #71430)

2023-12-05 Thread Sang Ik Lee via cfe-commits
https://github.com/silee2 updated https://github.com/llvm/llvm-project/pull/71430 >From c76403cf8629b8f7d8a5b7a3ee5da2881713a7f8 Mon Sep 17 00:00:00 2001 From: "Lee, Sang Ik" Date: Mon, 6 Nov 2023 18:47:23 + Subject: [PATCH 1/6] [MLIR] Enable GPU Dialect to SYCL runtime integration GPU

[clang] [Driver] Add riscv64-suse-linux triple (PR #74513)

2023-12-05 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 3d21b5603835fcd1de8d0565c3324e36fed21ff1 b5bc870a7609629672f5d7a0758941f61c25115d --

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,73 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,73 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,73 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread Julian Schmidt via cfe-commits
@@ -193,6 +193,13 @@ New checks replacing with ``starts_with`` when the method exists in the class. Notably, this will work with ``std::string`` and ``std::string_view``. +- New :doc:`modernize-use-std-numbers + ` check. + + Finds constants and function calls to math

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread Julian Schmidt via cfe-commits
@@ -5,7 +5,7 @@ modernize-use-std-numbers Finds constants and function calls to math functions that can be replaced with c++20's mathematical constants from the ``numbers`` header and offers fix-it hints. -Does not match the use of variables or macros with that value and

[clang] [Driver] Add riscv64-suse-linux triple (PR #74513)

2023-12-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Andreas Schwab (andreas-schwab) Changes Fixes: 72256 --- Full diff: https://github.com/llvm/llvm-project/pull/74513.diff 1 Files Affected: - (modified) clang/lib/Driver/ToolChains/Gnu.cpp (+2-1) ``diff diff --git

[clang] [Driver] Add riscv64-suse-linux triple (PR #74513)

2023-12-05 Thread Andreas Schwab via cfe-commits
https://github.com/andreas-schwab created https://github.com/llvm/llvm-project/pull/74513 Fixes: 72256 >From b5bc870a7609629672f5d7a0758941f61c25115d Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 4 Dec 2023 15:47:24 +0100 Subject: [PATCH] [Driver] Add riscv64-suse-linux triple

[llvm] [clang] main (PR #74441)

2023-12-05 Thread Andreas Schwab via cfe-commits
https://github.com/andreas-schwab closed https://github.com/llvm/llvm-project/pull/74441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread via cfe-commits
@@ -193,6 +193,13 @@ New checks replacing with ``starts_with`` when the method exists in the class. Notably, this will work with ``std::string`` and ``std::string_view``. +- New :doc:`modernize-use-std-numbers + ` check. + + Finds constants and function calls to math

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread Julian Schmidt via cfe-commits
@@ -193,6 +193,13 @@ New checks replacing with ``starts_with`` when the method exists in the class. Notably, this will work with ``std::string`` and ``std::string_view``. +- New :doc:`modernize-use-std-numbers + ` check. + + Finds constants and function calls to math

[clang] [clang] Disable missing definition warning on pure virtual functions (PR #74510)

2023-12-05 Thread Mariya Podchishchaeva via cfe-commits
@@ -0,0 +1,20 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wundefined-func-template %s +// expected-no-diagnostics + +namespace PR74016 { Fznamznon wrote: I think we normally call them GH when a bug was filed as a GitHub issue. ```suggestion namespace GH74016 {

[clang] [clang] Disable missing definition warning on pure virtual functions (PR #74510)

2023-12-05 Thread Mariya Podchishchaeva via cfe-commits
@@ -4952,7 +4952,8 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, std::make_pair(Function, PointOfInstantiation)); } else if (TSK == TSK_ImplicitInstantiation) { if (AtEndOfTU && !getDiagnostics().hasErrorOccurred() && -

[clang] [clang] Disable missing definition warning on pure virtual functions (PR #74510)

2023-12-05 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon commented: Perhaps needs a release note. https://github.com/llvm/llvm-project/pull/74510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Disable missing definition warning on pure virtual functions (PR #74510)

2023-12-05 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited https://github.com/llvm/llvm-project/pull/74510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2023-12-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mariya Podchishchaeva (Fznamznon) Changes Shadowing warning doesn't make much sense since field is not available in lambda's body without capturing this. Fixes https://github.com/llvm/llvm-project/issues/71976 --- Full diff:

[clang] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2023-12-05 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/74512 Shadowing warning doesn't make much sense since field is not available in lambda's body without capturing this. Fixes https://github.com/llvm/llvm-project/issues/71976 >From

[clang] [llvm] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)

2023-12-05 Thread Nikita Popov via cfe-commits
@@ -343,7 +343,7 @@ static bool verifyTripCount(Value *RHS, Loop *L, // If the RHS of the compare is equal to the backedge taken count we need // to add one to get the trip count. if (SCEVRHS == BackedgeTCExt || SCEVRHS == BackedgeTakenCount) { - ConstantInt

[clang] [CUDA][Win32] Add `fma(long double,..)` to math forward declares. (PR #73756)

2023-12-05 Thread Artem Belevich via cfe-commits
@@ -70,6 +70,9 @@ __DEVICE__ double floor(double); __DEVICE__ float floor(float); __DEVICE__ double fma(double, double, double); __DEVICE__ float fma(float, float, float); +#ifdef _MSC_VER +__DEVICE__ long double fma(long double, long double, long double);

[clang] [llvm] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)

2023-12-05 Thread Nikita Popov via cfe-commits
@@ -136,7 +144,11 @@ class ConstantInt final : public ConstantData { inline const APInt () const { return Val; } /// getBitWidth - Return the bitwidth of this constant. - unsigned getBitWidth() const { return Val.getBitWidth(); } + unsigned getBitWidth() const { +

[clang] [clang] Disable missing definition warning on pure virtual functions (PR #74510)

2023-12-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Charalampos Mitrodimas (charmitro) Changes Warning '-Wundefined-func-template' incorrectly indicates that no definition is available for a pure virtual function. However, a definition is not needed for a pure virtual function. Fixes

[clang] [clang] Disable missing definition warning on pure virtual functions (PR #74510)

2023-12-05 Thread Charalampos Mitrodimas via cfe-commits
https://github.com/charmitro created https://github.com/llvm/llvm-project/pull/74510 Warning '-Wundefined-func-template' incorrectly indicates that no definition is available for a pure virtual function. However, a definition is not needed for a pure virtual function. Fixes #74016 >From

[clang] [llvm] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)

2023-12-05 Thread Nikita Popov via cfe-commits
@@ -98,6 +99,13 @@ class ConstantInt final : public ConstantData { /// value. Otherwise return a ConstantInt for the given value. static Constant *get(Type *Ty, uint64_t V, bool IsSigned = false); + /// WARNING: Incomplete support, do not use. These methods exist for

[clang] [CUDA][HIP] Exclude external variables from constant promotion. (PR #73549)

2023-12-05 Thread Artem Belevich via cfe-commits
@@ -104,3 +106,14 @@ void fun() { (void) b; (void) var_host_only; } + +extern __global__ void external_func(); +extern void* const external_dep[] = { Artem-B wrote: This array is nomiannly host-only entity and should not be emitted on GPU at all, IMO. In

[clang-tools-extra] [clang-tidy] performance-unnecessary-copy-init: Add a hook... (PR #73921)

2023-12-05 Thread Piotr Zegar via cfe-commits
@@ -32,14 +32,34 @@ class UnnecessaryCopyInitialization : public ClangTidyCheck { void check(const ast_matchers::MatchFinder::MatchResult ) override; void storeOptions(ClangTidyOptions::OptionMap ) override; +protected: + // A helper to manipulate the state common to +

[clang-tools-extra] [clang-tidy] performance-unnecessary-copy-init: Add a hook... (PR #73921)

2023-12-05 Thread Piotr Zegar via cfe-commits
@@ -290,69 +296,72 @@ void UnnecessaryCopyInitialization::check( // instantiations where the types differ and rely on implicit conversion would // no longer compile if we switched to a reference. if (differentReplacedTemplateParams( - NewVar->getType(),

[clang-tools-extra] [clang-tidy] performance-unnecessary-copy-init: Add a hook... (PR #73921)

2023-12-05 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/73921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] performance-unnecessary-copy-init: Add a hook... (PR #73921)

2023-12-05 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. https://github.com/llvm/llvm-project/pull/73921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [RISCV] Update the interface of sifive vqmaccqoq (PR #74284)

2023-12-05 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/74284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] performance-unnecessary-copy-init: Add a hook... (PR #73921)

2023-12-05 Thread Piotr Zegar via cfe-commits
@@ -261,21 +262,27 @@ void UnnecessaryCopyInitialization::registerMatchers(MatchFinder *Finder) { this); } +UnnecessaryCopyInitialization::CheckContext::CheckContext( PiotrZSL wrote: I'm not a fan of this constructor, it should exist.

[clang] [llvm] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)

2023-12-05 Thread Paul Walker via cfe-commits
@@ -343,7 +343,7 @@ static bool verifyTripCount(Value *RHS, Loop *L, // If the RHS of the compare is equal to the backedge taken count we need // to add one to get the trip count. if (SCEVRHS == BackedgeTCExt || SCEVRHS == BackedgeTakenCount) { - ConstantInt

[clang] [llvm] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)

2023-12-05 Thread Paul Walker via cfe-commits
@@ -136,7 +144,11 @@ class ConstantInt final : public ConstantData { inline const APInt () const { return Val; } /// getBitWidth - Return the bitwidth of this constant. - unsigned getBitWidth() const { return Val.getBitWidth(); } + unsigned getBitWidth() const { +

[clang] [llvm] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)

2023-12-05 Thread Paul Walker via cfe-commits
@@ -98,6 +99,13 @@ class ConstantInt final : public ConstantData { /// value. Otherwise return a ConstantInt for the given value. static Constant *get(Type *Ty, uint64_t V, bool IsSigned = false); + /// WARNING: Incomplete support, do not use. These methods exist for

[clang] Fix tests clang-offload-bundler-zlib/zstd.c (PR #74504)

2023-12-05 Thread via cfe-commits
https://github.com/eddyz87 approved this pull request. Makes sense, let's hope it fixes CI. Strange that I haven't observed this bug on x86 runners but maybe just needed to dig deeper in run history. https://github.com/llvm/llvm-project/pull/74504

[clang] [CUDA][HIP] Exclude external variables from constant promotion. (PR #73549)

2023-12-05 Thread Artem Belevich via cfe-commits
@@ -104,3 +106,14 @@ void fun() { (void) b; (void) var_host_only; } + +extern __global__ void external_func(); +extern void* const external_dep[] = { + (void*)(external_func) +}; +extern void* const external_arr[] = {}; + +void* host_fun() { + (void) external_dep; +

[libcxx] [lld] [clang] [flang] [clang-tools-extra] [llvm] [libc] [compiler-rt] [mlir] [openmp] [lldb] [MLIR] Enable GPU Dialect to SYCL runtime integration (PR #71430)

2023-12-05 Thread Sang Ik Lee via cfe-commits
silee2 wrote: @fabianmcg Can you approve and merge? @joker-eph is not responding and this PR has been open for a long time. It is blocking other future PRs that depend on this one. If SPIR-V dialect registration needs to change that can be done in another PR.

[clang] [Sema] When checking for constraint equivalence, do not calculate satisfaction (PR #74490)

2023-12-05 Thread Erich Keane via cfe-commits
@@ -4077,6 +4084,7 @@ Sema::SubstExpr(Expr *E, const MultiLevelTemplateArgumentList ) { TemplateInstantiator Instantiator(*this, TemplateArgs, SourceLocation(), DeclarationName()); +

[clang] Fix tests clang-offload-bundler-zlib/zstd.c (PR #74504)

2023-12-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. Thanks, I noticed that spurious failure as well but didn't know what caused it. https://github.com/llvm/llvm-project/pull/74504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [analyzer] EnumCastOutOfRangeChecker: report the value (PR #74503)

2023-12-05 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. LG, thanks! https://github.com/llvm/llvm-project/pull/74503 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread via cfe-commits
@@ -0,0 +1,73 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread via cfe-commits
@@ -0,0 +1,73 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread via cfe-commits
@@ -0,0 +1,73 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread via cfe-commits
@@ -5,7 +5,7 @@ modernize-use-std-numbers Finds constants and function calls to math functions that can be replaced with c++20's mathematical constants from the ``numbers`` header and offers fix-it hints. -Does not match the use of variables or macros with that value and

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread via cfe-commits
https://github.com/EugeneZelenko edited https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread via cfe-commits
@@ -193,6 +193,13 @@ New checks replacing with ``starts_with`` when the method exists in the class. Notably, this will work with ``std::string`` and ``std::string_view``. +- New :doc:`modernize-use-std-numbers + ` check. + + Finds constants and function calls to math

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread via cfe-commits
https://github.com/EugeneZelenko requested changes to this pull request. https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)

2023-12-05 Thread Nikita Popov via cfe-commits
@@ -136,7 +144,11 @@ class ConstantInt final : public ConstantData { inline const APInt () const { return Val; } /// getBitWidth - Return the bitwidth of this constant. - unsigned getBitWidth() const { return Val.getBitWidth(); } + unsigned getBitWidth() const { +

[clang] [llvm] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)

2023-12-05 Thread Nikita Popov via cfe-commits
@@ -343,7 +343,7 @@ static bool verifyTripCount(Value *RHS, Loop *L, // If the RHS of the compare is equal to the backedge taken count we need // to add one to get the trip count. if (SCEVRHS == BackedgeTCExt || SCEVRHS == BackedgeTakenCount) { - ConstantInt

[clang] [llvm] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)

2023-12-05 Thread Nikita Popov via cfe-commits
@@ -98,6 +99,13 @@ class ConstantInt final : public ConstantData { /// value. Otherwise return a ConstantInt for the given value. static Constant *get(Type *Ty, uint64_t V, bool IsSigned = false); + /// WARNING: Incomplete support, do not use. These methods exist for

[clang] Fix tests clang-offload-bundler-zlib/zstd.c (PR #74504)

2023-12-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Yaxun (Sam) Liu (yxsamliu) Changes The test fails intermittently due to non-unique file name %T. Use %t based file names instead. Fixes: https://github.com/llvm/llvm-project/issues/74472 --- Full diff:

[clang] Fix tests clang-offload-bundler-zlib/zstd.c (PR #74504)

2023-12-05 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu created https://github.com/llvm/llvm-project/pull/74504 The test fails intermittently due to non-unique file name %T. Use %t based file names instead. Fixes: https://github.com/llvm/llvm-project/issues/74472 >From 19bfca890a66b38ce92c2d5dc39d8ee144df0bcf Mon Sep

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,74 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,74 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers

[clang] [analyzer] Move alpha checker EnumCastOutOfRange to optin (PR #67157)

2023-12-05 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: DonatNagyE wrote: > > Before merging this PR, the diagnostics of the EnumCast checker should be > > updated to mention the name of the `enum` type in question. @gamesh411 > > could you create a PR that implements this improvement (as we

<    1   2   3   4   5   >