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

2024-12-03 Thread Anton Sidorenko via cfe-commits
https://github.com/asi-sc closed https://github.com/llvm/llvm-project/pull/118003 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-12-03 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/118315 >From 82f24c9930097a1e2d2b5cb068cc5fe58cbd5cd6 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 2 Dec 2024 23:50:12 +0800 Subject: [PATCH] [clang-tidy] ignore `[[clang::lifetimebound]]` param in retur

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

2024-12-03 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun updated https://github.com/llvm/llvm-project/pull/117344 From d48e28d43473b317a74bd8fe3b2f62e8f99ed3c8 Mon Sep 17 00:00:00 2001 From: Gabor Horvath Date: Fri, 22 Nov 2024 16:19:35 + Subject: [PATCH] [Clang] Permit noescape on non-pointer types In modern C++ we

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

2024-12-03 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/118315 >From 82f24c9930097a1e2d2b5cb068cc5fe58cbd5cd6 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 2 Dec 2024 23:50:12 +0800 Subject: [PATCH 1/2] [clang-tidy] ignore `[[clang::lifetimebound]]` param in r

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

2024-12-03 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: > I'd like to see a test that validates this changes with these types. Sorry, I missed the part in CodeGen. So `noescape` is used to emit the `nocapute` parameter attribute in the LLVM IR. This parameter attribute is only valid for pointers and we currently do not seem to hav

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

2024-12-03 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: > Seems like `MemIndex::IdxContents` has the same issue. > > It's a bit suspicious to me that the other `DexIndex` and `MemIndex` > constructors are not passing in an `IndexContents` value. Either there's a > bug lurking there, or the field is only relevant in certain situation

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

2024-12-03 Thread via cfe-commits
Author: Vladislav Belov Date: 2024-12-03T16:46:01+03:00 New Revision: e1cb316cfd99208363b5eb9bf96430ca28020be0 URL: https://github.com/llvm/llvm-project/commit/e1cb316cfd99208363b5eb9bf96430ca28020be0 DIFF: https://github.com/llvm/llvm-project/commit/e1cb316cfd99208363b5eb9bf96430ca28020be0.dif

