[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-11-27 Thread via cfe-commits
https://github.com/charan-003 edited https://github.com/llvm/llvm-project/pull/117953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Serialization] Downgrade error to warning for inconsistent language flags (PR #117840)

2024-11-27 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > I don't think the discussion here has run its course > > #115416 > > Yeah, I had explicitly asked for a review from @Bigcheese before that landed, > so I was surprised to see that get merged. I misread it. I thought it wasn't message to me. It would be clear if you ask m

[clang] [clang] Don't warn if the capturing object is also temporary. (PR #117733)

2024-11-27 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: I considered this during implementation. This is a little controversial. It is possible that the temporary capturing object uses the captured entity in its destructor. In principle, we can always detect the order of destructions of the temporaries and choose to suppress cases when

[clang] [libcxx] [C++20] [Modules] Convert '-fexperimental-modules-reduced-bmi' to '-fmodules-reduced-bmi' (PR #114382)

2024-11-27 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Oh, I didn't notice libcxx will test with clang17 and clang18 too. Where we didn't introduce reduced bmi. We can't use `-Wno-missing-reduced-bmi` since it won't be recognized by clang17 and clang18. @ldionne @mordante do you think how can we proceed on this? https://github.

[clang] [llvm] [LoongArch] Support sc.q instruction for 128bit cmpxchg operation (PR #116771)

2024-11-27 Thread via cfe-commits
https://github.com/tangaac updated https://github.com/llvm/llvm-project/pull/116771 >From ee422d26ad2695d34b0bf471f6d4fa2c3bef8ca8 Mon Sep 17 00:00:00 2001 From: tangaac Date: Tue, 19 Nov 2024 17:43:31 +0800 Subject: [PATCH] [LoongArch] Support sc.q instruction for 128bit cmpxchg operation --

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures (PR #117953)

2024-11-27 Thread via cfe-commits
https://github.com/charan-003 created https://github.com/llvm/llvm-project/pull/117953 **Key Changes** **Enhancements in SemaLambda.cpp:** Updated the ExplicitCaptureRanges logic to compute more precise source ranges for unused lambda captures. - Fixed the handling of edge cases, including: -

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures (PR #117953)

2024-11-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (charan-003) Changes **Key Changes** **Enhancements in SemaLambda.cpp:** Updated the ExplicitCaptureRanges logic to compute more precise source ranges for unused lambda captures. - Fixed the handling of edge cases, including: - Trai

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures (PR #117953)

2024-11-27 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [Driver] Do not add gno-column-info when using sampling PGO (PR #117954)

2024-11-27 Thread Haohai Wen via cfe-commits
https://github.com/HaohaiWen created https://github.com/llvm/llvm-project/pull/117954 Column info is important for sampling PGO to generate/load profile file. On windows, it will be automatically added when using -gdwarf to generate profile file. It should also be generated when fprofile-sample-

[clang] [Driver] Do not add gno-column-info when using sampling PGO (PR #117954)

2024-11-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Haohai Wen (HaohaiWen) Changes Column info is important for sampling PGO to generate/load profile file. On windows, it will be automatically added when using -gdwarf to generate profile file. It should also be generated when fprofile

[clang] [llvm] [LoongArch] Support sc.q instruction for 128bit cmpxchg operation (PR #116771)

2024-11-27 Thread via cfe-commits
https://github.com/tangaac updated https://github.com/llvm/llvm-project/pull/116771 >From ee422d26ad2695d34b0bf471f6d4fa2c3bef8ca8 Mon Sep 17 00:00:00 2001 From: tangaac Date: Tue, 19 Nov 2024 17:43:31 +0800 Subject: [PATCH 1/2] [LoongArch] Support sc.q instruction for 128bit cmpxchg operation

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcicsr (CSR) extension (PR #117169)

2024-11-27 Thread Sudharsan Veeravalli via cfe-commits
https://github.com/svs-quic updated https://github.com/llvm/llvm-project/pull/117169 >From 92a3e2e9c44c03093e6050b92b938fd2a0d6886c Mon Sep 17 00:00:00 2001 From: Sudharsan Veeravalli Date: Wed, 20 Nov 2024 13:24:07 +0530 Subject: [PATCH 1/4] [RISCV] Add Qualcomm uC Xqcicsr (CSR) extension The

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcicsr (CSR) extension (PR #117169)

2024-11-27 Thread Sudharsan Veeravalli via cfe-commits
@@ -771,6 +771,10 @@ Error RISCVISAInfo::checkDependency() { return getIncompatibleError("xwchc", "zcb"); } + if (Exts.count("xqcicsr") != 0 && (XLen != 32)) { +return getError("'xqcicsr' is only supported in 'rv32'"); svs-quic wrote: Done https

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcicsr (CSR) extension (PR #117169)

2024-11-27 Thread Sudharsan Veeravalli via cfe-commits
@@ -0,0 +1,19 @@ +# Xqcicsr - Qualcomm uC CSR Extension +# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-xqcicsr -riscv-no-aliases -show-encoding \ +# RUN: | FileCheck -check-prefixes=CHECK-ENC,CHECK-INST %s +# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+experim

[clang] [llvm] [RISCV] Add stack clash protection (PR #117612)

2024-11-27 Thread Craig Topper via cfe-commits
@@ -610,22 +610,134 @@ static MCCFIInstruction createDefCFAOffset(const TargetRegisterInfo &TRI, Comment.str()); } +// Allocate stack space and probe it if necessary. void RISCVFrameLowering::allocateStack(MachineBasicBlock &MBB,

[clang] [llvm] [X86] Enhance kCFI type IDs with a 3-bit arity indicator. (PR #117121)

2024-11-27 Thread Scott Constable via cfe-commits
scottconstable wrote: This PR is intended to improve security for X86 kernels, as the title suggests. I think that we can and should incorporate feedback from the other participants, several of whom have recommended that this new behavior should be explicitly enabled with a flag, rather than i

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

2024-11-27 Thread Joel E. Denny via cfe-commits
@@ -1311,4 +1314,96 @@ COMPILER_RT_VISIBILITY int __llvm_profile_set_file_object(FILE *File, return 0; } +int __llvm_write_custom_profile(const char *Target, +const __llvm_profile_data *DataBegin, +const __llvm

[clang] [compiler-rt] [llvm] [XRay][RISCV] RISCV support for XRay (PR #117368)

2024-11-27 Thread Min-Yih Hsu via cfe-commits
@@ -57,6 +57,10 @@ static const int16_t cSledLength = 64; static const int16_t cSledLength = 8; #elif defined(__hexagon__) static const int16_t cSledLength = 20; +#elif SANITIZER_RISCV64 +static const int16_t cSledLength = 76; +#elif defined(__riscv) && (__riscv_xlen == 32) ---

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Add GPU profiling flags to driver (PR #94268)

2024-11-27 Thread Ethan Luis McDonough via cfe-commits
EthanLuisMcDonough wrote: > > > For some codes, I get the following error for a gfx906: > > > ``` > > > LLVM ERROR: Relocation for CG Profile could not be created: unknown > > > relocation name > > > ``` > > > Not sure if this is still relevant, but I think #114617 should fix this > > issue.

[clang] [analyzer] Modernize, improve and promote chroot checker (PR #117791)

2024-11-27 Thread via cfe-commits
@@ -80,19 +88,53 @@ bool ChrootChecker::evalCall(const CallEvent &Call, CheckerContext &C) const { void ChrootChecker::evalChroot(const CallEvent &Call, CheckerContext &C) const { ProgramStateRef state = C.getState(); ProgramStateManager &Mgr = state->getStateManager(); +

[clang] [compiler-rt] [llvm] [XRay][RISCV] RISCV support for XRay (PR #117368)

2024-11-27 Thread Min-Yih Hsu via cfe-commits
https://github.com/mshockwave edited https://github.com/llvm/llvm-project/pull/117368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Modernize, improve and promote chroot checker (PR #117791)

2024-11-27 Thread via cfe-commits
@@ -98,9 +98,9 @@ void ChrootChecker::evalChroot(const CallEvent &Call, CheckerContext &C) const { const auto *CE = cast(Call.getOriginExpr()); const LocationContext *LCtx = C.getLocationContext(); - NonLoc RetVal = - SVB.conjureSymbolVal(/*SymbolTag=*/nullptr,

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2024-11-27 Thread Jonas Paulsson via cfe-commits
@@ -1883,6 +1931,10 @@ void SystemZInstrInfo::getLoadStoreOpcodes(const TargetRegisterClass *RC, } else if (RC == &SystemZ::FP128BitRegClass) { LoadOpcode = SystemZ::LX; StoreOpcode = SystemZ::STX; + } else if (RC == &SystemZ::FP16BitRegClass || + RC ==

[clang] [llvm] [X86] Enhance kCFI type IDs with a 3-bit arity indicator. (PR #117121)

2024-11-27 Thread Matthew Maurer via cfe-commits
maurer wrote: This is not a Rust concern, but re-reading the initial post, it *looks* like your own statistics suggest that consuming 3 bits for arity costs more than it buys you. As stated, (didn't check your math, just going off what you said) prior to your change, we expect 0.01383765 colli

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

2024-11-27 Thread Joel E. Denny via cfe-commits
@@ -1,12 +1,17 @@ -// RUN: %libomptarget-compile-generic -fprofile-instr-generate \ -// RUN: -Xclang "-fprofile-instrument=clang" -// RUN: %libomptarget-run-generic 2>&1 | %fcheck-generic \ -// RUN: --check-prefix="CLANG-PGO" // RUN: %libomptarget-compile-generic -fprofil

[clang] [analyzer] Modernize, improve and promote chroot checker (PR #117791)

2024-11-27 Thread via cfe-commits
@@ -121,17 +183,40 @@ void ChrootChecker::checkPreCall(const CallEvent &Call, return; // If jail state is ROOT_CHANGED, generate BugReport. - void *const* k = C.getState()->FindGDM(ChrootChecker::getTag()); - if (k) -if (isRootChanged((intptr_t) *k)) - if (Exp

[clang] [llvm] [X86] Enhance kCFI type IDs with a 3-bit arity indicator. (PR #117121)

2024-11-27 Thread Scott Constable via cfe-commits
https://github.com/scottconstable edited https://github.com/llvm/llvm-project/pull/117121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Modernize, improve and promote chroot checker (PR #117791)

2024-11-27 Thread via cfe-commits
https://github.com/vabridgers updated https://github.com/llvm/llvm-project/pull/117791 >From ed174c8b52880d4f89415eb3a72da13f355438d7 Mon Sep 17 00:00:00 2001 From: einvbri Date: Mon, 25 Nov 2024 10:31:57 +0100 Subject: [PATCH 1/4] [analyzer] Modernize, improve and promote chroot checker This

[clang] [llvm] [X86] Enhance kCFI type IDs with a 3-bit arity indicator. (PR #117121)

2024-11-27 Thread Scott Constable via cfe-commits
https://github.com/scottconstable edited https://github.com/llvm/llvm-project/pull/117121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix name lookup for dependent bases (PR #114978)

2024-11-27 Thread Vladislav Belov via cfe-commits
vbe-sc wrote: Such an example causes a failure in my patch ```c++ template class X { public: X() = default; virtual ~X() = default; virtual int foo(int x, int y, T &entry) = 0; void bar() { struct Processor : public X { Processor() : X() {} int foo(int, int, T &) ove

[clang] [clang] Improve the lifetime_capture_by diagnostic on the constructor. (PR #117792)

2024-11-27 Thread Utkarsh Saxena via cfe-commits
@@ -535,6 +535,9 @@ static void visitFunctionCallArguments(IndirectLocalPath &Path, Expr *Call, bool EnableGSLAnalysis = !Callee->getASTContext().getDiagnostics().isIgnored( diag::warn_dangling_lifetime_pointer, SourceLocation()); + bool EnableDanglingCapture = +

[clang] [clang] Improve the lifetime_capture_by diagnostic on the constructor. (PR #117792)

2024-11-27 Thread Utkarsh Saxena via cfe-commits
@@ -411,3 +411,22 @@ void use() { } } // namespace with_span } // namespace inferred_capture_by + +namespace on_constructor { +struct T { + T(const int& t [[clang::lifetime_capture_by(this)]]); +}; +struct T2 { + T2(const int& t [[clang::lifetime_capture_by(x)]], int& x); +};

[clang] [llvm] [LoongArch] Support sc.q instruction for 128bit cmpxchg operation (PR #116771)

2024-11-27 Thread via cfe-commits
https://github.com/tangaac updated https://github.com/llvm/llvm-project/pull/116771 >From ee422d26ad2695d34b0bf471f6d4fa2c3bef8ca8 Mon Sep 17 00:00:00 2001 From: tangaac Date: Tue, 19 Nov 2024 17:43:31 +0800 Subject: [PATCH 1/2] [LoongArch] Support sc.q instruction for 128bit cmpxchg operation

[clang] [Driver] Support fprofile-sample-use= for CL (PR #117282)

2024-11-27 Thread Fangrui Song via cfe-commits
MaskRay wrote: Adding CLOption to -fprofile-sample-use= suffices. We don't need these CLJoined aliases. They are for MSVC options that are ported to clang. For clang-specific options, we don't want to add unneeded aliases. https://github.com/llvm/llvm-project/pull/117282 ___

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcicsr (CSR) extension (PR #117169)

2024-11-27 Thread Craig Topper via cfe-commits
@@ -0,0 +1,44 @@ +//=== RISCVInstrInfoXQci.td *- tablegen -*-===// +// +// 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: Apa

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcicsr (CSR) extension (PR #117169)

2024-11-27 Thread Sudharsan Veeravalli via cfe-commits
https://github.com/svs-quic updated https://github.com/llvm/llvm-project/pull/117169 >From 92a3e2e9c44c03093e6050b92b938fd2a0d6886c Mon Sep 17 00:00:00 2001 From: Sudharsan Veeravalli Date: Wed, 20 Nov 2024 13:24:07 +0530 Subject: [PATCH 1/3] [RISCV] Add Qualcomm uC Xqcicsr (CSR) extension The

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcicsr (CSR) extension (PR #117169)

2024-11-27 Thread Sudharsan Veeravalli via cfe-commits
https://github.com/svs-quic updated https://github.com/llvm/llvm-project/pull/117169 >From 92a3e2e9c44c03093e6050b92b938fd2a0d6886c Mon Sep 17 00:00:00 2001 From: Sudharsan Veeravalli Date: Wed, 20 Nov 2024 13:24:07 +0530 Subject: [PATCH 1/5] [RISCV] Add Qualcomm uC Xqcicsr (CSR) extension The

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcicsr (CSR) extension (PR #117169)

2024-11-27 Thread Sudharsan Veeravalli via cfe-commits
@@ -0,0 +1,44 @@ +//=== RISCVInstrInfoXQci.td *- tablegen -*-===// +// +// 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: Apa

[clang] [clang-tools-extra] [clang] Avoid re-evaluating field bitwidth (PR #117732)

2024-11-27 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: tbaederr wrote: Most recent result: http://llvm-compile-time-tracker.com/compare.php?from=6f16a8bf17ac9a171b5435ee53c3d2bef657bdad&to=65e10089b0ca8e2103e6fcf6b082d2bebd3ef458&stat=instructions%3Au > The idea is that you'd store an `Expr` like

[clang] [clang] recognize hexagon-*-ld.lld variants (PR #117338)

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

[clang] [Driver] Support fprofile-sample-use= for CL (PR #117282)

2024-11-27 Thread Haohai Wen via cfe-commits
HaohaiWen wrote: > Adding CLOption to -fprofile-sample-use= suffices. We don't need these > CLJoined aliases. They are for MSVC options that are ported to clang. For > clang-specific options, we don't want to add unneeded aliases. Got it. I checked CL flags with MSVC. You're right. Let me reve

[clang] [Driver] Remove non MSVC CL flags /fprofile-sample-use (PR #117970)

2024-11-27 Thread Haohai Wen via cfe-commits
https://github.com/HaohaiWen created https://github.com/llvm/llvm-project/pull/117970 Those flags are introduced in #117282. They are not supported by MSVC. >From 9809cd44885c43e879056db32fb2dcd8da580019 Mon Sep 17 00:00:00 2001 From: Haohai Wen Date: Thu, 28 Nov 2024 15:08:44 +0800 Subject: [

[clang] [Driver] Remove non MSVC CL flags /fprofile-sample-use (PR #117970)

2024-11-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Haohai Wen (HaohaiWen) Changes Those flags are introduced in #117282. They are not supported by MSVC. --- Full diff: https://github.com/llvm/llvm-project/pull/117970.diff 2 Files Affected: - (modified) clang/include/clang/Driver/Options

[clang] [Driver] Remove non MSVC CL flags /fprofile-sample-use (PR #117970)

2024-11-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Haohai Wen (HaohaiWen) Changes Those flags are introduced in #117282. They are not supported by MSVC. --- Full diff: https://github.com/llvm/llvm-project/pull/117970.diff 2 Files Affected: - (modified) clang/include/clang/Driver/

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcicsr (CSR) extension (PR #117169)

2024-11-27 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/117169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c4645ff - [RISCV] Add Qualcomm uC Xqcicsr (CSR) extension (#117169)

2024-11-27 Thread via cfe-commits
Author: Sudharsan Veeravalli Date: 2024-11-28T12:46:15+05:30 New Revision: c4645ffedacad18e4cd1dd372288aa55178b1c44 URL: https://github.com/llvm/llvm-project/commit/c4645ffedacad18e4cd1dd372288aa55178b1c44 DIFF: https://github.com/llvm/llvm-project/commit/c4645ffedacad18e4cd1dd372288aa55178b1c4

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcicsr (CSR) extension (PR #117169)

2024-11-27 Thread Sudharsan Veeravalli via cfe-commits
https://github.com/svs-quic closed https://github.com/llvm/llvm-project/pull/117169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 8358437 - [clang-repl]: Print stack-trace on crash (#117896)

2024-11-27 Thread via cfe-commits
Author: Mészáros Gergely Date: 2024-11-27T17:42:17+01:00 New Revision: 8358437bbb5b06d9aebc2940475a5a4d86c091c9 URL: https://github.com/llvm/llvm-project/commit/8358437bbb5b06d9aebc2940475a5a4d86c091c9 DIFF: https://github.com/llvm/llvm-project/commit/8358437bbb5b06d9aebc2940475a5a4d86c091c9.di

[clang-tools-extra] Covrt issue (PR #117769)

2024-11-27 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam closed https://github.com/llvm/llvm-project/pull/117769 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement statement printer for EmbedExpr (PR #117770)

2024-11-27 Thread via cfe-commits
@@ -3902,6 +3902,8 @@ void Preprocessor::HandleEmbedDirectiveImpl( } EmbedAnnotationData *Data = new (BP) EmbedAnnotationData; + Data->Filename = Filename; + Data->IsAngled = IsAngled; Data->BinaryData = BinaryContents; circl-lastname wrote: What if

[clang] [llvm] Support for dispatch construct (Sema & Codegen) support. (PR #117904)

2024-11-27 Thread Alexey Bataev via cfe-commits
@@ -5965,6 +5967,244 @@ static bool teamsLoopCanBeParallelFor(Stmt *AStmt, Sema &SemaRef) { return Checker.teamsLoopCanBeParallelFor(); } +static Expr *getInitialExprFromCapturedExpr(Expr *Cond) { + + Expr *SubExpr = Cond->IgnoreParenImpCasts(); + + if (auto *DeclRef = dy

[clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-27 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/116719 >From 2dcf18163de2ccce959f46bf82df1fa40e3fd1fc Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 15 Nov 2024 15:41:48 -0800 Subject: [PATCH 1/9] [Clang] Improve Sema diagnostic performance for __builtin

[clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-27 Thread Bill Wendling via cfe-commits
bwendling wrote: Fine. https://github.com/llvm/llvm-project/pull/116719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b185b85 - [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (#116719)

2024-11-27 Thread via cfe-commits
Author: Bill Wendling Date: 2024-11-27T17:42:32Z New Revision: b185b8512b2c7bf92ba87ea260a7b94d71dec4ee URL: https://github.com/llvm/llvm-project/commit/b185b8512b2c7bf92ba87ea260a7b94d71dec4ee DIFF: https://github.com/llvm/llvm-project/commit/b185b8512b2c7bf92ba87ea260a7b94d71dec4ee.diff LOG:

[clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

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

[clang] [clang-tools-extra] [clang-tidy][use-internal-linkage]fix false positives for ExportDecl (PR #117901)

2024-11-27 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. Documentation & Test for matcher is missing. Except that everything looks ok. https://github.com/llvm/llvm-project/pull/117901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [clang-tools-extra] [clang-tidy][use-internal-linkage]fix false positives for ExportDecl (PR #117901)

2024-11-27 Thread Piotr Zegar via cfe-commits
@@ -1236,6 +1236,17 @@ AST_MATCHER_P(TemplateArgument, equalsIntegralValue, extern const internal::VariadicDynCastAllOfMatcher autoreleasePoolStmt; +/// Matches any export declaration. +/// +/// Example matches following declarations. +/// \code +/// export void foo(); +///

[clang] [clang-tools-extra] [clang-tidy][use-internal-linkage]fix false positives for ExportDecl (PR #117901)

2024-11-27 Thread Piotr Zegar via cfe-commits
@@ -1236,6 +1236,17 @@ AST_MATCHER_P(TemplateArgument, equalsIntegralValue, extern const internal::VariadicDynCastAllOfMatcher autoreleasePoolStmt; +/// Matches any export declaration. +/// +/// Example matches following declarations. +/// \code +/// export void foo(); +///

[clang] [Clang] Add "extend lifetime" flags and release note (PR #110000)

2024-11-27 Thread Stephen Tozer via cfe-commits
@@ -2217,6 +2217,11 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, Args.getAllArgValues(OPT_fsanitize_trap_EQ), Diags, Opts.SanitizeTrap); + Opts.ExtendThisPtr = + Opts.OptimizationLevel > 0

[clang] [HLSL] Add ByteAddressBuffer definition to HLSLExternalSemaSource #113477 (PR #116699)

2024-11-27 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/116699 >From 7210fcc7de181be6cad451ce1e885498c90c55fe Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Sat, 9 Nov 2024 01:34:16 + Subject: [PATCH 01/15] adding definition --- clang/lib/Sema/HLSLExternalSemaS

[clang] [clang] Add source range to 'use of undeclared identifier' diagnostics (PR #117671)

2024-11-27 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: AaronBallman wrote: > but this is not a bug introduced by the changes, rather, the newly supplied > (valid!) source ranges now get taken into account in > `checkRangesForMacroArgExpansion()` in `Frontend/DiagnosticRenderer.cpp`. Yeah, I think

[clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-27 Thread Aaron Ballman via cfe-commits
@@ -14690,6 +14690,13 @@ void Sema::FinalizeDeclaration(Decl *ThisDecl) { } } + // The result of __builtin_counted_by_ref cannot be assigned to a variable. + // It allows leaking and modification of bounds safety information. + if (IsBuiltinCountedByRef(VD->getInit())

[clang] [llvm] [RISCV] Add stack clash protection (PR #117612)

2024-11-27 Thread Raphael Moreira Zinsly via cfe-commits
@@ -610,22 +610,134 @@ static MCCFIInstruction createDefCFAOffset(const TargetRegisterInfo &TRI, Comment.str()); } +// Allocate stack space and probe it if necessary. void RISCVFrameLowering::allocateStack(MachineBasicBlock &MBB,

[clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM modulo the request for a helper function (that two reviewers asked for the same thing is a pretty reasonable indication that we should probably have the helper, but if you feel strongly about it, I won't block the PR over it). ht

[clang] [Clang] Add [[clang::no_specializations]] (PR #101469)

2024-11-27 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: @AaronBallman @cor3ntin are you happy as well? https://github.com/llvm/llvm-project/pull/101469 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Modernize, improve and promote chroot checker (PR #117791)

2024-11-27 Thread via cfe-commits
@@ -104,15 +146,35 @@ void ChrootChecker::evalChdir(const CallEvent &Call, CheckerContext &C) const { R = R->StripCasts(); if (const StringRegion* StrRegion= dyn_cast(R)) { const StringLiteral* Str = StrRegion->getStringLiteral(); - if (Str->getString() == "

[clang] [analyzer] Modernize, improve and promote chroot checker (PR #117791)

2024-11-27 Thread via cfe-commits
@@ -121,17 +183,40 @@ void ChrootChecker::checkPreCall(const CallEvent &Call, return; // If jail state is ROOT_CHANGED, generate BugReport. - void *const* k = C.getState()->FindGDM(ChrootChecker::getTag()); - if (k) -if (isRootChanged((intptr_t) *k)) - if (Exp

[clang] [analyzer] Modernize, improve and promote chroot checker (PR #117791)

2024-11-27 Thread via cfe-commits
@@ -121,17 +183,40 @@ void ChrootChecker::checkPreCall(const CallEvent &Call, return; // If jail state is ROOT_CHANGED, generate BugReport. - void *const* k = C.getState()->FindGDM(ChrootChecker::getTag()); - if (k) -if (isRootChanged((intptr_t) *k)) - if (Exp

[clang] f67ba58 - [Clang] replace 'bitfield' with 'bit-field' for consistency (#117881)

2024-11-27 Thread via cfe-commits
Author: Oleksandr T. Date: 2024-11-27T17:09:41+02:00 New Revision: f67ba5855278401728413431216dda5d370ac2e0 URL: https://github.com/llvm/llvm-project/commit/f67ba5855278401728413431216dda5d370ac2e0 DIFF: https://github.com/llvm/llvm-project/commit/f67ba5855278401728413431216dda5d370ac2e0.diff

[clang] [clang] Allow delayed function instantiation at TU end if initial instantiation fails (PR #117167)

2024-11-27 Thread via cfe-commits
StefanPaulet wrote: > I have a draft which implements the capture rule for deferred lambda > instantiation #105953 I've been too busy lately and haven't continued working > on this Pull Request.If you're interested,you can take a look at it. Will look there, thanks https://github.com/llvm/llv

[clang] [analyzer] Modernize, improve and promote chroot checker (PR #117791)

2024-11-27 Thread via cfe-commits
@@ -121,17 +183,40 @@ void ChrootChecker::checkPreCall(const CallEvent &Call, return; // If jail state is ROOT_CHANGED, generate BugReport. - void *const* k = C.getState()->FindGDM(ChrootChecker::getTag()); - if (k) -if (isRootChanged((intptr_t) *k)) - if (Exp

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-27 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea edited https://github.com/llvm/llvm-project/pull/116257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-11-27 Thread Jessica Clarke 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] [Clang] Add "extend lifetime" flags and release note (PR #110000)

2024-11-27 Thread Stephen Tozer via cfe-commits
SLTozer wrote: This patch has been changed as a result of some other patches that have removed the need for the attribute that this patch once added. Since this patch does not emit fake uses (the actual emission of fake uses is added in the [next patch](https://github.com/llvm/llvm-project/pul

[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

2024-11-27 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb updated https://github.com/llvm/llvm-project/pull/117507 >From a6c9b5ca52f35fe451a52c590ce93584c2b4f3ac Mon Sep 17 00:00:00 2001 From: Aidan Goldfarb <47676355+aidangoldf...@users.noreply.github.com> Date: Fri, 22 Nov 2024 19:06:29 -0500 Subject: [PATCH 1/8] Upda

[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

2024-11-27 Thread Aidan Goldfarb via cfe-commits
@@ -121,6 +121,14 @@ int NegativeShortTest[NegativeShort == -1 ? 1 : -1]; enum Color { Red, Green, Blue }; // expected-note{{previous use is here}} typedef struct Color NewColor; // expected-error {{use of 'Color' with tag type that does not match previous declaration}} +// E

[clang] 1e3e199 - [Sema] Migrate away from PointerUnion::{is,get} (NFC) (#117498)

2024-11-27 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-11-27T09:13:28-08:00 New Revision: 1e3e199ed9f214594e358eb0c7892cdedc703f7a URL: https://github.com/llvm/llvm-project/commit/1e3e199ed9f214594e358eb0c7892cdedc703f7a DIFF: https://github.com/llvm/llvm-project/commit/1e3e199ed9f214594e358eb0c7892cdedc703f7a.diff L

[clang] [clang-tools-extra] [clang] Avoid re-evaluating field bitwidth (PR #117732)

2024-11-27 Thread Erich Keane via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: erichkeane wrote: > Meh, saving a `ConstantExpr` in the `FieldDecl` doesn't work properly, since > we need to support having arbitrary exprs in case the bitwidth is dependent. The idea is that you'd store an `Expr` like we do elsewhere, and the

[clang] [Sema] Migrate away from PointerUnion::{is, get} (NFC) (PR #117498)

2024-11-27 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/117498 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix constexpr-ness on implicitly deleted destructors (PR #116359)

2024-11-27 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/116359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

2024-11-27 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb edited https://github.com/llvm/llvm-project/pull/117507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

2024-11-27 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb edited https://github.com/llvm/llvm-project/pull/117507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

2024-11-27 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb edited https://github.com/llvm/llvm-project/pull/117507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Support for dispatch construct (Sema & Codegen) support. (PR #117904)

2024-11-27 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev commented: Please, reformat your changes, follow coding standard, use nullptr instead of NULL, etc. https://github.com/llvm/llvm-project/pull/117904 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [llvm] Support for dispatch construct (Sema & Codegen) support. (PR #117904)

2024-11-27 Thread Alexey Bataev via cfe-commits
@@ -417,7 +417,8 @@ void CodeGenFunction::EmitStmt(const Stmt *S, ArrayRef Attrs) { EmitOMPInteropDirective(cast(*S)); break; case Stmt::OMPDispatchDirectiveClass: -CGM.ErrorUnsupported(S, "OpenMP dispatch directive"); +// CGM.ErrorUnsupported(S, "OpenMP disp

[clang] [llvm] Support for dispatch construct (Sema & Codegen) support. (PR #117904)

2024-11-27 Thread Alexey Bataev via cfe-commits
@@ -5965,6 +5967,244 @@ static bool teamsLoopCanBeParallelFor(Stmt *AStmt, Sema &SemaRef) { return Checker.teamsLoopCanBeParallelFor(); } +static Expr *getInitialExprFromCapturedExpr(Expr *Cond) { + + Expr *SubExpr = Cond->IgnoreParenImpCasts(); + + if (auto *DeclRef = dy

[clang] [llvm] Support for dispatch construct (Sema & Codegen) support. (PR #117904)

2024-11-27 Thread Alexey Bataev via cfe-commits
@@ -5965,6 +5967,244 @@ static bool teamsLoopCanBeParallelFor(Stmt *AStmt, Sema &SemaRef) { return Checker.teamsLoopCanBeParallelFor(); } +static Expr *getInitialExprFromCapturedExpr(Expr *Cond) { + + Expr *SubExpr = Cond->IgnoreParenImpCasts(); + + if (auto *DeclRef = dy

[clang] [llvm] Support for dispatch construct (Sema & Codegen) support. (PR #117904)

2024-11-27 Thread Alexey Bataev via cfe-commits
@@ -5965,6 +5967,244 @@ static bool teamsLoopCanBeParallelFor(Stmt *AStmt, Sema &SemaRef) { return Checker.teamsLoopCanBeParallelFor(); } +static Expr *getInitialExprFromCapturedExpr(Expr *Cond) { + + Expr *SubExpr = Cond->IgnoreParenImpCasts(); + + if (auto *DeclRef = dy

[clang] [llvm] Support for dispatch construct (Sema & Codegen) support. (PR #117904)

2024-11-27 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev edited https://github.com/llvm/llvm-project/pull/117904 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Support for dispatch construct (Sema & Codegen) support. (PR #117904)

2024-11-27 Thread Alexey Bataev via cfe-commits
@@ -5965,6 +5967,244 @@ static bool teamsLoopCanBeParallelFor(Stmt *AStmt, Sema &SemaRef) { return Checker.teamsLoopCanBeParallelFor(); } +static Expr *getInitialExprFromCapturedExpr(Expr *Cond) { + + Expr *SubExpr = Cond->IgnoreParenImpCasts(); + + if (auto *DeclRef = dy

[clang] [llvm] Support for dispatch construct (Sema & Codegen) support. (PR #117904)

2024-11-27 Thread Alexey Bataev via cfe-commits
@@ -4452,6 +4452,11 @@ void CodeGenFunction::EmitOMPMasterDirective(const OMPMasterDirective &S) { emitMaster(*this, S); } +void CodeGenFunction::EmitOMPDispatchDirective(const OMPDispatchDirective &S) { + alexey-bataev wrote: Drop empty line https://gith

[clang] [llvm] Support for dispatch construct (Sema & Codegen) support. (PR #117904)

2024-11-27 Thread Alexey Bataev via cfe-commits
@@ -5965,6 +5967,244 @@ static bool teamsLoopCanBeParallelFor(Stmt *AStmt, Sema &SemaRef) { return Checker.teamsLoopCanBeParallelFor(); } +static Expr *getInitialExprFromCapturedExpr(Expr *Cond) { + + Expr *SubExpr = Cond->IgnoreParenImpCasts(); + + if (auto *DeclRef = dy

[clang] [llvm] Support for dispatch construct (Sema & Codegen) support. (PR #117904)

2024-11-27 Thread Alexey Bataev via cfe-commits
@@ -5965,6 +5967,244 @@ static bool teamsLoopCanBeParallelFor(Stmt *AStmt, Sema &SemaRef) { return Checker.teamsLoopCanBeParallelFor(); } +static Expr *getInitialExprFromCapturedExpr(Expr *Cond) { + + Expr *SubExpr = Cond->IgnoreParenImpCasts(); + + if (auto *DeclRef = dy

[clang] [llvm] Support for dispatch construct (Sema & Codegen) support. (PR #117904)

2024-11-27 Thread Alexey Bataev via cfe-commits
@@ -5965,6 +5967,244 @@ static bool teamsLoopCanBeParallelFor(Stmt *AStmt, Sema &SemaRef) { return Checker.teamsLoopCanBeParallelFor(); } +static Expr *getInitialExprFromCapturedExpr(Expr *Cond) { + + Expr *SubExpr = Cond->IgnoreParenImpCasts(); + + if (auto *DeclRef = dy

[clang] [llvm] Support for dispatch construct (Sema & Codegen) support. (PR #117904)

2024-11-27 Thread Alexey Bataev via cfe-commits
@@ -5965,6 +5967,244 @@ static bool teamsLoopCanBeParallelFor(Stmt *AStmt, Sema &SemaRef) { return Checker.teamsLoopCanBeParallelFor(); } +static Expr *getInitialExprFromCapturedExpr(Expr *Cond) { + + Expr *SubExpr = Cond->IgnoreParenImpCasts(); + + if (auto *DeclRef = dy

[clang] [llvm] Support for dispatch construct (Sema & Codegen) support. (PR #117904)

2024-11-27 Thread Alexey Bataev via cfe-commits
@@ -11769,6 +11769,8 @@ def err_omp_clause_requires_dispatch_construct : Error< "'%0' clause requires 'dispatch' context selector">; def err_omp_append_args_with_varargs : Error< "'append_args' is not allowed with varargs functions">; +def warn_omp_dispatch_clause_novariant

[clang] [llvm] Support for dispatch construct (Sema & Codegen) support. (PR #117904)

2024-11-27 Thread Alexey Bataev via cfe-commits
@@ -5965,6 +5967,244 @@ static bool teamsLoopCanBeParallelFor(Stmt *AStmt, Sema &SemaRef) { return Checker.teamsLoopCanBeParallelFor(); } +static Expr *getInitialExprFromCapturedExpr(Expr *Cond) { + + Expr *SubExpr = Cond->IgnoreParenImpCasts(); + + if (auto *DeclRef = dy

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

2024-11-27 Thread Shilei Tian 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] [Clang][AArch64]Refactor typespec handling in SveEmitter.cpp (PR #117717)

2024-11-27 Thread via cfe-commits
@@ -423,131 +434,143 @@ const std::array SVEEmitter::Reinterprets = // Type implementation //===--===// -std::string SVEType::builtin_str() const { - std::string S; - if (isVoid()) +std::string SVEType::bu

[clang] [analyzer] Modernize, improve and promote chroot checker (PR #117791)

2024-11-27 Thread via cfe-commits
vabridgers wrote: > @vabridgers Please avoid force pushes. I understand and will abide by this request. I had tried rebasing and pushing at one time and found I needed to force a push upload my newest changes and thought that was the default flow. https://github.com/llvm/llvm-project/pull/1

  1   2   3   4   5   >