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

2025-02-04 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/125744 Summary: This reverts commit 740e6aeccdb2f8549ba80b15ff3d5dd3392e. After discussions it was determined that the behavior for IR inputs needs to be maintained at least for now. In the future we should put a d

[clang] CodeGen: support static linking for libclosure (PR #125384)

2025-02-04 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: Please add HelpText for the new option. Maybe mention in that text that it currently doesn't affect linking. Please add a release note. Otherwise looks fine. https://github.com/llvm/llvm-project/pull/125384 __

[clang] [Clang][counted-by] Bail out of visitor for LValueToRValue cast (PR #125571)

2025-02-04 Thread Bill Wendling via cfe-commits
https://github.com/bwendling closed https://github.com/llvm/llvm-project/pull/125571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-04 Thread Artem Belevich via cfe-commits
Artem-B wrote: > I don't think there's any use of --offload-arch outside of the driver. I agree. Yet we do need to deal with such nonsensical input in a consistent manner. We do not control what the users give us, but we control how we respond. https://github.com/llvm/llvm-project/pull/125421

[clang] Thread Safety Analysis: Support warning on obtaining address of guarded variables (PR #123063)

2025-02-04 Thread Bill Wendling via cfe-commits
bwendling wrote: Our current `counted_by` implementation is for flexible array members only, which are always at the end of the struct (or supposed to be). When we start applying them to pointers in structs (coming soon), we'll need to use that flag. However, I think that Apple is __finally__

[clang] 2eb44aa - [Clang][counted-by] Bail out of visitor for LValueToRValue cast (#125571)

2025-02-04 Thread via cfe-commits
Author: Bill Wendling Date: 2025-02-04T11:00:44-08:00 New Revision: 2eb44aa0a94a8d4230c1c9a0c306af16bfc92925 URL: https://github.com/llvm/llvm-project/commit/2eb44aa0a94a8d4230c1c9a0c306af16bfc92925 DIFF: https://github.com/llvm/llvm-project/commit/2eb44aa0a94a8d4230c1c9a0c306af16bfc92925.diff

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

2025-02-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes Summary: This reverts commit 740e6aeccdb2f8549ba80b15ff3d5dd3392e. After discussions it was determined that the behavior for IR inputs needs to be maintained at least for now. In the future we should put

[clang] [Clang][counted_by] Don't treat a __bdos argument as an array if it isn't (PR #125298)

2025-02-04 Thread Bill Wendling via cfe-commits
https://github.com/bwendling closed https://github.com/llvm/llvm-project/pull/125298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][counted_by] Don't treat a __bdos argument as an array if it isn't (PR #125298)

2025-02-04 Thread Bill Wendling via cfe-commits
bwendling wrote: This was superseded by https://github.com/llvm/llvm-project/pull/125571. https://github.com/llvm/llvm-project/pull/125298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [HLSL][RootSignature] Implement Lexing of DescriptorTables (PR #122981)

2025-02-04 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/122981 >From 98deff6a407b912852e70b2bdc3618aaec8a1931 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Fri, 24 Jan 2025 22:23:39 + Subject: [PATCH 1/8] [HLSL][RootSignature] Initial Lexer Definition with puncuato

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

2025-02-04 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/125744 >From 3d97ac5ae51b680e92397a3d8f23aa79d1919522 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Tue, 4 Feb 2025 12:06:34 -0600 Subject: [PATCH] Reapply "[AMDGPU] Use the AMDGPUToolChain when targeting C/C++ di

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

2025-02-04 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 daefb1b0121498ea48a0ed6514f11fb66872bafc 396691fa3fa13a8dce18742b47d4e0afda783d76 --e

[clang] [llvm] [clangd] Add support for the c2000 architecture (PR #125663)

2025-02-04 Thread James Nagurne via cfe-commits
DragonDisciple wrote: Hello, any clang/llvm people who take a look at this! I'm J.B. Nagurne, and I'm a member of the compiler team for Texas Instruments. I have experience with both the TI proprietary compiler (here, cl2000) and the LLVM-based TI compilers, c29clang and tiarmclang. I'll be r

[clang] [TBAA] Don't emit pointer-tbaa for void pointers. (PR #122116)

2025-02-04 Thread John McCall via cfe-commits
rjmccall wrote: We're documenting a weaker guarantee than we implement, yes. https://github.com/llvm/llvm-project/pull/122116 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (PR #115099)

2025-02-04 Thread Reid Kleckner via cfe-commits
rnk wrote: > The build is still broken (e.g. > https://lab.llvm.org/buildbot/#/builders/63/builds/3861). I'll back it out. Thank you for doing that. I missed all notifications because they got lost in the storm of failures due to the mismatch between my local build and what was on github. ht

[clang] [llvm] [Offload] Unify offloading entries into a single section (PR #125731)

2025-02-04 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. LGTM syntax-wise. Don't have much of an opinion on the strategy. Are there existing users for this? Should we worry about providing backward compatibility with the "omp" sections in the existing binaries? https://github.com/llvm/llvm-proje

[clang] [llvm] [Offload] Unify offloading entries into a single section (PR #125731)

2025-02-04 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > LGTM syntax-wise. Don't have much of an opinion on the strategy. > > Are there existing users for this? Should we worry about providing backward > compatibility with the "omp" sections in the existing binaries? That part is fortunately baked-in, as the registration code that's

[clang] [llvm] [mlir] [Offload] Unify offloading entries into a single section (PR #125731)

2025-02-04 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/125731 >From 54802d4d8c789f21a025884a6e7590d81babd3fa Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Tue, 4 Feb 2025 11:39:49 -0600 Subject: [PATCH] [Offload] Unify offloading entries into a single section Summary:

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-04 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/125421 >From 7773accdd4c3a6fc178c76dd974948dbe091e549 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Sun, 2 Feb 2025 10:39:01 -0600 Subject: [PATCH 1/2] [Clang] Make `-Xarch_` handling generic for all toolchains S

[clang] [Clang][P1061] Consolidate ResolvedUnpexandedPackExpr into FunctionParmPackExpr (PR #125394)

2025-02-04 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: I think I would like to see some more test coverage. https://github.com/llvm/llvm-project/pull/125394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [clang][bytecode] Destroy local variables in reverse order (PR #125727)

2025-02-04 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/125727 >From 58faf5d42f02fc570a72c9af2d90282bae9fe834 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 4 Feb 2025 18:08:00 +0100 Subject: [PATCH] [clang][bytecode] Destroy local variables in rev

[clang] [llvm] [mlir] [IR][ModRef] Introduce `errno` memory location (PR #120783)

2025-02-04 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/120783 >From 196421e40425290aa1296f63c8fd9fbf205ea4b9 Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Fri, 20 Dec 2024 19:30:59 +0100 Subject: [PATCH] [IR][ModRef] Introduce `errno` memory location Mod

[clang] [CIR] Lowering to LLVM for global pointers (PR #125619)

2025-02-04 Thread Andy Kaylor via cfe-commits
@@ -84,6 +138,19 @@ mlir::LogicalResult CIRToLLVMGlobalOpLowering::matchAndRewrite( SmallVector attributes; if (init.has_value()) { +auto setupRegionInitializedLLVMGlobalOp = [&]() { andykaylor wrote: https://github.com/llvm/clangir/blob/f8821e852168

[clang] [clang][bytecode] Print desriptor PrimType in dump() (PR #125726)

2025-02-04 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr edited https://github.com/llvm/llvm-project/pull/125726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Print desriptor PrimType in dump() (PR #125726)

2025-02-04 Thread Timm Baeder via cfe-commits
tbaederr wrote: Hm, yeah I guess you're right, thanks. Removed the NFC. https://github.com/llvm/llvm-project/pull/125726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread Safety Analysis: Support warning on obtaining address of guarded variables (PR #123063)

2025-02-04 Thread Marco Elver via cfe-commits
melver wrote: > Looks like the kernel patches > [use](https://github.com/google/kernel-sanitizers/commit/81883e1fa377d866c288192b6eb8334bcf10f38f) > `-fexperimental-late-parse-attributes`? :( Yeah, no way around it if we want to have guarded_by in structs work properly. If the problem is cost

[clang] [clang] NFC: rename MatchedPackOnParmToNonPackOnArg to StrictPackMatch (PR #125418)

2025-02-04 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Yeah this is just a bad automatic rebase by GitHub, only the top commit is relevant. https://github.com/llvm/llvm-project/pull/125418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] Thread Safety Analysis: Support warning on obtaining address of guarded variables (PR #123063)

2025-02-04 Thread Marco Elver via cfe-commits
melver wrote: > Can any of the members in the structs be reorganized to put the mutex member > declaration BEFORE the members they guard? Probably not always, but perhaps > that's possible for most structures? It's an option I considered, but I can already hear "what is this crap ... NACK". I

[clang] Thread Safety Analysis: Support warning on obtaining address of guarded variables (PR #123063)

2025-02-04 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: Looks like the kernel patches [use](https://github.com/google/kernel-sanitizers/commit/81883e1fa377d866c288192b6eb8334bcf10f38f) `-fexperimental-late-parse-attributes`? :( https://github.com/llvm/llvm-project/pull/123063 ___ cf

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-04 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > > I don't think there's any use of --offload-arch outside of the driver. > > I agree. Yet we do need to deal with such nonsensical input in a consistent > manner. We do not control what the users give us, but we control how we > respond. Right now if someone passes `-Xarch_fo

[clang] [webkit.UncountedLambdaCapturesChecker] Fix a bug that the checker didn't take the object pointer into account. (PR #125662)

2025-02-04 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/125662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-02-04 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/124920 >From bd731e4be65fc9c1746aa6a8f63d206eb54bb2be Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 29 Jan 2025 15:17:06 +0200 Subject: [PATCH 01/13] [Clang] disallow attributes on void parameters --- clan

[clang] [Clang][NFC] Clean up fetching the offloading toolchain (PR #125095)

2025-02-04 Thread Joseph Huber via cfe-commits
@@ -6601,6 +6573,72 @@ std::string Driver::GetClPchPath(Compilation &C, StringRef BaseName) const { return std::string(Output); } +const ToolChain &Driver::getOffloadToolChain( +const llvm::opt::ArgList &Args, const Action::OffloadKind Kind, +const llvm::Triple &Tar

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-04 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/125421 >From 7773accdd4c3a6fc178c76dd974948dbe091e549 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Sun, 2 Feb 2025 10:39:01 -0600 Subject: [PATCH 1/2] [Clang] Make `-Xarch_` handling generic for all toolchains S

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-02-04 Thread via cfe-commits
@@ -4870,14 +4870,16 @@ def note_ovl_candidate_inconsistent_deduction_types : Note< "candidate template ignored: deduced values %diff{" "of conflicting types for parameter %0 (%1 of type $ vs. %3 of type $)|" "%1 and %3 of conflicting types for parameter %0}2,4">;

[clang] [analyzer] Remove some false negatives in StackAddrEscapeChecker (PR #125638)

2025-02-04 Thread Michael Flanders via cfe-commits
https://github.com/Flandini updated https://github.com/llvm/llvm-project/pull/125638 >From 0674909f03703a70c3e259acd0590f50cea4615f Mon Sep 17 00:00:00 2001 From: Michael Flanders Date: Mon, 27 Jan 2025 11:35:03 -0600 Subject: [PATCH 01/21] wip --- .../Checkers/StackAddrEscapeChecker.cpp

[clang] [analyzer] Remove some false negatives in StackAddrEscapeChecker (PR #125638)

2025-02-04 Thread Michael Flanders via cfe-commits
@@ -18,8 +18,8 @@ struct myfunction { myfunction create_func() { int n; auto c = [&n] {}; - return c; // expected-warning {{Address of stack memory associated with local variable 'n' is still referred to by a temporary object on the stack upon returning to the caller. T

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-02-04 Thread Aidan Goldfarb via cfe-commits
@@ -4870,14 +4870,16 @@ def note_ovl_candidate_inconsistent_deduction_types : Note< "candidate template ignored: deduced values %diff{" "of conflicting types for parameter %0 (%1 of type $ vs. %3 of type $)|" "%1 and %3 of conflicting types for parameter %0}2,4">;

[clang] [llvm] [Clang] [OpenMP] Add support for '#pragma omp stripe'. (PR #119891)

2025-02-04 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: ping? @Meinersbur https://github.com/llvm/llvm-project/pull/119891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang module] Current Working Directory Pruning (PR #124786)

2025-02-04 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. Looks good, thanks! https://github.com/llvm/llvm-project/pull/124786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Fix type of an statement expression ending with an atomic type (PR #119711)

2025-02-04 Thread John McCall via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: @@ -15919,10 +15919,17 @@ ExprResult Sema::ActOnStmtExprResult(ExprResult ER) { if (Cast && Cast->getCastKind() == CK_ARCConsumeObject)

[clang] [analyzer] Do not destruct fields of unions (PR #122330)

2025-02-04 Thread Jameson Nash via cfe-commits
@@ -441,3 +441,31 @@ void testLeakBecauseNTTPIsNotDeallocation() { void* p = ::operator new(10); deallocate_via_nttp(p); } // leak-warning{{Potential leak of memory pointed to by 'p'}} + +namespace optional_union { + template + class unique_ptr { +T *q; + public: +

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-04 Thread Artem Belevich via cfe-commits
@@ -0,0 +1,34 @@ +// RUN: %clang -x cuda %s -Xarch_nvptx64 -O3 -S -nogpulib -nogpuinc -### 2>&1 | FileCheck -check-prefix=O3ONCE %s +// RUN: %clang -x cuda %s -Xarch_device -O3 -S -nogpulib -nogpuinc -### 2>&1 | FileCheck -check-prefix=O3ONCE %s +// RUN: %clang -x hip %s -Xarch_

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-04 Thread Artem Belevich via cfe-commits
@@ -0,0 +1,34 @@ +// RUN: %clang -x cuda %s -Xarch_nvptx64 -O3 -S -nogpulib -nogpuinc -### 2>&1 | FileCheck -check-prefix=O3ONCE %s +// RUN: %clang -x cuda %s -Xarch_device -O3 -S -nogpulib -nogpuinc -### 2>&1 | FileCheck -check-prefix=O3ONCE %s +// RUN: %clang -x hip %s -Xarch_

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-04 Thread Artem Belevich via cfe-commits
@@ -932,7 +932,9 @@ def W_Joined : Joined<["-"], "W">, Group, def Xanalyzer : Separate<["-"], "Xanalyzer">, HelpText<"Pass to the static analyzer">, MetaVarName<"">, Group; -def Xarch__ : JoinedAndSeparate<["-"], "Xarch_">, Flags<[NoXarchOption]>; +def Xarch__ : JoinedAndS

[clang] [clang] CTAD alias: Respect explicit deduction guides defined after the first use of the alias template. (PR #125478)

2025-02-04 Thread via cfe-commits
@@ -237,8 +237,17 @@ static_assert(__is_same(decltype(s.t), int)); // explicit deduction guide. Foo(int) -> Foo; AFoo s2{i}; -// FIXME: the type should be X because of the above explicit deduction guide. -static_assert(__is_same(decltype(s2.t), int)); +static_assert(__is_same(d

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-04 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. https://github.com/llvm/llvm-project/pull/125421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (PR #125630)

2025-02-04 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/125630 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Constant buffer layout struct update (PR #124840)

2025-02-04 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. This all looks reasonable, though it is kind of a mess of random fixes. It's generally best to commit unrelated things individually, and it would be nice to have commit messages that are full sentences of what and why rather than a bulleted

[clang] [HLSL] Constant buffer layout struct update (PR #124840)

2025-02-04 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/124840 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Constant buffer layout struct update (PR #124840)

2025-02-04 Thread Justin Bogner via cfe-commits
@@ -14183,6 +14183,13 @@ void Sema::ActOnUninitializedDecl(Decl *RealDecl) { if (getLangOpts().OpenCL && Var->getType().getAddressSpace() == LangAS::opencl_local) return; + +// In HLSL, objects in the hlsl_constat address space are initialized +// exte

[clang] [clang-format] Hanlde qualified type name for `QualifierAlignment` (PR #125327)

2025-02-04 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/125327 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] eb6ca12 - [clang-format] Hanlde qualified type name for `QualifierAlignment` (#125327)

2025-02-04 Thread via cfe-commits
Author: Owen Pan Date: 2025-02-04T01:33:44-08:00 New Revision: eb6ca1242c1035fac6a8f1edfe7925b4994d4ecf URL: https://github.com/llvm/llvm-project/commit/eb6ca1242c1035fac6a8f1edfe7925b4994d4ecf DIFF: https://github.com/llvm/llvm-project/commit/eb6ca1242c1035fac6a8f1edfe7925b4994d4ecf.diff LOG:

[clang] [Clang] Do not try to transform invalid bindings (PR #125658)

2025-02-04 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/125658 In the presence of an invalid structured binding decomposition, some binding packs may be invalid and trying to transform them would produce a recovery expression that does not contains a pack, leading to asse

[clang] [Clang] Do not try to transform invalid bindings (PR #125658)

2025-02-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes In the presence of an invalid structured binding decomposition, some binding packs may be invalid and trying to transform them would produce a recovery expression that does not contains a pack, leading to asser

[clang] [HLSL][NFC] Add test check to make sure the resource handle gets stored in the resource global (PR #124866)

2025-02-04 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/124866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Do not try to transform invalid bindings (PR #125658)

2025-02-04 Thread via cfe-commits
cor3ntin wrote: @ricejasonf https://github.com/llvm/llvm-project/pull/125658 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add time-trace scopes for high-level analyzer steps (PR #125508)

2025-02-04 Thread Gábor Horváth via cfe-commits
@@ -358,9 +359,41 @@ class AnalysisConsumer : public AnalysisASTConsumer, /// Print \p S to stderr if \c Opts.AnalyzerDisplayProgress is set. void reportAnalyzerProgress(StringRef S); -}; // namespace -} // end anonymous namespace +}; +std::string timeTraceScopeDeclName(

[clang] [analyzer] Add time-trace scopes for high-level analyzer steps (PR #125508)

2025-02-04 Thread Gábor Horváth via cfe-commits
@@ -287,6 +288,34 @@ class PathDiagnosticBuilder : public BugReporterContext { const PathSensitiveBugReport *getBugReport() const { return R; } }; +std::string timeTraceName(const BugReportEquivClass &EQ) { + if (!llvm::timeTraceProfilerEnabled()) +return ""; + const a

[clang] [analyzer] Add time-trace scopes for high-level analyzer steps (PR #125508)

2025-02-04 Thread Gábor Horváth via cfe-commits
@@ -358,9 +359,41 @@ class AnalysisConsumer : public AnalysisASTConsumer, /// Print \p S to stderr if \c Opts.AnalyzerDisplayProgress is set. void reportAnalyzerProgress(StringRef S); -}; // namespace -} // end anonymous namespace +}; +std::string timeTraceScopeDeclName(

[clang] [analyzer] Add time-trace scopes for high-level analyzer steps (PR #125508)

2025-02-04 Thread Gábor Horváth via cfe-commits
@@ -287,6 +288,34 @@ class PathDiagnosticBuilder : public BugReporterContext { const PathSensitiveBugReport *getBugReport() const { return R; } }; +std::string timeTraceName(const BugReportEquivClass &EQ) { + if (!llvm::timeTraceProfilerEnabled()) +return ""; + const a

[clang] [analyzer] Add time-trace scopes for high-level analyzer steps (PR #125508)

2025-02-04 Thread Gábor Horváth via cfe-commits
@@ -134,6 +135,14 @@ static void expandGraphWithCheckers(CHECK_CTX checkCtx, namespace { +std::string checkerScopeName(StringRef name, const CheckerBase *checker) { + if (!llvm::timeTraceProfilerEnabled()) +return ""; + std::string checkerName = Xazax-h

[clang] [analyzer] Add time-trace scopes for high-level analyzer steps (PR #125508)

2025-02-04 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. Some nits inline for style and removing allocations. Overall looks good for me. https://github.com/llvm/llvm-project/pull/125508 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [analyzer] Add time-trace scopes for high-level analyzer steps (PR #125508)

2025-02-04 Thread Gábor Horváth via cfe-commits
@@ -287,6 +288,34 @@ class PathDiagnosticBuilder : public BugReporterContext { const PathSensitiveBugReport *getBugReport() const { return R; } }; +std::string timeTraceName(const BugReportEquivClass &EQ) { + if (!llvm::timeTraceProfilerEnabled()) +return ""; + const a

[clang] [analyzer] Add time-trace scopes for high-level analyzer steps (PR #125508)

2025-02-04 Thread Gábor Horváth via cfe-commits
@@ -119,6 +121,28 @@ class CacheInitializer : public DynamicRecursiveASTVisitor { Ranges &Result; }; +std::string timeScopeName(const Decl *DeclWithIssue) { + if (!llvm::timeTraceProfilerEnabled()) +return ""; + return llvm::formatv( + "BugSuppression::isS

[clang] [analyzer] Add time-trace scopes for high-level analyzer steps (PR #125508)

2025-02-04 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/125508 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add time-trace scopes for high-level analyzer steps (PR #125508)

2025-02-04 Thread Gábor Horváth via cfe-commits
@@ -119,6 +121,28 @@ class CacheInitializer : public DynamicRecursiveASTVisitor { Ranges &Result; }; +std::string timeScopeName(const Decl *DeclWithIssue) { + if (!llvm::timeTraceProfilerEnabled()) +return ""; + return llvm::formatv( + "BugSuppression::isS

[clang] [llvm] [clangd] Add support for the c2000 architecture (PR #125663)

2025-02-04 Thread via cfe-commits
https://github.com/student433 edited https://github.com/llvm/llvm-project/pull/125663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (PR #115099)

2025-02-04 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > The build is still broken (e.g. > https://lab.llvm.org/buildbot/#/builders/63/builds/3861). I'll back it out. Thanks, I was just about to report the same issue as well; this seems to conflict with winnt.h, at least in older versions of WinSDK (10.0.18362.0 in my case too). I

[clang] [llvm] [OpenMP]Initial parsing/sema support for target_device selector set (PR #118471)

2025-02-04 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/118471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Improve diagnostics for vector builtins (PR #125673)

2025-02-04 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/125673 This commit improves the diagnostics for vector (elementwise) builtins in a couple of ways. It primarily provides more precise type-checking diagnostics for builtins with specific type requirements. Previo

[clang] [clang] Improve diagnostics for vector builtins (PR #125673)

2025-02-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Fraser Cormack (frasercrmck) Changes This commit improves the diagnostics for vector (elementwise) builtins in a couple of ways. It primarily provides more precise type-checking diagnostics for builtins with specific type requir

[clang] [clang] Improve diagnostics for vector builtins (PR #125673)

2025-02-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Fraser Cormack (frasercrmck) Changes This commit improves the diagnostics for vector (elementwise) builtins in a couple of ways. It primarily provides more precise type-checking diagnostics for builtins with specific type requirements. Pr

[clang] [OpenMP][ASan] Enable ASan Instrumentation for AMDGPUOpenMPToolChain. (PR #124754)

2025-02-04 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 edited https://github.com/llvm/llvm-project/pull/124754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Wunsafe-buffer-usage] Turn off unsafe-buffer warning for methods annotated with clang::unsafe_buffer_usage attribute (PR #125671)

2025-02-04 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak created https://github.com/llvm/llvm-project/pull/125671 Unsafe operation in methods that are already annotated with clang::unsafe_buffer_usage attribute, should not trigger a warning. This is because, the developer has already identified the method as unsafe a

[clang] [llvm] [analyzer] Consolidate array bound checkers (PR #125534)

2025-02-04 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. LG! Do you have an intuition where the rest of the false positives are coming from? Are there infeasible paths? Insufficient solvers? Would cross-checking with Z3 reduce the FPs emitted from this check? https://github.com/llvm/llvm-proj

[clang] [analyzer] Do not destruct fields of unions (PR #122330)

2025-02-04 Thread Gábor Horváth via cfe-commits
@@ -377,3 +377,26 @@ void directUnknownSymbol() { } } + +void testUnionDtor() { Xazax-hun wrote: I think this is a wonderful test but I would not expect to find it in dtor-array as this has nothing to do with arrays. Would it be possible to move it to a new

[clang] [Driver] Teach Barmetal toolchain about GCC installation(1/3) (PR #121829)

2025-02-04 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: Hi @petrhosek, following up on our last RISC-V embedded sync-up, can you please review this patch? Thanks https://github.com/llvm/llvm-project/pull/121829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [analyzer] Do not destruct fields of unions (PR #122330)

2025-02-04 Thread Gábor Horváth via cfe-commits
@@ -441,3 +441,31 @@ void testLeakBecauseNTTPIsNotDeallocation() { void* p = ::operator new(10); deallocate_via_nttp(p); } // leak-warning{{Potential leak of memory pointed to by 'p'}} + +namespace optional_union { + template + class unique_ptr { +T *q; + public: +

[clang] [analyzer] Do not destruct fields of unions (PR #122330)

2025-02-04 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. Overall looks good to me, some nits inline https://github.com/llvm/llvm-project/pull/122330 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [OpenMP][ASan] Enable ASan Instrumentation for AMDGPUOpenMPToolChain. (PR #124754)

2025-02-04 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 edited https://github.com/llvm/llvm-project/pull/124754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][ASan] Enable ASan Instrumentation for AMDGPUOpenMPToolChain. (PR #124754)

2025-02-04 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 edited https://github.com/llvm/llvm-project/pull/124754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Do not destruct fields of unions (PR #122330)

2025-02-04 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/122330 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Do not destruct fields of unions (PR #122330)

2025-02-04 Thread Gábor Horváth via cfe-commits
@@ -441,3 +441,31 @@ void testLeakBecauseNTTPIsNotDeallocation() { void* p = ::operator new(10); deallocate_via_nttp(p); } // leak-warning{{Potential leak of memory pointed to by 'p'}} + +namespace optional_union { + template + class unique_ptr { +T *q; + public: +

[clang] [Wunsafe-buffer-usage] Turn off unsafe-buffer warning for methods annotated with clang::unsafe_buffer_usage attribute (PR #125671)

2025-02-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Malavika Samak (malavikasamak) Changes Unsafe operation in methods that are already annotated with clang::unsafe_buffer_usage attribute, should not trigger a warning. This is because, the developer has already identified the method as uns

[clang] [Wunsafe-buffer-usage] Turn off unsafe-buffer warning for methods annotated with clang::unsafe_buffer_usage attribute (PR #125671)

2025-02-04 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 76e73ae6af1cecffaf977391e52bb9c410c14ff1 afab62e75c9130e667935d775bc256b2c3a9c62d --e

[clang] [OpenMP][ASan] Enable ASan Instrumentation for AMDGPUOpenMPToolChain. (PR #124754)

2025-02-04 Thread Amit Kumar Pandey via cfe-commits
@@ -71,10 +71,10 @@ llvm::opt::DerivedArgList *AMDGPUOpenMPToolChain::TranslateArgs( const OptTable &Opts = getDriver().getOpts(); - for (Arg *A : Args) { -if (!llvm::is_contained(*DAL, A)) + for (Arg *A : Args) +if (!shouldSkipSanitizeOption(*this, Args, BoundAr

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-02-04 Thread Owen Pan via cfe-commits
@@ -11224,6 +11224,328 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateCloser) { + FormatStyle Style = getLLVMStyle(); + // Begin with tests covering the case where there is no constraint on the + // col

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-02-04 Thread Owen Pan via cfe-commits
@@ -11224,6 +11224,328 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateCloser) { + FormatStyle Style = getLLVMStyle(); + // Begin with tests covering the case where there is no constraint on the + // col

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-02-04 Thread Owen Pan via cfe-commits
@@ -11224,6 +11224,328 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateCloser) { + FormatStyle Style = getLLVMStyle(); + // Begin with tests covering the case where there is no constraint on the + // col

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-02-04 Thread Owen Pan via cfe-commits
@@ -11224,6 +11224,328 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateCloser) { + FormatStyle Style = getLLVMStyle(); + // Begin with tests covering the case where there is no constraint on the + // col

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-02-04 Thread Owen Pan via cfe-commits
@@ -11224,6 +11224,328 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateCloser) { + FormatStyle Style = getLLVMStyle(); + // Begin with tests covering the case where there is no constraint on the + // col

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-02-04 Thread Owen Pan via cfe-commits
@@ -11224,6 +11224,328 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateCloser) { + FormatStyle Style = getLLVMStyle(); + // Begin with tests covering the case where there is no constraint on the + // col

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-02-04 Thread Owen Pan via cfe-commits
@@ -11224,6 +11224,328 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateCloser) { + FormatStyle Style = getLLVMStyle(); + // Begin with tests covering the case where there is no constraint on the + // col

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-02-04 Thread Owen Pan via cfe-commits
@@ -11224,6 +11224,328 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateCloser) { + FormatStyle Style = getLLVMStyle(); + // Begin with tests covering the case where there is no constraint on the + // col

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-02-04 Thread Owen Pan via cfe-commits
@@ -11224,6 +11224,328 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateCloser) { + FormatStyle Style = getLLVMStyle(); + // Begin with tests covering the case where there is no constraint on the + // col

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-02-04 Thread Owen Pan via cfe-commits
@@ -11224,6 +11224,328 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateCloser) { + FormatStyle Style = getLLVMStyle(); + // Begin with tests covering the case where there is no constraint on the + // col

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-02-04 Thread Owen Pan via cfe-commits
@@ -11224,6 +11224,328 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateCloser) { + FormatStyle Style = getLLVMStyle(); + // Begin with tests covering the case where there is no constraint on the + // col

[clang] [webkit.UncountedLambdaCapturesChecker] Fix a bug that the checker didn't take the object pointer into account. (PR #125662)

2025-02-04 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa edited https://github.com/llvm/llvm-project/pull/125662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [webkit.UncountedLambdaCapturesChecker] Fix a bug that the checker didn't take the object pointer into acccount. (PR #125662)

2025-02-04 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/125662 When a callee is a method call (e.g. calling a lambda), we need to skip the object pointer to match the parameter list with the call arguments. This manifests as a bug that the checker erroneously generate a warn

<    1   2   3   4   5   6   >