[clang-tools-extra] [clang-tidy][docs] improve documentation on cppcoreguidelines-narrowing-conversions (#111510) (PR #118209)

2024-12-02 Thread Jonas Toth via cfe-commits
https://github.com/JonasToth edited https://github.com/llvm/llvm-project/pull/118209 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2024-12-02 Thread Kito Cheng via cfe-commits
@@ -32,3 +36,39 @@ vint32m1_t test_no_vector_cc_attr(vint32m1_t input, int32_t *base, size_t vl) { __riscv_vse32_v_i32m1(base, val, vl); return ret; } + +// CHECK-LLVM: define dso_local void @test_vls_no_cc(i128 noundef %arg.coerce) +// CHECK-LLVM-ABI-VLEN: define dso_loca

[clang-tools-extra] [clang-tidy][docs] improve documentation on cppcoreguidelines-narrowing-conversions (#111510) (PR #118209)

2024-12-02 Thread Jonas Toth via cfe-commits
https://github.com/JonasToth updated https://github.com/llvm/llvm-project/pull/118209 >From 4340df440863de154ed305dc487d23ef46c9277a Mon Sep 17 00:00:00 2001 From: Jonas Toth Date: Sun, 1 Dec 2024 12:02:13 +0100 Subject: [PATCH] [clang-tidy][docs] improve documentation on cppcoreguidelines-nar

[clang-tools-extra] [clang-tidy][docs] improve documentation on cppcoreguidelines-narrowing-conversions (#111510) (PR #118209)

2024-12-02 Thread Jonas Toth via cfe-commits
@@ -27,6 +27,29 @@ This check will flag: - All applications of binary operators with a narrowing conversions. For example: ``int i; i+= 0.1;``. +Note that arithmetic with integer types may perform implicit conversions if the used integer types are smaller than ``int``. --

[clang] [flang] [clang][driver] Special care for -l flags in config files (PR #117573)

2024-12-02 Thread Paul Osmialowski via cfe-commits
@@ -0,0 +1 @@ +-ffast-math -Wl,--as-needed | -lm -Wl,-Bstatic -lhappy -Wl,-Bdynamic pawosm-arm wrote: Since for ` llvm::cl::ExpansionContext::readConfigFile()` a newline is just a separator, this can't be achieved by doing an enhancement in a code very distant

[clang-tools-extra] [clang-tidy][docs] improve documentation on cppcoreguidelines-narrowing-conversions (#111510) (PR #118209)

2024-12-02 Thread Jonas Toth via cfe-commits
@@ -27,6 +27,29 @@ This check will flag: - All applications of binary operators with a narrowing conversions. For example: ``int i; i+= 0.1;``. +Note that arithmetic with integer types may perform implicit conversions if the used integer types are smaller than ``int``. +T

[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

2024-12-02 Thread John McCall via cfe-commits
@@ -1780,6 +1786,15 @@ void CXXNameMangler::mangleDeviceStubName(const IdentifierInfo *II) { << II->getName(); } +void CXXNameMangler::mangleOCLDeviceStubName(const IdentifierInfo *II) { + // ::= __clang_ocl_kern_imp_ + // ::= [n] + // ::= + StringRef OCLDevi

[clang] [llvm] [SPIR-V] Fixup storage class for global private (PR #116636)

2024-12-02 Thread Nathan Gauër via cfe-commits
@@ -0,0 +1,17 @@ +; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %} + +@PrivInternal = internal addrspace(10) global i32 456 +; CHE

[clang] [llvm] Revert "[SPIR-V] Fixup storage class for global private (#116636)" (PR #118312)

2024-12-02 Thread Steven Perron via cfe-commits
Nathan =?utf-8?q?Gau=C3=ABr?= Message-ID: In-Reply-To: https://github.com/s-perron approved this pull request. https://github.com/llvm/llvm-project/pull/118312 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang-tools-extra] [clang-tidy] fix cppcoreguidelines-narrowing-conversions false positives when narrowing integer to signed integer in C++20 (PR #116591)

2024-12-02 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: It is difference level of issue. if it is an implement defined thing, it should be disabled unrelated to which coding guideline. But if it is well defined behavior, then coding guideline just a coding guideline. It even does not allow this kind of code. ```c++ short v(short

[clang] 4ad4d34 - Revert [Clang] prevent errors for deduction guides using deduced type aliases (#118165)

2024-12-02 Thread via cfe-commits
Author: Oleksandr T. Date: 2024-12-02T17:19:19+02:00 New Revision: 4ad4d34a226043a5d594b261a9c2a50efd292a76 URL: https://github.com/llvm/llvm-project/commit/4ad4d34a226043a5d594b261a9c2a50efd292a76 DIFF: https://github.com/llvm/llvm-project/commit/4ad4d34a226043a5d594b261a9c2a50efd292a76.diff

[libclc] [libcxx] [llvm] [openmp] [polly] [llvm] Move sub-project lead maintainers into their own Maintainers.md files (PR #118309)

2024-12-02 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/118309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIR-V] Fixup storage class for global private (PR #116636)

2024-12-02 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts edited https://github.com/llvm/llvm-project/pull/116636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Xtensa] Default to unsigned char (PR #115967)

2024-12-02 Thread Alexander Richardson via cfe-commits
arichardson wrote: Looking at https://github.com/llvm/llvm-project/pull/118008 it sounds like we don't yet have complete codegen support for XTensa in Clang, so it sounds like this is safe without a flag. https://github.com/llvm/llvm-project/pull/115967

[clang] [clang][bytecode] Implement __builtin_reduce_or (PR #118292)

2024-12-02 Thread via cfe-commits
graphite-app[bot] wrote: ## Your org has enabled the Graphite merge queue for merging into main Add the label “FP Bundles” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. You must have a Graphite account and log in to Graphite in order to use the

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-02 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. I am sorry for my poor choice of words around `config knob`, I was trying to imply a knob like https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/clangd/ClangdServer.h#L111. I don't think the knob needs to be exp

[clang] [analyzer][Z3] Restore the original timeout of 15s (PR #118291)

2024-12-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Kristóf Umann (Szelethus) Changes Discussion here: https://discourse.llvm.org/t/analyzer-rfc-taming-z3-query-times/79520/15?u=szelethus The original patch, #97298 introduced new timeouts backed by thorough testing and me

[clang] [flang] [clang][driver] Special care for -l flags in config files (PR #117573)

2024-12-02 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm edited https://github.com/llvm/llvm-project/pull/117573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-12-02 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. Thank you for your patience. LGTM with some small nits. https://github.com/llvm/llvm-project/pull/113144 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [Clang] [NFC] Refactor more AST visitors (PR #116823)

2024-12-02 Thread via cfe-commits
@@ -266,7 +265,7 @@ class RenameLocFinder : public RecursiveASTVisitor { return true; } - bool VisitDeclRefExpr(const DeclRefExpr *Expr) { Sirraide wrote: > One thing I think we'd be better off doing if we cared to make this change > (rather than cop

[clang] [clang][bytecode] Implement __builtin_reduce_or (PR #118292)

2024-12-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/118292 >From e00015b867094932a2f398c8ff92889ff586aff5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 2 Dec 2024 14:24:11 +0100 Subject: [PATCH] [clang][bytecode] Implement __builtin_reduce_or

[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)

2024-12-02 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/118031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] eaa4eb2 - [CIR] Fix warning in CIRGenAction.cpp (#118389)

2024-12-02 Thread via cfe-commits
Author: David Olsen Date: 2024-12-02T13:19:33-08:00 New Revision: eaa4eb281d4a0e34c7b4c2dac50cd151c3cb27e6 URL: https://github.com/llvm/llvm-project/commit/eaa4eb281d4a0e34c7b4c2dac50cd151c3cb27e6 DIFF: https://github.com/llvm/llvm-project/commit/eaa4eb281d4a0e34c7b4c2dac50cd151c3cb27e6.diff L

[clang] [CIR] Fix warning in CIRGenAction.cpp (PR #118389)

2024-12-02 Thread David Olsen via cfe-commits
https://github.com/dkolsen-pgi closed https://github.com/llvm/llvm-project/pull/118389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-optional-access (PR #115051)

2024-12-02 Thread Jan Voung via cfe-commits
https://github.com/jvoung edited https://github.com/llvm/llvm-project/pull/115051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libcxx] [llvm] [openmp] [polly] [llvm] Move sub-project lead maintainers into their own Maintainers.md files (PR #118309)

2024-12-02 Thread Nikita Popov via cfe-commits
https://github.com/nikic commented: Looks reasonable to me. We might want to use this chance to also get the information up to date... I think for polly this should probably be @tobiasgrosser -> @Meinersbur. For libclc maybe @tstellar -> @frasercrmck (or maybe both). https://github.com/llvm/l

[clang] [flang] [clang][driver] Special care for -l flags in config files (PR #117573)

2024-12-02 Thread Paul Osmialowski via cfe-commits
@@ -0,0 +1 @@ +-ffast-math -Wl,--as-needed | -lm -Wl,-Bstatic -lhappy -Wl,-Bdynamic pawosm-arm wrote: We could prefix those linker flags with some character, e.g. '@', it would work like that: ``` -ffast-math @-lm -Wl,--as-needed @-Wl,-Bstatic -lhappy @-Wl,-Bdy

[clang] [CSKY] Default to unsigned char (PR #115961)

2024-12-02 Thread Alexander Richardson via cfe-commits
arichardson wrote: ping https://github.com/llvm/llvm-project/pull/115961 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-02 Thread kadir çetinkaya via cfe-commits
@@ -149,15 +150,18 @@ void Dex::buildIndex() { InvertedIndex = std::move(Builder).build(); // Build RevRefs - for (const auto &[ID, RefList] : Refs) -for (const auto &R : RefList) - if ((R.Kind & ContainedRefsRequest::SupportedRefKinds) != - RefKind::Unk

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-02 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google edited https://github.com/llvm/llvm-project/pull/118281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][opt][Transforms][SPIR-V] Enable `InferAddressSpaces` for SPIR-V (PR #110897)

2024-12-02 Thread Victor Lomuller via cfe-commits
@@ -91,6 +97,88 @@ SPIRVTargetMachine::SPIRVTargetMachine(const Target &T, const Triple &TT, setRequiresStructuredCFG(false); } +enum AddressSpace { + Function = storageClassToAddressSpace(SPIRV::StorageClass::Function), + CrossWorkgroup = + storageClassToAddressSpac

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-02 Thread Ilya Biryukov via cfe-commits
@@ -9,11 +9,20 @@ namespace usage_invalid { ~A() [[clang::lifetimebound]]; // expected-error {{cannot be applied to a destructor}} static int *static_class_member() [[clang::lifetimebound]]; // expected-error {{static member function has no implicit object parameter}}

[clang-tools-extra] [clang-tidy] ignore `[[clang::lifetimebound]]` param in return-const-ref-from-parameter (PR #118315)

2024-12-02 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: * **#118315** https://app.graphite.dev/github/pr/llvm/llvm-project/118315?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/

[clang] [Clang] ensure mangled names are valid identifiers before being suggested in ifunc/alias attributes notes (PR #118170)

2024-12-02 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-win` running on `sie-win-worker` while building `clang` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/46/builds/8786 Here is the

[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)

2024-12-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: This looks good to me and does what we discussed. I'd prefer it if we could get some slightly improved diagnostic (just one that says quickly why it is problematic to compare arrays), and want someone else to take a quick peak (I've asked @shafik to do

[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)

2024-12-02 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper edited https://github.com/llvm/llvm-project/pull/118031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-optional-access (PR #115051)

2024-12-02 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: Could clang/lib/ASTMatchers/GtestMatchers.cpp help you to have a better solution? https://github.com/llvm/llvm-project/pull/115051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] 0aa7892 - [OpenACC] Implement 'tile' for combined constructs

2024-12-02 Thread via cfe-commits
Author: erichkeane Date: 2024-12-02T13:31:36-08:00 New Revision: 0aa7892772a94b0395cb5a7fce077ab2348ecaa5 URL: https://github.com/llvm/llvm-project/commit/0aa7892772a94b0395cb5a7fce077ab2348ecaa5 DIFF: https://github.com/llvm/llvm-project/commit/0aa7892772a94b0395cb5a7fce077ab2348ecaa5.diff LO

[clang-tools-extra] [NFC] Fix uninitialized scalar field in constructor. (PR #118324)

2024-12-02 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann requested changes to this pull request. How did you decide on `IndexContents::All` as the default initialization value. I would be more inclined towards `IndexContents::None`. I think it would be preferred to use a member initializer in the declaration of `IdxCon

[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)

2024-12-02 Thread Erich Keane via cfe-commits
@@ -15,15 +15,15 @@ void test(const char *d) { if (NULL == "/") return; if ("/" != DELIM) // expected-warning {{result of comparison against a string literal is unspecified (use an explicit string comparison function instead)}} -return; +return; // cxx

[clang] [llvm] Clang: emit llvm.minnum and llvm.maxnum with nsz always (PR #113133)

2024-12-02 Thread Joshua Cranmer via cfe-commits
https://github.com/jcranmer-intel commented: You'll want to merge the fast-math flags, so that compiling with -ffinite-math-only gets you nnan ninf nsz on the maxnum/minnum, rather than just nsz. https://github.com/llvm/llvm-project/pull/113133 ___ c

[clang-tools-extra] [NFC] Fix uninitialized scalar field in constructor. (PR #118324)

2024-12-02 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: > How did you decide on `IndexContents::All` as the default initialization > value. I would be more inclined towards `IndexContents::None`. > > I think it would be preferred to use a member initializer in the declaration > of `IdxContents`. That will ensure an initialization is

[clang] [AMDGPU] Use the AMDGPUToolChain when targeting C/C++ directly (PR #99687)

2024-12-02 Thread Joseph Huber via cfe-commits
@@ -6405,7 +6424,12 @@ const ToolChain &Driver::getToolChain(const ArgList &Args, TC = std::make_unique(*this, Target, Args); break; case llvm::Triple::AMDHSA: - TC = std::make_unique(*this, Target, Args); + TC = + llvm::any_of(Inputs, +

[clang] [ASTMatcher] Fix redundant macro expansion checks in getExpansionLocOfMacro (PR #117143)

2024-12-02 Thread via cfe-commits
@@ -697,27 +698,61 @@ static bool isTokenAtLoc(const SourceManager &SM, const LangOptions &LangOpts, return !Invalid && Text == TokenText; } -std::optional -getExpansionLocOfMacro(StringRef MacroName, SourceLocation Loc, - const ASTContext &Context) {

[clang] [llvm] [SPIR-V] Fixup storage class for global private (PR #116636)

2024-12-02 Thread Nathan Gauër via cfe-commits
@@ -58,6 +58,7 @@ enum class LangAS : unsigned { // HLSL specific address spaces. hlsl_groupshared, + hlsl_private, Keenuts wrote: Oh didn't knew I could modify the target's AS maps without also modifying this. I'll revert/re-land this PR (given the othe

[clang] [llvm] [SPIR-V] Fixup storage class for global private (PR #116636)

2024-12-02 Thread Vyacheslav Levytskyy via cfe-commits
Nathan =?utf-8?q?Gau=C3=ABr?= Message-ID: In-Reply-To: https://github.com/VyacheslavLevytskyy approved this pull request. https://github.com/llvm/llvm-project/pull/116636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-02 Thread Maksim Ivanov via cfe-commits
@@ -9,11 +9,20 @@ namespace usage_invalid { ~A() [[clang::lifetimebound]]; // expected-error {{cannot be applied to a destructor}} static int *static_class_member() [[clang::lifetimebound]]; // expected-error {{static member function has no implicit object parameter}}

[clang] [clang] constexpr built-in elementwise bitreverse function. (PR #118177)

2024-12-02 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon approved this pull request. LGTM - cheers https://github.com/llvm/llvm-project/pull/118177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Check __builtin_memcpy for null pointers (PR #118313)

2024-12-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/118313 None >From 0cc2c1a52538a8fa5fe89bba77e83e00942eeaf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 2 Dec 2024 16:47:50 +0100 Subject: [PATCH] [clang][bytecode] Check __builtin_memcpy f

[clang] [llvm] Revert "[SPIR-V] Fixup storage class for global private (#116636)" (PR #118312)

2024-12-02 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts created https://github.com/llvm/llvm-project/pull/118312 This reverts commit aa7fe1c10e5d6d0d3aacdb345fed995de413e142. From e8c3d6da73e95fd03e5ccdf8e08bdc99ff52e6f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathan=20Gau=C3=ABr?= Date: Mon, 2 Dec 2024 16:50:47 +0100 Su

[clang] 0aef005 - [OpenACC] Implement 'collapse' for combined constructs.

2024-12-02 Thread via cfe-commits
Author: erichkeane Date: 2024-12-02T12:49:49-08:00 New Revision: 0aef005c94f91a91edc77a4f43337950e66bc462 URL: https://github.com/llvm/llvm-project/commit/0aef005c94f91a91edc77a4f43337950e66bc462 DIFF: https://github.com/llvm/llvm-project/commit/0aef005c94f91a91edc77a4f43337950e66bc462.diff LO

[clang] [Clang] Recover GLTemplateParameterList for generic lambdas in RebuildLambdaScopeInfo (PR #118176)

2024-12-02 Thread Erich Keane via cfe-commits
@@ -15504,10 +15504,25 @@ LambdaScopeInfo *Sema::RebuildLambdaScopeInfo(CXXMethodDecl *CallOperator) { LSI->CallOperator = CallOperator; LSI->Lambda = LambdaClass; LSI->ReturnType = CallOperator->getReturnType(); - // This function in calls in situation where the contex

[clang-tools-extra] [NFC] Fix uninitialized data member in constructor. (PR #118324)

2024-12-02 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam created https://github.com/llvm/llvm-project/pull/118324 None >From 4142b5bd36a4f7a554196687e191a09dba9e4dcf Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Mon, 2 Dec 2024 09:09:21 -0800 Subject: [PATCH] [NFC] Fix uninitialized data member in constructor.

[clang] [Clang] [NFC] Refactor more AST visitors (PR #116823)

2024-12-02 Thread Erich Keane via cfe-commits
@@ -266,7 +265,7 @@ class RenameLocFinder : public RecursiveASTVisitor { return true; } - bool VisitDeclRefExpr(const DeclRefExpr *Expr) { erichkeane wrote: Urgh, yeah... our const correctness with the recursive AST visitor is... bad. One thing I th

[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

2024-12-02 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -emit-llvm -o - %s | FileCheck %s + +// CHECK: define dso_local amdgpu_kernel void @callee_kern({{.*}}) +__attribute__((noinline)) kernel void callee_kern(global int *A){ + *A = 1; +} + +__attribute__((noinline)

[clang] [analyzer][Z3] Restore the original timeout of 15s (PR #118291)

2024-12-02 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. The commit which introduced the new Z3 timeout logic (https://github.com/llvm/llvm-project/pull/97298) was landed with my approval, but since then I realized that this was a mistake -- in particular the concrete fine-tuned default values

[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)

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

[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)

2024-12-02 Thread via cfe-commits
@@ -10264,6 +10264,11 @@ def warn_depr_array_comparison : Warning< "to compare array addresses, use unary '+' to decay operands to pointers">, InGroup; +def warn_array_comparison : Warning< + "comparison between two arrays; " cor3ntin wrote: can you crea

[clang] [clang][Driver] Use shared_ptr in the Compilation class (PR #116406)

2024-12-02 Thread David Truby via cfe-commits
@@ -63,41 +56,39 @@ Compilation::getArgsForToolChain(const ToolChain *TC, StringRef BoundArch, if (!TC) TC = &DefaultToolChain; - DerivedArgList *&Entry = TCArgs[{TC, BoundArch, DeviceOffloadKind}]; + std::shared_ptr &Entry = + TCArgs[{TC, BoundArch, DeviceOffloa

[clang] 637a1ae - [clang][bytecode] Implement __builtin_elementwise_popcount (#118307)

2024-12-02 Thread via cfe-commits
Author: Timm Baeder Date: 2024-12-02T16:48:22+01:00 New Revision: 637a1ae85538554b98973861802e842fc30d0f91 URL: https://github.com/llvm/llvm-project/commit/637a1ae85538554b98973861802e842fc30d0f91 DIFF: https://github.com/llvm/llvm-project/commit/637a1ae85538554b98973861802e842fc30d0f91.diff L

[clang] [Clang] Permit noescape on non-pointer types (PR #117344)

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

[clang] [ASTMatcher] Fix redundant macro expansion checks in getExpansionLocOfMacro (PR #117143)

2024-12-02 Thread via cfe-commits
@@ -697,27 +698,61 @@ static bool isTokenAtLoc(const SourceManager &SM, const LangOptions &LangOpts, return !Invalid && Text == TokenText; } -std::optional -getExpansionLocOfMacro(StringRef MacroName, SourceLocation Loc, - const ASTContext &Context) {

[clang] [flang] [clang][driver] Special care for -l flags in config files (PR #117573)

2024-12-02 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm edited https://github.com/llvm/llvm-project/pull/117573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64]Refactor typespec handling in SveEmitter.cpp (PR #117717)

2024-12-02 Thread Sander de Smalen via cfe-commits
@@ -570,27 +579,35 @@ void SVEType::applyTypespec(StringRef TS) { for (char I : TS) { switch (I) { case 'Q': + assert(Kind == Invalid && "Invalid use of modifer!"); Kind = Svcount; break; case 'P': + assert(Kind == Invalid && "Invalid use

[clang] 1288f6d - [clang][bytecode] Implement __builtin_reduce_or (#118292)

2024-12-02 Thread via cfe-commits
Author: Timm Baeder Date: 2024-12-02T15:28:26+01:00 New Revision: 1288f6d405768f57bf2d2fd5914c5a20f902f5d6 URL: https://github.com/llvm/llvm-project/commit/1288f6d405768f57bf2d2fd5914c5a20f902f5d6 DIFF: https://github.com/llvm/llvm-project/commit/1288f6d405768f57bf2d2fd5914c5a20f902f5d6.diff L

[clang] [clang][bytecode] Implement __builtin_elementwise_popcount (PR #118307)

2024-12-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/118307 None >From 7166a305ef2d64aaa1979ca2f09427015a9df873 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 2 Dec 2024 15:56:36 +0100 Subject: [PATCH] [clang][bytecode] Implement __builtin_elem

[clang-tools-extra] [clang-tidy] Adjust size-empty doc because C++11 size() is constant-time (PR #117629)

2024-12-02 Thread Niels Dekker via cfe-commits
N-Dekker wrote: @PiotrZSL @HerrCai0907 Thank you both for your feedback and approval! Would one of you be able the merge the pull request? https://github.com/llvm/llvm-project/pull/117629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-02 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/118281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Permit noescape on non-pointer types (PR #117344)

2024-12-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I would still like to see a CodeGen test for this to show that it modifies the LLVM-IR. I see the attribute is referenced once in our codegen (`CodeGenTypes::arrangeObjCMessageSendSignature`), which looks to modify the IR, so I'd like to see a test t

[clang] [flang] [flang] Treat pre-processed input as fixed (PR #117563)

2024-12-02 Thread via cfe-commits
https://github.com/macurtis-amd updated https://github.com/llvm/llvm-project/pull/117563 >From d8aed2a68c4a4330f77e8e62c920b033463f91cc Mon Sep 17 00:00:00 2001 From: Matthew Curtis Date: Mon, 2 Dec 2024 07:16:28 -0600 Subject: [PATCH] [flang] Treat pre-processed input as fixed --- clang/lib/

[clang] [llvm] [AArch64] Implement FP8 SVE intrinsics for widening conversions (PR #118123)

2024-12-02 Thread via cfe-commits
@@ -3864,3 +3864,20 @@ def int_aarch64_sve_famin_u : AdvSIMD_Pred2VectorArg_Intrinsic; // Neon absolute maximum and minimum def int_aarch64_neon_famax : AdvSIMD_2VectorArg_Intrinsic; def int_aarch64_neon_famin : AdvSIMD_2VectorArg_Intrinsic; + +// +// FP8 intrinsics

[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

2024-12-02 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/116785 >From 5f260726253e78a00d2dff02c22837ce02b49075 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Tue, 19 Nov 2024 11:55:11 +0100 Subject: [PATCH 1/4] [Clang] Consider preferred_type in bitfield warnings (#116760)

[clang] [NFC][HLSL] Allow target intrinsic switching to optionally be set. (PR #117648)

2024-12-02 Thread Farzon Lotfi via cfe-commits
@@ -30,22 +30,36 @@ #include #include +#define GENERATE_HLSL_INTRINSIC_FUNCTION_DEFAULT(FunctionName, \ + IntrinsicPostfix) \ + GENERATE_HLSL_INTRINSIC_FUNCTION(FunctionName, IntrinsicPostfix, 1,

[clang] [clang-format] add BinPackLongBracedLists style option (PR #112482)

2024-12-02 Thread Gedare Bloom via cfe-commits
gedare wrote: I'm content with this solution. https://github.com/llvm/llvm-project/pull/112482 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2024-12-02 Thread Gedare Bloom via cfe-commits
gedare wrote: Rebased to main. This PR addresses several long-standing issues. It would be great to get a review. https://github.com/llvm/llvm-project/pull/108332 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [llvm] [SPIR-V] Fixup storage class for global private (PR #116636)

2024-12-02 Thread Matt Arsenault via cfe-commits
Nathan =?utf-8?q?Gauër?= Message-ID: In-Reply-To: @@ -58,6 +58,7 @@ enum class LangAS : unsigned { // HLSL specific address spaces. hlsl_groupshared, + hlsl_private, arsenm wrote: This isn't split though, the backend parts don't require any of these c

[clang] [clang][bytecode] Implement __builtin_elementwise_popcount (PR #118307)

2024-12-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/118307 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][Z3] Restore the original timeout of 15s (PR #118291)

2024-12-02 Thread via cfe-commits
https://github.com/isuckatcs approved this pull request. https://github.com/llvm/llvm-project/pull/118291 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Darwin][Driver][clang] Prioritise `-isysroot` over `--sysroot` consistently (PR #115993)

2024-12-02 Thread Oliver Hunt via cfe-commits
ojhunt wrote: Independently of the rationale for the current behaviour, I would be extremely concerned about potential breakage from this behavior change (more due to hyrum's law that intentional choices) https://github.com/llvm/llvm-project/pull/115993

[clang-tools-extra] [clangd] Support symbolTags for document symbol (PR #113669)

2024-12-02 Thread Dietrich Travkin via cfe-commits
travkin79 wrote: Hi @chouzz, I checked the verbose LS log output and it says it's using another clangd version than the one I built from your branch (it's telling me it being version 18.1.1). I checked my config. It turns out there was some config file replacing the default clangd path with an

[clang] [llvm] Revert "[SPIR-V] Fixup storage class for global private (#116636)" (PR #118312)

2024-12-02 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 b343f3f3faf5b732cc19c9c51d392389677477ce e8c3d6da73e95fd03e5ccdf8e08bdc99ff52e6f0 --e

[clang] [libcxx] Warn when unique objects might be duplicated in shared libraries (PR #117622)

2024-12-02 Thread Devon Loehr via cfe-commits
https://github.com/DKLoehr updated https://github.com/llvm/llvm-project/pull/117622 >From d944b2fde573a4fb352400ce3425121265b02685 Mon Sep 17 00:00:00 2001 From: Devon Loehr Date: Thu, 21 Nov 2024 19:29:00 + Subject: [PATCH 1/2] Warn when unique objects might be duplicated in shared librar

[clang] [clang][bytecode] Check __builtin_memcpy for null pointers (PR #118313)

2024-12-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/118313.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+8) - (modified) clang/test/AST/ByteCode/builtin-functions.cp

[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)

2024-12-02 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: @shafik, @cor3ntin For C++26 there is already an issue and discussion their and i will handle it after landing this PR https://github.com/llvm/llvm-project/issues/117859 https://github.com/llvm/llvm-project/pull/118031 ___ cfe-com

[clang] [Clang][AArch64]Refactor typespec handling in SveEmitter.cpp (PR #117717)

2024-12-02 Thread via cfe-commits
@@ -570,27 +579,35 @@ void SVEType::applyTypespec(StringRef TS) { for (char I : TS) { switch (I) { case 'Q': + assert(Kind == Invalid && "Invalid use of modifer!"); Kind = Svcount; break; case 'P': + assert(Kind == Invalid && "Invalid use

[clang] bd92e46 - [HLSL] Implement RWBuffer::operator[] via __builtin_hlsl_resource_getpointer (#117017)

2024-12-02 Thread via cfe-commits
Author: Justin Bogner Date: 2024-12-02T14:03:31-08:00 New Revision: bd92e46204331b9af296f53abb708317e72ab7a8 URL: https://github.com/llvm/llvm-project/commit/bd92e46204331b9af296f53abb708317e72ab7a8 DIFF: https://github.com/llvm/llvm-project/commit/bd92e46204331b9af296f53abb708317e72ab7a8.diff

[clang] [llvm] [HLSL] Implement RWBuffer::operator[] via __builtin_hlsl_resource_getpointer (PR #117017)

2024-12-02 Thread Justin Bogner via cfe-commits
https://github.com/bogner closed https://github.com/llvm/llvm-project/pull/117017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] constexpr built-in elementwise bitreverse function. (PR #118177)

2024-12-02 Thread via cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/118177 >From 69c3275b5119adc049821aacf2b9f01641d73aad Mon Sep 17 00:00:00 2001 From: c8ef Date: Sun, 1 Dec 2024 00:10:58 +0800 Subject: [PATCH 1/4] constexpr elementwise bitreverse --- clang/docs/LanguageExtensions.rst

[clang] Reapply "[clang] Fix name lookup for dependent bases" (PR #118003)

2024-12-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Please give @cor3ntin 48 hrs from now to have a chance to review this before committing. https://github.com/llvm/llvm-project/pull/118003 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] constexpr built-in elementwise bitreverse function. (PR #118177)

2024-12-02 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 4148aa63e2285ec7198c67d9b231b9097076ba8e 65f8be8b2144c31dc8282ab096ae8225b9da4b72 --e

[clang] [clang] Implement __attribute__((format_matches)) (PR #116708)

2024-12-02 Thread via cfe-commits
apple-fcloutier wrote: There's a handful of drivers for the size of the SemaChecking change: * generalize things that were previously specific to FormatAttr, pipe through expected format where applicable; * tolerate the new FAPK_External for when the format arguments are invisible to the calle

[clang] [flang] [clang][driver] Special care for -l flags in config files (PR #117573)

2024-12-02 Thread David Truby via cfe-commits
@@ -0,0 +1 @@ +-ffast-math -Wl,--as-needed | -lm -Wl,-Bstatic -lhappy -Wl,-Bdynamic DavidTruby wrote: I'm indifferent to what symbol we choose, but I believe `@` is already used for including other config files, so we should avoid that to avoid having a collisi

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-12-02 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/113144 ___ 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 readability-use-span-first-last check (PR #118074)

2024-12-02 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/118074 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [NFC] Fix uninitialized scalar field in constructor. (PR #118324)

2024-12-02 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/118324 >From 4142b5bd36a4f7a554196687e191a09dba9e4dcf Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Mon, 2 Dec 2024 09:09:21 -0800 Subject: [PATCH 1/3] [NFC] Fix uninitialized data member in constructor. -

[clang] [llvm] [SelectionDAG][PowerPC] Add an intrinsic for memcmp. (PR #118178)

2024-12-02 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: We already have handling in the backend; see llvm/lib/CodeGen/ExpandMemCmp.cpp . https://github.com/llvm/llvm-project/pull/118178 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] Add an off-by-default warning to complain about MSVC bitfield padding (PR #117428)

2024-12-02 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/117428 >From 3e25d7ef2e223942298078dace8979905956d05c Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Fri, 22 Nov 2024 17:53:24 +0100 Subject: [PATCH 1/5] Add an off-by-default warning to complain about MSVC bitfield

[clang] [-Wunsafe-buffer-usage] Suppress warning when 2-D constant arrays are indexed (PR #118249)

2024-12-02 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak updated https://github.com/llvm/llvm-project/pull/118249 >From 8ca3b6312bc9ab53d7f89d02e0de180fadb20679 Mon Sep 17 00:00:00 2001 From: MalavikaSamak Date: Fri, 29 Nov 2024 14:53:37 +0530 Subject: [PATCH] [-Wunsafe-buffer-usage] Suppress warning for multi-dimens

[clang] [-Wunsafe-buffer-usage] Suppress warning for multi-dimensional constant arrays (PR #118249)

2024-12-02 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak edited https://github.com/llvm/llvm-project/pull/118249 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SelectionDAG][PowerPC] Add an intrinsic for memcmp. (PR #118178)

2024-12-02 Thread Nikita Popov via cfe-commits
nikic wrote: You'll have to create an RFC on discourse if you want to add a new target-independent memory intrinsic. Though if changing the name is the extent of the "special handling" you need, we probably shouldn't be adding an intrinsic for that. https://github.com/llvm/llvm-project/pull/1

<    1   2   3   4   5   6   >