[clang] 7802fb5 - [clang][bytecode] Fix `__extension__` handling for vector operators (#118482)

2024-12-03 Thread via cfe-commits
Author: Timm Baeder Date: 2024-12-03T14:48:55+01:00 New Revision: 7802fb5f514be327576b69569556ec9096e5fdd7 URL: https://github.com/llvm/llvm-project/commit/7802fb5f514be327576b69569556ec9096e5fdd7 DIFF: https://github.com/llvm/llvm-project/commit/7802fb5f514be327576b69569556ec9096e5fdd7.diff L

[clang] [clang][bytecode] Fix `__extension__` handling for vector operators (PR #118482)

2024-12-03 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/118482 ___ 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-03 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: > idxcontents is only used when we have a set of file names available. hence > this was only set via relevant constructors and rest of the runtime doesn't > use the field. > > but we don't construct tons of new index instances every second. so it's > totally fine to just initi

[clang-tools-extra] [clang-tidy] Sync ContainerSizeEmptyCheck with container-size-empty doc (PR #118459)

2024-12-03 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/118459 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-12-03 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/118315 >From 82f24c9930097a1e2d2b5cb068cc5fe58cbd5cd6 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 2 Dec 2024 23:50:12 +0800 Subject: [PATCH 1/2] [clang-tidy] ignore `[[clang::lifetimebound]]` param in r

[clang] [clang] Fix a use-after-free in expression evaluation (PR #118480)

2024-12-03 Thread kadir çetinkaya via cfe-commits
@@ -4515,6 +4515,8 @@ handleLValueToRValueConversion(EvalInfo &Info, const Expr *Conv, QualType Type, } APValue Lit; + // Make sure we clean up the temporary created below. + FullExpressionRAII CleanupTemps(Info); kadircet wrote: > we c

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

2024-12-03 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun updated https://github.com/llvm/llvm-project/pull/117344 From f6bb3c5d93ea7847499f801190026ac46fdc Mon Sep 17 00:00:00 2001 From: Gabor Horvath Date: Fri, 22 Nov 2024 16:19:35 + Subject: [PATCH] [Clang] Permit noescape on non-pointer types In modern C++ we

[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-12-03 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm updated https://github.com/llvm/llvm-project/pull/116432 >From 12654b674725715422ba114e98bf76e40d557d16 Mon Sep 17 00:00:00 2001 From: Paul Osmialowski Date: Tue, 3 Dec 2024 12:41:15 + Subject: [PATCH] [clang][driver] When -fveclib=ArmPL flag is in use, always

[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-12-03 Thread Paul Osmialowski via cfe-commits
@@ -102,3 +102,17 @@ /* Verify no warning when math-errno is re-enabled for a different veclib (that does not imply -fno-math-errno). */ // RUN: %clang -### --target=aarch64-linux-gnu -fveclib=ArmPL -fmath-errno -fveclib=LIBMVEC %s 2>&1 | FileCheck --check-prefix=CHECK-REPEAT-

[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-12-03 Thread Paul Osmialowski via cfe-commits
@@ -490,6 +490,17 @@ void tools::AddLinkerInputs(const ToolChain &TC, const InputInfoList &Inputs, else A.renderAsInput(Args, CmdArgs); } + if (const Arg *A = Args.getLastArg(options::OPT_fveclib)) { +if (A->getNumValues() == 1) { pawosm-arm w

[clang] [ast matcher][NFC] make dump_ast_matchers.py run in any path (PR #117942)

2024-12-03 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/117942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [IR] Allow fast math flags on fptrunc and fpext (PR #115894)

2024-12-03 Thread John Brawn via cfe-commits
@@ -1875,13 +1873,17 @@ Instruction *InstCombinerImpl::visitFPTrunc(FPTruncInst &FPT) { // fptrunc (select Cond, (fpext X), Y --> select Cond, X, (fptrunc Y) Value *NarrowY = Builder.CreateFPTrunc(Y, Ty); Value *Sel = Builder.CreateSelect(Cond, X, NarrowY, "n

[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-12-03 Thread Paul Osmialowski via cfe-commits
pawosm-arm wrote: I've added these suggested changes. Also, I was advised by the libamath team that the complicated relationship between libamath and libm needs more elaborate handling, hence additional `-lm` before `-lamath` (see comment that I've also added). Also I was advised to use `--as-

[clang] [llvm] [AArch64] Add intrinsics for SME FP8 FDOT LANE instructions (PR #118492)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 @llvm/pr-subscribers-clang-codegen Author: Jonathan Thackray (jthackray) Changes --- Patch is 20.65 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/118492.diff 8 Files Affected: - (modifie

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

2024-12-03 Thread via cfe-commits
Author: Congcong Cai Date: 2024-12-03T22:25:29+08:00 New Revision: 57907c1a96e82c17b16111b919ab7c0f3d4370ab URL: https://github.com/llvm/llvm-project/commit/57907c1a96e82c17b16111b919ab7c0f3d4370ab DIFF: https://github.com/llvm/llvm-project/commit/57907c1a96e82c17b16111b919ab7c0f3d4370ab.diff

[clang] [llvm] [AArch64] Add intrinsics for SME FP8 FDOT LANE instructions (PR #118492)

2024-12-03 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray created https://github.com/llvm/llvm-project/pull/118492 None >From 609cf3fbdb28c155f4b8c787c1e2cb791c8a292f Mon Sep 17 00:00:00 2001 From: Jonathan Thackray Date: Fri, 29 Nov 2024 11:27:03 + Subject: [PATCH] [AArch64] Add intrinsics for SME FP8 FDOT LANE instr

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

2024-12-03 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/118315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Deleting an incomplete enum type is not an error (PR #118455)

2024-12-03 Thread Erich Keane via cfe-commits
@@ -540,6 +540,14 @@ namespace PR10504 { void f(A *x) { delete x; } // expected-warning {{delete called on 'PR10504::A' that is abstract but has non-virtual destructor}} } +#if __cplusplus >= 201103L +enum GH99278_1 { // expected-note {{definition of 'GH99278_1' is not comp

[clang] [llvm] [AArch64] Add intrinsics for SME FP8 FDOT LANE instructions (PR #118492)

2024-12-03 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 0f4dc4276f8dd5c5e33c22096612702ede3c81ed 609cf3fbdb28c155f4b8c787c1e2cb791c8a292f --e

[clang] [Clang] Deleting an incomplete enum type is not an error (PR #118455)

2024-12-03 Thread Erich Keane via cfe-commits
@@ -766,6 +766,7 @@ Bug Fixes to C++ Support - Fixed an assertion failure caused by mangled names with invalid identifiers. (#GH112205) - Fixed an incorrect lambda scope of generic lambdas that caused Clang to crash when computing potential lambda captures at the end of a f

[clang-tools-extra] [clangd] support the zig c++ compiler wrapper (PR #100759)

2024-12-03 Thread Duncan Ogilvie via cfe-commits
https://github.com/mrexodia closed https://github.com/llvm/llvm-project/pull/100759 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] support the zig c++ compiler wrapper (PR #100759)

2024-12-03 Thread Duncan Ogilvie via cfe-commits
mrexodia wrote: Worked around this by creating a wrapper script `zig-c++`: https://github.com/mrexodia/zig-cross/commit/56b384c96675660554a5d87fe5e5a95bf0bfbe7a https://github.com/llvm/llvm-project/pull/100759 ___ cfe-commits mailing list cfe-commits@

[clang] [llvm] [AArch64] Add intrinsics for SME FP8 FDOT LANE instructions (PR #118492)

2024-12-03 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray updated https://github.com/llvm/llvm-project/pull/118492 >From 609cf3fbdb28c155f4b8c787c1e2cb791c8a292f Mon Sep 17 00:00:00 2001 From: Jonathan Thackray Date: Fri, 29 Nov 2024 11:27:03 + Subject: [PATCH 1/2] [AArch64] Add intrinsics for SME FP8 FDOT LANE instru

[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-12-03 Thread Paul Osmialowski via cfe-commits
@@ -490,6 +490,17 @@ void tools::AddLinkerInputs(const ToolChain &TC, const InputInfoList &Inputs, else A.renderAsInput(Args, CmdArgs); } + if (const Arg *A = Args.getLastArg(options::OPT_fveclib)) { +if (A->getNumValues() == 1) { + const llvm::Triple &Tr

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-03 Thread Erich Keane via cfe-commits
erichkeane wrote: I have no idea what is going on here... @AaronBallman probably needs to take a better look. Else, could the author please give me an ELI5 sorta thing here or show me what the change looks like on the generated stuff? https://github.com/llvm/llvm-project/pull/118428

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

2024-12-03 Thread Erich Keane via cfe-commits
erichkeane wrote: > > I'd like to see a test that validates this changes with these types. > > Sorry, I missed the part in CodeGen. So `noescape` is used to emit the > `nocapute` parameter attribute in the LLVM IR. This parameter attribute is > only valid for pointers and we currently do not s

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

2024-12-03 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] [ast matcher] add `ExportDecl` in dynamically matchers (PR #118258)

2024-12-03 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: ping @5chmidti https://github.com/llvm/llvm-project/pull/118258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode][NFC] Diagnose non-constexpr builtin strcmp calls (PR #118442)

2024-12-03 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/118442 None >From cb6db092180506acff805971a6a24841a3aa758f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 3 Dec 2024 09:23:04 +0100 Subject: [PATCH] [clang][bytecode][NFC] Diagnose non-conste

[clang] [clang][bytecode][NFC] Diagnose non-constexpr builtin strcmp calls (PR #118442)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/118442.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+18-12) ``diff diff --git a/clang/lib/AST/ByteCode/

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

2024-12-03 Thread Martin Storsjö via cfe-commits
@@ -6418,6 +6418,12 @@ def warn_signed_bitfield_enum_conversion : Warning< InGroup, DefaultIgnore; def note_change_bitfield_sign : Note< "consider making the bitfield type %select{unsigned|signed}0">; +def warn_ms_bitfield_mismatched_storage_packing : Warning< + "bit-field

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

2024-12-03 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Thanks for working on that, LGTM 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-commit

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

2024-12-03 Thread Nathan Ridge 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-tools-extra] [clang-tidy] ignore `[[clang::lifetimebound]]` param in return-const-ref-from-parameter (PR #118315)

2024-12-03 Thread Mathias Stearn via cfe-commits
@@ -38,3 +29,21 @@ Example const S& s = fn(S{1}); s.v; // use after free + + +This issue can be resolved by declaring an overload of the problematic function +where the ``const &`` parameter is instead declared as ``&&``. The developer has +to ensure that the implementati

[clang] [clang][bytecode][NFC] Diagnose non-constexpr builtin strcmp calls (PR #118442)

2024-12-03 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/118442 ___ 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-03 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > 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 exposed to end-users directly, only > having programmatic access is fine initially. Thanks, that is ind

[clang] [Clang] Deleting an incomplete enum type is not an error (PR #118455)

2024-12-03 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/118455 The changes introduced in #97733 accidentally prevented to delete an incomplete enum (the validity of which has been confirmed by CWG2925 Fixes #99278 >From 8b89f6a56e0921b13c8638c9768ec99945825840 Mon Sep 17

[clang] [clang][bytecode] Initialize elements in __builtin_elementwise_popcount (PR #118457)

2024-12-03 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/118457 None >From fd60051545959575e3db2f033f4bd5d01cef6441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 3 Dec 2024 10:34:26 +0100 Subject: [PATCH] [clang][bytecode] Initialize elements in

[clang] [ASTWriter] Do not allocate source location space for module maps used only for textual headers (PR #116374)

2024-12-03 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: @jansvoboda11 friendly ping. We need this internally to relieve the pressure from the source location exhaustions happening on our side and it'd be great to land it. I am certain your concerns are addressed, but maybe you had other comments. https://github.com/llvm/llvm-pr

[clang] [Clang] Deleting an incomplete enum type is not an error (PR #118455)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes The changes introduced in #97733 accidentally prevented to delete an incomplete enum (the validity of which has been confirmed by CWG2925 Fixes #99278 --- Full diff: https://github.com/llvm/llvm-project/pull/1

[clang] [clang][bytecode] Initialize elements in __builtin_elementwise_popcount (PR #118457)

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

[clang] [Clang] Deleting an incomplete enum type is not an error (PR #118455)

2024-12-03 Thread via cfe-commits
@@ -540,6 +540,14 @@ namespace PR10504 { void f(A *x) { delete x; } // expected-warning {{delete called on 'PR10504::A' that is abstract but has non-virtual destructor}} } +#if __cplusplus >= 201103L +enum GH99278_1 { // expected-note {{definition of 'GH99278_1' is not comp

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

2024-12-03 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak updated https://github.com/llvm/llvm-project/pull/118249 >From 2d923a6c6a21ab68a968d49becfe5d22fc20096f 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] [clang] Apply internal buffering to clang diagnostics printing (PR #113440)

2024-12-03 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Ping? Does that make sense? If so, I'll try to figure clangd output swap that caused lit fail (which seems harmless). If not, I'll abandon this. https://github.com/llvm/llvm-project/pull/113440 ___ cfe-commits mailing list cfe-commits

[clang] [clang][ASTImporter] Not using primary context in lookup table (PR #118466)

2024-12-03 Thread Balázs Kéri via cfe-commits
@@ -3165,6 +3165,7 @@ ExpectedDecl ASTNodeImporter::VisitRecordDecl(RecordDecl *D) { if (Error Err = ImportImplicitMethods(DCXX, FoundCXX)) return std::move(Err); } +return FoundDef; balazske wrote: I

[clang] 3f39c5d - [clang][bytecode] Reject memcpy dummy pointers after null check (#118460)

2024-12-03 Thread via cfe-commits
Author: Timm Baeder Date: 2024-12-03T11:51:49+01:00 New Revision: 3f39c5df08d4ca1e7f852908e9fb255db24538da URL: https://github.com/llvm/llvm-project/commit/3f39c5df08d4ca1e7f852908e9fb255db24538da DIFF: https://github.com/llvm/llvm-project/commit/3f39c5df08d4ca1e7f852908e9fb255db24538da.diff L

[clang] [clang][bytecode] Reject memcpy dummy pointers after null check (PR #118460)

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

[clang] [clang][ASTImporter] Not using primary context in lookup table (PR #118466)

2024-12-03 Thread Balázs Kéri via cfe-commits
balazske wrote: I have tested the change with CTU analysis and did not see significant difference, and no new crashes (in these tests there was one known instance of unreachable at ASTImporterLookupTable.cpp:121 that is fixed by the change). There were some differences in the found reports, pr

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

2024-12-03 Thread Balazs Benics via cfe-commits
@@ -74,13 +74,13 @@ TEST_F(Z3CrosscheckOracleTest, SATWhenItGoesOverTime) { } TEST_F(Z3CrosscheckOracleTest, UNSATWhenItGoesOverTime) { - ASSERT_EQ(RejectEQClass, interpretQueryResult({UNSAT, 310_ms, 1000_step})); + ASSERT_EQ(RejectReport, interpretQueryResult({UNSAT, 310_ms

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

2024-12-03 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited 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] [analyzer][Z3] Restore the original timeout of 15s (PR #118291)

2024-12-03 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. I have no major concerns with this patch. I proposed some wording changes, and I think we should test the configuration we had for the defaults we had prior to this patch to showcase that what is the expected behavior for the s

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

2024-12-03 Thread Balazs Benics via cfe-commits
@@ -189,20 +189,23 @@ ANALYZER_OPTION( "crosscheck-with-z3-eqclass-timeout-threshold", "Set a timeout for bug report equivalence classes in milliseconds. " "If we exhaust this threshold, we will drop the bug report eqclass " -"instead of doing more Z3 queries. S

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

2024-12-03 Thread Balazs Benics via cfe-commits
@@ -189,20 +189,23 @@ ANALYZER_OPTION( "crosscheck-with-z3-eqclass-timeout-threshold", "Set a timeout for bug report equivalence classes in milliseconds. " "If we exhaust this threshold, we will drop the bug report eqclass " -"instead of doing more Z3 queries. S

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

2024-12-03 Thread Balazs Benics via cfe-commits
@@ -189,20 +189,23 @@ ANALYZER_OPTION( "crosscheck-with-z3-eqclass-timeout-threshold", "Set a timeout for bug report equivalence classes in milliseconds. " "If we exhaust this threshold, we will drop the bug report eqclass " -"instead of doing more Z3 queries. S

[clang] [llvm] [IR] Allow fast math flags on fptrunc and fpext (PR #115894)

2024-12-03 Thread Matt Arsenault via cfe-commits
@@ -1875,13 +1873,17 @@ Instruction *InstCombinerImpl::visitFPTrunc(FPTruncInst &FPT) { // fptrunc (select Cond, (fpext X), Y --> select Cond, X, (fptrunc Y) Value *NarrowY = Builder.CreateFPTrunc(Y, Ty); Value *Sel = Builder.CreateSelect(Cond, X, NarrowY, "n

[clang] [ast matcher] add `ExportDecl` in dynamically matchers (PR #118258)

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

[clang] [ast matcher] add `ExportDecl` in dynamically matchers (PR #118258)

2024-12-03 Thread Aaron Ballman via cfe-commits
@@ -604,6 +604,7 @@ RegistryMaps::RegistryMaps() { REGISTER_MATCHER(usingDecl); REGISTER_MATCHER(usingEnumDecl); REGISTER_MATCHER(usingDirectiveDecl); + REGISTER_MATCHER(exportDecl); AaronBallman wrote: This should be kept in alphabetical order. https:

[clang] [ast matcher] add `ExportDecl` in dynamically matchers (PR #118258)

2024-12-03 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM once the ordering is fixed; no need for a test or release note in this case. https://github.com/llvm/llvm-project/pull/118258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

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

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

[clang] Fix a bug with the hasAncestor AST matcher when a node has several parents without pointer identity (PR #118511)

2024-12-03 Thread Loïc Joly via cfe-commits
https://github.com/loic-joly-sonarsource created https://github.com/llvm/llvm-project/pull/118511 Before the change, getMemoizationData is used as a key to stop visiting the parents, but if a node has no identity, this is nullptr, which means that the visit will stop as soon as a second node w

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

2024-12-03 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/117143 >From b411d9185a6f761901bcc7c8ed147a8efd3b5301 Mon Sep 17 00:00:00 2001 From: wangmi Date: Tue, 26 Nov 2024 07:11:58 + Subject: [PATCH 1/2] [ASTMatcher] Fix redundant macro expansion checks in getExpan

[clang] Fix a bug with the hasAncestor AST matcher when a node has several parents without pointer identity (PR #118511)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Loïc Joly (loic-joly-sonarsource) Changes Before the change, getMemoizationData is used as a key to stop visiting the parents, but if a node has no identity, this is nullptr, which means that the visit will stop as soon as a second node w

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

2024-12-03 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/117143 ___ 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-03 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > We are planning to consume this downstream in the Swift compiler for C++ > interop. Swift has non-escapable types, like Swift's `Span` type. The interop > layer cannot bridge a C++ `std::span` as Swift's `Span` without this > additional information from the API's authors.

[clang] [llvm] [AArch64] Implement FP8 SVE Intrinsics for narrowing conversions (PR #118124)

2024-12-03 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/118124 ___ 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-03 Thread via cfe-commits
github-actions[bot] wrote: @mandymimi Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a buil

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

2024-12-03 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: > Why should this live upstream if it basically only benefits a single > downstream? This is a fair question, my intuition was that if the need came up multiple times independently, it might be worth to have it upstream. But it is also fair to wait until there is an actual up

[clang] Enable matrices in HLSL (PR #111415)

2024-12-03 Thread Florian Hahn via cfe-commits
@@ -852,34 +852,50 @@ void TypePrinter::printExtVectorAfter(const ExtVectorType *T, raw_ostream &OS) { void TypePrinter::printConstantMatrixBefore(const ConstantMatrixType *T, raw_ostream &OS) { + if (Policy.UseHLSLTypes) +OS <

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

2024-12-03 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: > What is it that consumes this? We are planning to consume this downstream in the Swift compiler for C++ interop. Swift has non-escapable types, like Swift's `Span` type. The interop layer cannot bridge a C++ `std::span` as Swift's `Span` without this additional information

[clang] Enable matrices in HLSL (PR #111415)

2024-12-03 Thread Florian Hahn via cfe-commits
@@ -459,8 +459,81 @@ void HLSLExternalSemaSource::defineHLSLVectorAlias() { HLSLNamespace->addDecl(Template); } +void HLSLExternalSemaSource::defineHLSLMatrixAlias() { + ASTContext &AST = SemaPtr->getASTContext(); fhahn wrote: Could you add a comment here

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-12-03 Thread Oren Benita Ben Simhon via cfe-commits
@@ -0,0 +1,158 @@ +//===--- RISCVRemoveBackToBackBranches.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-12-03 Thread Oren Benita Ben Simhon via cfe-commits
@@ -0,0 +1,158 @@ +//===--- RISCVRemoveBackToBackBranches.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] Fix a bug with the hasAncestor AST matcher when a node has several parents without pointer identity (PR #118511)

2024-12-03 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 57907c1a96e82c17b16111b919ab7c0f3d4370ab ed43bf26057073ba3f1b185838ba95048002980f --e

[clang] [llvm] [IR] Allow fast math flags on fptrunc and fpext (PR #115894)

2024-12-03 Thread John Brawn via cfe-commits
https://github.com/john-brawn-arm edited https://github.com/llvm/llvm-project/pull/115894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [IR] Allow fast math flags on fptrunc and fpext (PR #115894)

2024-12-03 Thread John Brawn via cfe-commits
@@ -1875,13 +1873,17 @@ Instruction *InstCombinerImpl::visitFPTrunc(FPTruncInst &FPT) { // fptrunc (select Cond, (fpext X), Y --> select Cond, X, (fptrunc Y) Value *NarrowY = Builder.CreateFPTrunc(Y, Ty); Value *Sel = Builder.CreateSelect(Cond, X, NarrowY, "n

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-12-03 Thread Oren Benita Ben Simhon via cfe-commits
@@ -0,0 +1,158 @@ +//===--- RISCVRemoveBackToBackBranches.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes (PR #116331)

2024-12-03 Thread Chris B via cfe-commits
@@ -2694,19 +2694,49 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register ResVReg, } return MIB.constrainAllUses(TII, TRI, RBI); } - case Intrinsic::spv_loop_merge: - case Intrinsic::spv_selection_merge: { -const auto Opcode = IID == Intrinsic::spv_select

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

2024-12-03 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > > Why should this live upstream if it basically only benefits a single > > > > downstream? > > > > > > > > > This is a fair question, my intuition was that if the need came up > > > multiple times independently, it might be worth to have it upstream. But > > > it is

[clang] [clang-format] Fix idempotent format of hash in macro body (PR #118513)

2024-12-03 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/118513 Fixes #118334. >From 309952ef482ccbef6cd13f90388139db435b4368 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 3 Dec 2024 08:51:13 -0800 Subject: [PATCH] [clang-format] Fix idempotent format of hash in macro b

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

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

[clang] [clang-format] Fix idempotent format of hash in macro body (PR #118513)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #118334. --- Full diff: https://github.com/llvm/llvm-project/pull/118513.diff 3 Files Affected: - (modified) clang/lib/Format/UnwrappedLineParser.cpp (+1-1) - (modified) clang/unittests/Format/For

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

2024-12-03 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun 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] Enable matrices in HLSL (PR #111415)

2024-12-03 Thread Florian Hahn via cfe-commits
@@ -2447,7 +2447,7 @@ QualType Sema::BuildExtVectorType(QualType T, Expr *ArraySize, QualType Sema::BuildMatrixType(QualType ElementTy, Expr *NumRows, Expr *NumCols, SourceLocation AttrLoc) { - assert(Context.getLangOpts().MatrixTypes && + as

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

2024-12-03 Thread via cfe-commits
Author: mandymi Date: 2024-12-03T11:22:56-05:00 New Revision: c9fbabfdc92f12b2b0148762e6e789157a172e4d URL: https://github.com/llvm/llvm-project/commit/c9fbabfdc92f12b2b0148762e6e789157a172e4d DIFF: https://github.com/llvm/llvm-project/commit/c9fbabfdc92f12b2b0148762e6e789157a172e4d.diff LOG:

[clang] Fix a bug with the hasAncestor AST matcher when a node has several parents without pointer identity (PR #118511)

2024-12-03 Thread Loïc Joly via cfe-commits
https://github.com/loic-joly-sonarsource updated https://github.com/llvm/llvm-project/pull/118511 From 8c6882a360d0f810346dd89f20d8af0ddf0bdfb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Joly?= Date: Tue, 3 Dec 2024 17:20:18 +0100 Subject: [PATCH] Fix a bug with the hasAncestor AST ma

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

2024-12-03 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > Why should this live upstream if it basically only benefits a single > > downstream? > > This is a fair question, my intuition was that if the need came up multiple > times independently, it might be worth to have it upstream. But it is also > fair to wait until there

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

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

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

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

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

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

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

2024-12-03 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: @hokein @ilya-biryukov https://github.com/llvm/llvm-project/pull/118501 ___ 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-03 Thread Erich Keane via cfe-commits
erichkeane wrote: > > > Why should this live upstream if it basically only benefits a single > > > downstream? > > > > > > This is a fair question, my intuition was that if the need came up multiple > > times independently, it might be worth to have it upstream. But it is also > > fair to wa

[clang] [ASTMatchers] AST matcher support for ObjC pointers (PR #117021)

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

[clang] Define a diagnostic group for missing variadic macro arguments (PR #116855)

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

<    1   2   3   4   5   6   >