[clang] [Clang][Sema] Expose static inline functions from GMF (PR #104701)

2024-08-20 Thread Chuanqi Xu via cfe-commits
Jan =?utf-8?q?Kokemüller?= , Jan =?utf-8?q?Kokemüller?= , Jan =?utf-8?q?Kokemüller?= Message-ID: In-Reply-To: @@ -6926,11 +6926,26 @@ void Sema::AddOverloadCandidate( /// have linkage. So that all entities of the same should share one /// linkage. But in clang, differ

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_await_elidable]] (PR #99282)

2024-08-20 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/99282 >From 92966fb0939574c78ccfd6b9a7b38035dae9d2e7 Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Tue, 4 Jun 2024 23:22:00 -0700 Subject: [PATCH] [Clang] Introduce [[clang::coro_await_elidable]] --- clang/

[clang] [Sparc] Add flags to enable errata workaround pass for GR712RC and UT700 (PR #104742)

2024-08-20 Thread Fangrui Song via cfe-commits
MaskRay wrote: This patch looks ok, but I expect justification why we need these -mfix-* options, which adds some, even if little, burden to the generic code. I asked because these are apparent workarounds. Sparc is a very old port that doesn't receive lots of development, and we should careful

[clang] [clang][bytecode] Fix diagnostic in final ltor cast (PR #105292)

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

[clang] a14c730 - [clang][bytecode] Fix diagnostic in final ltor cast (#105292)

2024-08-20 Thread via cfe-commits
Author: Timm Baeder Date: 2024-08-21T08:08:32+02:00 New Revision: a14c7309900f5a61f89b82f6f3d2dc5a51b3e1b4 URL: https://github.com/llvm/llvm-project/commit/a14c7309900f5a61f89b82f6f3d2dc5a51b3e1b4 DIFF: https://github.com/llvm/llvm-project/commit/a14c7309900f5a61f89b82f6f3d2dc5a51b3e1b4.diff L

[clang] [PS5][Driver] Link main components with -pie by default (PR #102901)

2024-08-20 Thread Fangrui Song via cfe-commits
@@ -1,3 +1,18 @@ +// Test that PIE is the default for main components + +// RUN: %clang --target=x86_64-scei-ps5 %s -### 2>&1 | FileCheck --check-prefixes=CHECK-PIE %s + +// CHECK-PIE: {{ld(\.exe)?}}" +// CHECK-PIE-SAME: "-pie" + +// RUN: %clang --target=x86_64-scei-ps5 -no-pie %

[clang] [PS5][Driver] Link main components with -pie by default (PR #102901)

2024-08-20 Thread Fangrui Song via cfe-commits
@@ -237,7 +237,10 @@ void tools::PS5cpu::Linker::ConstructJob(Compilation &C, const JobAction &JA, if (!D.SysRoot.empty()) CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot)); - if (Args.hasArg(options::OPT_pie)) + // Default to PIE for non-static main com

[clang] [llvm] [RISC-V] Make EmitRISCVCpuSupports accept multiple features (PR #104917)

2024-08-20 Thread Craig Topper via cfe-commits
@@ -21,6 +21,10 @@ namespace llvm { +namespace RISCV { +static constexpr unsigned FeatureBitSize = 2; topperc wrote: Can we put this in RISCVISAInfo? It describes the maximum value returned by RISCVISAInfo::getRISCVFeaturesBitsInfo. https://github.com/llvm

[clang] [llvm] [RISC-V] Make EmitRISCVCpuSupports accept multiple features (PR #104917)

2024-08-20 Thread Craig Topper via cfe-commits
@@ -14439,33 +14439,60 @@ Value *CodeGenFunction::EmitRISCVCpuSupports(const CallExpr *E) { if (!getContext().getTargetInfo().validateCpuSupports(FeatureStr)) return Builder.getFalse(); - // Note: We are making an unchecked assumption that the size of the - // feature

[clang] [Driver] Use llvm::make_range(std::pair) (NFC) (PR #105470)

2024-08-20 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/105470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Expose static inline functions from GMF (PR #104701)

2024-08-20 Thread Jan Kokemüller via cfe-commits
https://github.com/jiixyj updated https://github.com/llvm/llvm-project/pull/104701 From feaf6512fc6323ad0c3d5082c06e610504f0a527 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kokem=C3=BCller?= Date: Sun, 18 Aug 2024 13:45:43 +0200 Subject: [PATCH 1/3] Expose static inline function from GMF Th

[clang] [Driver] Use llvm::make_range(std::pair) (NFC) (PR #105470)

2024-08-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/105470.diff 1 Files Affected: - (modified) clang/lib/Driver/ToolChains/Clang.cpp (+1-1) ``diff diff --git a/clang/lib/Drive

[clang] [Driver] Use llvm::make_range(std::pair) (NFC) (PR #105470)

2024-08-20 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/105470 None >From 904e35f553a08a1eba956c115cd805d328587619 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 20 Aug 2024 21:39:43 -0700 Subject: [PATCH] [Driver] Use llvm::make_range(std::pair) (NFC) ---

[clang-tools-extra] [clang-tidy] Update TODO comment check (PR #104868)

2024-08-20 Thread Nathan James via cfe-commits
https://github.com/njames93 requested changes to this pull request. https://github.com/llvm/llvm-project/pull/104868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISC-V] Make EmitRISCVCpuSupports accept multiple features (PR #104917)

2024-08-20 Thread Piyou Chen via cfe-commits
@@ -32,6 +32,8 @@ struct RISCVExtensionBitmask { }; } // namespace RISCVExtensionBitmaskTable +static constexpr unsigned RISCVFeatureBitSize = 2; BeMg wrote: Now it named FeatureBitSize and place in RISCVISAInfo.h https://github.com/llvm/llvm-project/pull/10

[clang] [llvm] [RISC-V] Make EmitRISCVCpuSupports accept multiple features (PR #104917)

2024-08-20 Thread Piyou Chen via cfe-commits
@@ -14439,33 +14440,60 @@ Value *CodeGenFunction::EmitRISCVCpuSupports(const CallExpr *E) { if (!getContext().getTargetInfo().validateCpuSupports(FeatureStr)) return Builder.getFalse(); - // Note: We are making an unchecked assumption that the size of the - // feature

[clang] [llvm] [RISC-V] Make EmitRISCVCpuSupports accept multiple features (PR #104917)

2024-08-20 Thread Piyou Chen via cfe-commits
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/104917 >From c8b31f1e1d1d30cb8523772d3fd15a0358c540d6 Mon Sep 17 00:00:00 2001 From: Piyou Chen Date: Tue, 20 Aug 2024 04:37:20 -0700 Subject: [PATCH 1/5] [RISC-V] Make EmitRISCVCpuSupports accept multiple features This

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-08-20 Thread via cfe-commits
https://github.com/wangleiat updated https://github.com/llvm/llvm-project/pull/102411 >From 7bcf5ebc9444e7cb98746ef0d182cbd4b60196e2 Mon Sep 17 00:00:00 2001 From: wanglei Date: Thu, 8 Aug 2024 09:41:25 +0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF-8?

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-CONVERT new instructions. (PR #101600)

2024-08-20 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/101600 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CMake] Update CMake cache file for the ARM/Aarch64 cross toolchain builds. NFC. (PR #103552)

2024-08-20 Thread Vladimir Vereschaka via cfe-commits
https://github.com/vvereschaka updated https://github.com/llvm/llvm-project/pull/103552 >From aaa100a9c55d4c0680b3f8b0c93aeec05b25d88c Mon Sep 17 00:00:00 2001 From: Vladimir Vereschaka Date: Tue, 13 Aug 2024 20:52:56 -0700 Subject: [PATCH] [CMake] Update CMake cache file for the ARM/Aarch64 cr

[clang] [Clang][NFCI] Cleanup the fix for default function argument substitution (PR #104911)

2024-08-20 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/104911 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFCI] Cleanup the fix for default function argument substitution (PR #104911)

2024-08-20 Thread Younan Zhang via cfe-commits
@@ -285,7 +286,8 @@ Response HandleFunction(Sema &SemaRef, const FunctionDecl *Function, // If this function was instantiated from a specialized member that is // a function template, we're done. assert(Function->getPrimaryTemplate() && "No function template?"); -

[clang] [clang][CodeGen][SPIR-V][AMDGPU] Tweak AMDGCNSPIRV ABI to allow for the correct handling of aggregates passed to kernels / functions. (PR #102776)

2024-08-20 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/102776 >From d41faf6da8a9eed8c32f6a62fa9ebf38d5824c2c Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Sun, 11 Aug 2024 01:39:46 +0300 Subject: [PATCH 1/3] Tweak AMDGCNSPIRV ABI to allow for the correct handling of agg

[clang] [llvm] [BPF] introduce __attribute__((bpf_fastcall)) (PR #105417)

2024-08-20 Thread via cfe-commits
eddyz87 wrote: Hi @AaronBallman, @yonghong-song, This is a second try for `bpf_fastcall`, I had to revert the previous attempt in #101228 because of the "expensive tests" build bot failure for the main branch. The fix for the failure is in the second commit of this branch (I did not squash it

[clang] [Clang][Sema] Fix crash when type used in return statement contains errors (PR #79788)

2024-08-20 Thread Akira Hatanaka via cfe-commits
ahatanak wrote: I think this change can confuse users in some cases. ``` class Error { public: Error() = default; Error(Error &&); Error &operator=(Error &&); explicit operator bool() const; }; Error getError(); Error foo() { if (Error e = getError(1)) { return e; } return Er

[clang] [llvm] [BPF] introduce __attribute__((bpf_fastcall)) (PR #105417)

2024-08-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: None (eddyz87) Changes This commit introduces attribute bpf_fastcall to declare BPF functions that do not clobber some of the caller saved registers (R0-R5). The idea is to generate the code complying with generic BPF ABI, but allo

[clang] [llvm] [BPF] introduce __attribute__((bpf_fastcall)) (PR #105417)

2024-08-20 Thread via cfe-commits
https://github.com/eddyz87 ready_for_review https://github.com/llvm/llvm-project/pull/105417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] Clang2 (PR #105453)

2024-08-20 Thread Kyungwoo Lee via cfe-commits
https://github.com/kyulee-com created https://github.com/llvm/llvm-project/pull/105453 None >From 3ed59135c01fcc4d5b3ffa172575bbc74bbb0fb8 Mon Sep 17 00:00:00 2001 From: Kyungwoo Lee Date: Wed, 24 Apr 2024 09:40:34 -0700 Subject: [PATCH 1/4] [MachineOutliner][NFC] Refactor --- llvm/include/l

[clang] [llvm] [WebAssembly] Change half-precision feature name to fp16. (PR #105434)

2024-08-20 Thread Derek Schuff via cfe-commits
dschuff wrote: I'm fine with calling this feature fp16 (I like it better than half-precision anyway) but I also wanted to point out that consistency with the spec is probably more important in the long term than consistency with V8, because the V8 flags eventually disappear (once V8 enabled su

[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

2024-08-20 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 edited https://github.com/llvm/llvm-project/pull/97103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

2024-08-20 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 edited https://github.com/llvm/llvm-project/pull/97103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Change half-precision feature name to fp16. (PR #105434)

2024-08-20 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin commented: I know it is a little pedantic, but I recently sorted the features alphabetically (#90777)... Can you move the new `fp16` entries so that the lists are alphabetically sorted in the files? https://github.com/llvm/llvm-project/pull/105434 ___

[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

2024-08-20 Thread Joshua Batista via cfe-commits
@@ -0,0 +1,131 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify + +// TODO: Implement "Buffer", we use a substitute UDT +// to test the 't' binding type for this test. + +template +struct [[hlsl::resource_class(SRV)]] MyTemplated

[clang] [llvm] Fix KCFI types for generated functions with integer normalization (PR #104826)

2024-08-20 Thread Sami Tolvanen via cfe-commits
https://github.com/samitolvanen closed https://github.com/llvm/llvm-project/pull/104826 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e1c36bd - Fix KCFI types for generated functions with integer normalization (#104826)

2024-08-20 Thread via cfe-commits
Author: Sami Tolvanen Date: 2024-08-20T16:51:16-07:00 New Revision: e1c36bde0551977d4b2efae032af6dfc4b2b3936 URL: https://github.com/llvm/llvm-project/commit/e1c36bde0551977d4b2efae032af6dfc4b2b3936 DIFF: https://github.com/llvm/llvm-project/commit/e1c36bde0551977d4b2efae032af6dfc4b2b3936.diff

[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

2024-08-20 Thread Joshua Batista via cfe-commits
@@ -0,0 +1,76 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify + +// This test validates the diagnostics that are emitted when a variable with a "resource" type +// is bound to a register using the register annotation + +// expe

[clang] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-08-20 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,54 @@ +//===- DirectX.cpp +//---===// bogner wrote: Something happened to the formatting here https://github.com/llvm/llvm-project/pull/104856 ___ cfe-

[clang] [llvm] [HLSL][SPIRV]Add SPIRV generation for HLSL dot (PR #104656)

2024-08-20 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. https://github.com/llvm/llvm-project/pull/104656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Increase the default expression nesting limit (PR #104717)

2024-08-20 Thread via cfe-commits
dyung wrote: We are also seeing the test `Parser/parser_overflow.c` failing when run with ASan or UBSan. Running with `-fbracket-depth` options, I find that on my linux box, the test starts to segfault when the value is >= 1022: ``` dyung@aldebaran:~/src/upstream/llvm_clean_git/clang/test/Parse

[clang] [llvm] Fix KCFI types for generated functions with integer normalization (PR #104826)

2024-08-20 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/104826 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Change half-precision feature name to fp16. (PR #105434)

2024-08-20 Thread Brendan Dahl via cfe-commits
https://github.com/brendandahl updated https://github.com/llvm/llvm-project/pull/105434 >From fe8fc8201cd3ed5c2909ef512c55e70a30e14a5e Mon Sep 17 00:00:00 2001 From: Brendan Dahl Date: Tue, 20 Aug 2024 21:55:47 + Subject: [PATCH] [WebAssembly] Change half-precision feature name to fp16. Th

[clang] [llvm] [WebAssembly] Change half-precision feature name to fp16. (PR #105434)

2024-08-20 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 8f3050684ef22aa8403c3820e89ebef915136bf7 c4d120d4ec01f2af4e6ad748543ed195aa8f6721 --e

[clang] [llvm] [WebAssembly] Change half-precision feature name to fp16. (PR #105434)

2024-08-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Brendan Dahl (brendandahl) Changes This better aligns with how the feature is being referred to and what runtimes (V8) are calling it. --- Patch is 24.52 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/ll

[clang] [llvm] [WebAssembly] Change half-precision feature name to fp16. (PR #105434)

2024-08-20 Thread Brendan Dahl via cfe-commits
https://github.com/brendandahl created https://github.com/llvm/llvm-project/pull/105434 This better aligns with how the feature is being referred to and what runtimes (V8) are calling it. >From c4d120d4ec01f2af4e6ad748543ed195aa8f6721 Mon Sep 17 00:00:00 2001 From: Brendan Dahl Date: Tue, 20

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-08-20 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/86618 >From 97de8998e2efd2362f9119c3ceea0938347278f4 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 5 Mar 2024 03:14:49 + Subject: [PATCH] implement wraps attribute Signed-off-by: Justin Stitt --- cl

[clang] [clang-repl] [codegen] Reduce the state in TBAA. NFC for static compilation. (PR #98138)

2024-08-20 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/98138 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] introduce __attribute__((bpf_fastcall)) (PR #105417)

2024-08-20 Thread via cfe-commits
https://github.com/eddyz87 created https://github.com/llvm/llvm-project/pull/105417 This commit introduces attribute bpf_fastcall to declare BPF functions that do not clobber some of the caller saved registers (R0-R5). The idea is to generate the code complying with generic BPF ABI, but allow c

[clang] [PS5][Driver] Link main components with -pie by default (PR #102901)

2024-08-20 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/102901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Fix KCFI types for generated functions with integer normalization (PR #104826)

2024-08-20 Thread Ramon de C Valle via cfe-commits
rcvalle wrote: LGTM. Thanks again for your time and for working on this, @samitolvanen! Much appreciated. https://github.com/llvm/llvm-project/pull/104826 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [clang] Merge lifetimebound and GSL code paths for lifetime analysis (PR #104906)

2024-08-20 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/104906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Merge lifetimebound and GSL code paths for lifetime analysis (PR #104906)

2024-08-20 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 approved this pull request. Thanks. This looks great. https://github.com/llvm/llvm-project/pull/104906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Merge lifetimebound and GSL code paths for lifetime analysis (PR #104906)

2024-08-20 Thread Utkarsh Saxena via cfe-commits
@@ -478,22 +444,38 @@ static void visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call, CheckCoroObjArg = false; if (implicitObjectParamIsLifetimeBound(Callee) || CheckCoroObjArg) VisitLifetimeBoundArg(Callee, ObjectArg); +else if (EnableGSLAnaly

[clang] [clang] Merge lifetimebound and GSL code paths for lifetime analysis (PR #104906)

2024-08-20 Thread Utkarsh Saxena via cfe-commits
@@ -439,6 +378,8 @@ static void visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call, if (!Callee) return; + bool EnableGSLAnalysis = !Callee->getASTContext().getDiagnostics().isIgnored( usx95 wrote: Can we move this to `VisitGSLPointerArg`

[clang] [clang] Merge lifetimebound and GSL code paths for lifetime analysis (PR #104906)

2024-08-20 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/104906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Don't Merge][-Wunsafe-buffer-usage] Add a new option for unsafe buffer warnings on libc functions (PR #105383)

2024-08-20 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 c89e9e7d9e9d7c4b30e2d911f4d68ec66e6c68d8 ddceaaf34a5237744991a077c0a88dca52eddf60 --e

[clang] [Don't Merge][-Wunsafe-buffer-usage] Add a new option for unsafe buffer warnings on libc functions (PR #105383)

2024-08-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis @llvm/pr-subscribers-clang Author: Ziqing Luo (ziqingluo-90) Changes Depending on https://github.com/llvm/llvm-project/pull/101583 (rdar://117182250) --- Patch is 41.29 KiB, truncated to 20.00 KiB below, full version: https://github.co

[clang] [Don't Merge][-Wunsafe-buffer-usage] Add a new option for unsafe buffer warnings on libc functions (PR #105383)

2024-08-20 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 created https://github.com/llvm/llvm-project/pull/105383 Depending on https://github.com/llvm/llvm-project/pull/101583 (rdar://117182250) >From b0970a849a21180315ace77e40f3db95fddac346 Mon Sep 17 00:00:00 2001 From: Ziqing Luo Date: Thu, 1 Aug 2024 16:36:27 -07

[clang-tools-extra] [clang-tidy][modernize-use-starts-ends-with] Add support for two ends_with patterns (PR #105366)

2024-08-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Nicolas van Kempen (nicovank) Changes Add support for the following two patterns which are found occasionally, that can be replaced with `ends_with`. ```cpp haystack.compare(haystack.length() - needle.length(), needle.length(), needle

[clang-tools-extra] [clang-tidy][modernize-use-starts-ends-with] Add support for two ends_with patterns (PR #105366)

2024-08-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Nicolas van Kempen (nicovank) Changes Add support for the following two patterns which are found occasionally, that can be replaced with `ends_with`. ```cpp haystack.compare(haystack.length() - needle.length(), needle.length(),

[clang-tools-extra] [clang-tidy][modernize-use-starts-ends-with] Add support for two ends_with patterns (PR #105366)

2024-08-20 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank created https://github.com/llvm/llvm-project/pull/105366 Add support for the following two patterns which are found occasionally, that can be replaced with `ends_with`. ```cpp haystack.compare(haystack.length() - needle.length(), needle.length(), needle) == 0; hayst

[clang] Fix bug with -ffp-contract=fast-honor-pragmas (PR #104857)

2024-08-20 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/104857 >From 59ac754b9a88037e2348f16e5dc7efbd437d65cb Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Mon, 19 Aug 2024 13:41:40 -0700 Subject: [PATCH 1/3] Fix bug with -ffp-contract=fast-honor-pragmas This fixes a

[clang] [clang-repl] [codegen] Reduce the state in TBAA. NFC for static compilation. (PR #98138)

2024-08-20 Thread Vassil Vassilev via cfe-commits
@@ -106,9 +101,9 @@ class CodeGenTypes { } CodeGenModule &getCGM() const { return CGM; } ASTContext &getContext() const { return Context; } - const ABIInfo &getABIInfo() const { return TheABIInfo; } + const ABIInfo &getABIInfo() const; vgvassilev wrote:

[clang] [clang-repl] [codegen] Reduce the state in TBAA. NFC for static compilation. (PR #98138)

2024-08-20 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/98138 >From 25387b0129af396c95ec503d29cca78367a7ec19 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Tue, 9 Jul 2024 09:30:19 + Subject: [PATCH 1/2] [clang-repl] [codegen] Reduce the state in TBAA. NFC for

[clang] [clang] Merge lifetimebound and GSL code paths for lifetime analysis (PR #104906)

2024-08-20 Thread Haojian Wu via cfe-commits
@@ -478,13 +449,32 @@ static void visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call, CheckCoroObjArg = false; if (implicitObjectParamIsLifetimeBound(Callee) || CheckCoroObjArg) VisitLifetimeBoundArg(Callee, ObjectArg); +else if (EnableLifetime

[clang] [clang] Merge lifetimebound and GSL code paths for lifetime analysis (PR #104906)

2024-08-20 Thread Haojian Wu via cfe-commits
@@ -478,13 +449,32 @@ static void visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call, CheckCoroObjArg = false; if (implicitObjectParamIsLifetimeBound(Callee) || CheckCoroObjArg) VisitLifetimeBoundArg(Callee, ObjectArg); +else if (EnableLifetime

[clang] [clang] Merge lifetimebound and GSL code paths for lifetime analysis (PR #104906)

2024-08-20 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/104906 >From 773a03b25a94d991206f4b517eefdf3693e6a287 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 20 Aug 2024 10:22:44 +0200 Subject: [PATCH 1/2] [clang] Merge the lifetimebound and GSL code paths for lifetime

[clang] [Clang] [Parser] Improve diagnostic for `friend concept` (PR #105121)

2024-08-20 Thread via cfe-commits
@@ -3139,6 +3139,19 @@ Parser::DeclGroupPtrTy Parser::ParseCXXClassMemberDeclaration( return Actions.BuildDeclaratorGroup(Decls); } + // Befriending a concept is invalid and would already fail if + // we did nothing here, but this allows us to issue a more + // helpf

[clang] [clang-format] Change BinPackParameters to enum and add AlwaysOnePerLine (PR #101882)

2024-08-20 Thread via cfe-commits
@@ -403,13 +416,25 @@ TEST_F(FormatTestComments, UnderstandsBlockComments) { verifyFormat("f(/* aa = */\n" " );"); - FormatStyle NoBinPacking = getLLVMStyle(); - NoBinPacking.BinPackParamet

[clang] [clang-format] Change BinPackParameters to enum and add AlwaysOnePerLine (PR #101882)

2024-08-20 Thread via cfe-commits
https://github.com/VolatileAcorn updated https://github.com/llvm/llvm-project/pull/101882 >From ddb5bad1cd1bed8781b9156e1058a9cc1347 Mon Sep 17 00:00:00 2001 From: Tom Pottage Date: Fri, 2 Aug 2024 20:26:47 +0100 Subject: [PATCH 1/4] [clang-format] Change BinPackParameters to an enum and i

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-20 Thread Bill Wendling via cfe-commits
https://github.com/bwendling closed https://github.com/llvm/llvm-project/pull/104889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 295fe0b - [Clang] Re-land Overflow Pattern Exclusions (#104889)

2024-08-20 Thread via cfe-commits
Author: Justin Stitt Date: 2024-08-20T20:13:44Z New Revision: 295fe0bd438209831071ffbacf003c4941f31b90 URL: https://github.com/llvm/llvm-project/commit/295fe0bd438209831071ffbacf003c4941f31b90 DIFF: https://github.com/llvm/llvm-project/commit/295fe0bd438209831071ffbacf003c4941f31b90.diff LOG:

[clang] [Clang] [Parser] Improve diagnostic for `friend concept` (PR #105121)

2024-08-20 Thread Shafik Yaghmour via cfe-commits
@@ -3139,6 +3139,19 @@ Parser::DeclGroupPtrTy Parser::ParseCXXClassMemberDeclaration( return Actions.BuildDeclaratorGroup(Decls); } + // Befriending a concept is invalid and would already fail if + // we did nothing here, but this allows us to issue a more + // helpf

[clang-tools-extra] [clang-tidy] Use upper case letters for bool conversion suffix (PR #104882)

2024-08-20 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp approved this pull request. LGTM, maybe give a couple more days for other reviewers in case they have more comments. https://github.com/llvm/llvm-project/pull/104882 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [NFC] Fix a typo in InternalsManual: ActOnCXX -> ActOnXXX (PR #105207)

2024-08-20 Thread Michael Park via cfe-commits
https://github.com/mpark closed https://github.com/llvm/llvm-project/pull/105207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 660de53 - [NFC] Fix a typo in InternalsManual: ActOnCXX -> ActOnXXX (#105207)

2024-08-20 Thread via cfe-commits
Author: Michael Park Date: 2024-08-20T13:00:51-07:00 New Revision: 660de533a23485eec4c5f8d3d88f9dd53497bcf8 URL: https://github.com/llvm/llvm-project/commit/660de533a23485eec4c5f8d3d88f9dd53497bcf8 DIFF: https://github.com/llvm/llvm-project/commit/660de533a23485eec4c5f8d3d88f9dd53497bcf8.diff

[clang] [NFC] Fix a typo in InternalsManual: ActOnCXX -> ActOnXXX (PR #105207)

2024-08-20 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/105207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix a typo in InternalsManual: ActOnCXX -> ActOnXXX (PR #105207)

2024-08-20 Thread Michael Park via cfe-commits
mpark wrote: > LGTM > > We do have some `ActOnCXX...` functions, so that’s probably how that happened > ;Þ Haha yep. I suspect that as well. https://github.com/llvm/llvm-project/pull/105207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] Fixed two typos: "__builin_" --> "__builtin_" (PR #98782)

2024-08-20 Thread via cfe-commits
Sirraide wrote: > I will definitely go checkout the Discord if I spot more typos. Feel free to open a pr and just @ me if you find more ;Þ https://github.com/llvm/llvm-project/pull/98782 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] Fixed two typos: "__builin_" --> "__builtin_" (PR #98782)

2024-08-20 Thread via cfe-commits
ZERICO2005 wrote: Fair enough. I only found it cause I was wondering why Ctrl F for __buil showed 2 more results than __builtin I will definitely go checkout the Discord if I spot more typos. On Tue, Aug 20, 2024 at 13:49 Sirraide ***@***.***> wrote: > ***@***. approved this pull request. >

[clang] Fix a typo in InternalsManual: ActOnCXX -> ActOnXXX (PR #105207)

2024-08-20 Thread via cfe-commits
Sirraide wrote: (Oh, but put `[NFC]` at the start of the commit message when merging please) https://github.com/llvm/llvm-project/pull/105207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] Fix a typo in InternalsManual: ActOnCXX -> ActOnXXX (PR #105207)

2024-08-20 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. LGTM We do have some `ActOnCXX...` functions, so that’s probably how that happened ;Þ https://github.com/llvm/llvm-project/pull/105207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] Fixed two typos: "__builin_" --> "__builtin_" (PR #98782)

2024-08-20 Thread via cfe-commits
github-actions[bot] wrote: @ZERICO2005 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 bui

[clang] Fixed two typos: "__builin_" --> "__builtin_" (PR #98782)

2024-08-20 Thread via cfe-commits
https://github.com/Sirraide closed https://github.com/llvm/llvm-project/pull/98782 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d03dcf6 - [NFC] Fixed two typos: "__builin_" --> "__builtin_" (#98782)

2024-08-20 Thread via cfe-commits
Author: ZERICO2005 Date: 2024-08-20T21:49:40+02:00 New Revision: d03dcf6e8c360e2b46bed16b329d186c68fbcc6a URL: https://github.com/llvm/llvm-project/commit/d03dcf6e8c360e2b46bed16b329d186c68fbcc6a DIFF: https://github.com/llvm/llvm-project/commit/d03dcf6e8c360e2b46bed16b329d186c68fbcc6a.diff LO

[clang] Fixed two typos: "__builin_" --> "__builtin_" (PR #98782)

2024-08-20 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. LGTM. Hmm, it seems like this somehow flew under the radar (I also just randomly happened to see this while looking for something else just now). In the future, feel free to add a comment with ‘ping’ or something along those lines to th

[clang] [DebugInfo] Add flag to only emit referenced member functions (PR #87018)

2024-08-20 Thread David Blaikie via cfe-commits
dwblaikie wrote: > Looking forward to trying this out! > > Should the new flag have some docs and maybe be mentioned in the release > notes, or do we think it's not ready for prime time yet for some reason? I'm /pretty/ neutral on that - it's got pretty clear behavior, etc (& in fact some cla

[clang] [llvm] [RISCV] Add CSRs and an instruction for Smctr and Ssctr extensions. (PR #105148)

2024-08-20 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. https://github.com/llvm/llvm-project/pull/105148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Support -Wa, options -mmsa and -mno-msa (PR #99615)

2024-08-20 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/99615 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 26ae316 - [clang] Support -Wa, options -mmsa and -mno-msa (#99615)

2024-08-20 Thread via cfe-commits
Author: yingopq Date: 2024-08-20T12:40:49-07:00 New Revision: 26ae31662b4ac3fe5569733316ac7de9d19d5fd5 URL: https://github.com/llvm/llvm-project/commit/26ae31662b4ac3fe5569733316ac7de9d19d5fd5 DIFF: https://github.com/llvm/llvm-project/commit/26ae31662b4ac3fe5569733316ac7de9d19d5fd5.diff LOG:

[clang] [clang][bytecode] Fix diagnostic in final ltor cast (PR #105292)

2024-08-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Don't diagnose volatile reads but diagnose a few other accesses earlier. --- Full diff: https://github.com/llvm/llvm-project/pull/105292.diff 5 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.

[clang] [clang] Support -Wa, options -mmsa and -mno-msa (PR #99615)

2024-08-20 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/99615 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Support -Wa, options -mmsa and -mno-msa (PR #99615)

2024-08-20 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,8 @@ +// RUN: %clang -### -c --target=mips64el-unknown-linux-gnuabi64 \ MaskRay wrote: We don't need -fno-integrated-as tests. They are just forwarded. The -mmsa test needs a NOT. I'll push a commit to improve the test https://github.com/llvm/llvm-pr

[clang] [clang] Support -Wa, options -mmsa and -mno-msa (PR #99615)

2024-08-20 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/99615 >From 7c839979164229ecbbdafb684107a6017b354df8 Mon Sep 17 00:00:00 2001 From: Ying Huang Date: Fri, 19 Jul 2024 04:19:09 -0400 Subject: [PATCH 1/2] [clang] Support -Wa, options -mmsa and -mno-msa --- clang/incl

[clang] [Clang] Fix potential null pointer dereferences in Sema::AddInitializerToDecl (PR #94368)

2024-08-20 Thread via cfe-commits
smanna12 wrote: >>That is interesting as it implies that the call to >>InitializationSequence::Perform() did indeed return a result that was valid >>but null. Would you be able to debug to find out where that null result is >>coming from? Perhaps here: clang/lib/Sema/SemaInit.cpp: Thanks @tah

[clang] [clang][bytecode] Fix diagnostic in final ltor cast (PR #105292)

2024-08-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/105292 Don't diagnose volatile reads but diagnose a few other accesses earlier. >From 8580230aad18c0955e92767e843344579dac1a66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 20 Aug 2024 18:06

[clang] [llvm] [OpenMP] Map `omp_default_mem_alloc` to global memory (PR #104790)

2024-08-20 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: For some reason this broke the bots, e.g., https://lab.llvm.org/buildbot/#/builders/30/builds/4417 https://lab.llvm.org/staging/#/builders/97/builds/2453 https://github.com/llvm/llvm-project/pull/104790 ___ cfe-commits mailing list cfe-c

[clang] [llvm] AMDGPU: Remove flat/global atomic fadd v2bf16 intrinsics (PR #97050)

2024-08-20 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/97050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang/AMDGPU: Emit atomicrmw for flat/global atomic min/max f64 builtins (PR #96876)

2024-08-20 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm closed https://github.com/llvm/llvm-project/pull/96876 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 93e0f31 - clang/AMDGPU: Emit atomicrmw for flat/global atomic min/max f64 builtins (#96876)

2024-08-20 Thread via cfe-commits
Author: Matt Arsenault Date: 2024-08-20T23:24:15+04:00 New Revision: 93e0f312c2a8709e7d4747570ddd40243314ea6b URL: https://github.com/llvm/llvm-project/commit/93e0f312c2a8709e7d4747570ddd40243314ea6b DIFF: https://github.com/llvm/llvm-project/commit/93e0f312c2a8709e7d4747570ddd40243314ea6b.diff

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-20 Thread Justin Stitt via cfe-commits
@@ -119,6 +119,10 @@ static SanitizerMask parseArgValues(const Driver &D, const llvm::opt::Arg *A, static int parseCoverageFeatures(const Driver &D, const llvm::opt::Arg *A, bool DiagnoseErrors); +static int parseOverflowPatternExclusionValues

  1   2   3   4   >