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

2025-02-07 Thread via cfe-commits
@@ -9111,3 +9118,50 @@ def wasm_opt : Flag<["--"], "wasm-opt">, Group, HelpText<"Enable the wasm-opt optimizer (default)">, MarshallingInfoNegativeFlag>; + + + +//===--===// +// cl2000 Options +//===-

[clang] [OpenMP] Fix infinite loop on recursive initializers (PR #126269)

2025-02-07 Thread Alexey Bataev via cfe-commits
@@ -22819,8 +22819,12 @@ class GlobalDeclRefChecker final : public StmtVisitor { void declareTargetInitializer(Decl *TD) { A = TD->getAttr(); DeclVector.push_back(cast(TD)); +llvm::DenseSet Visited; alexey-bataev wrote: Better to use SmallDenseS

[clang] [OpenMP] Fix infinite loop on recursive initializers (PR #126269)

2025-02-07 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/126269 >From f41096aa802fe80ae50882ecd610ef1a3cf5cee5 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Fri, 7 Feb 2025 11:20:16 -0600 Subject: [PATCH 1/2] [OpenMP] Fix infinite recursion on global initializers Summar

[clang] [OpenMP] Fix infinite loop on recursive initializers (PR #126269)

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

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

2025-02-07 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/29] wip --- .../Checkers/StackAddrEscapeChecker.cpp

[clang] 7eaaa4e - [BoundsSafety][doc] Fix formatting (#126245)

2025-02-07 Thread via cfe-commits
Author: Piotr Fusik Date: 2025-02-07T18:51:07+01:00 New Revision: 7eaaa4e9415fc7533e688a9ed877aff75b7dfce4 URL: https://github.com/llvm/llvm-project/commit/7eaaa4e9415fc7533e688a9ed877aff75b7dfce4 DIFF: https://github.com/llvm/llvm-project/commit/7eaaa4e9415fc7533e688a9ed877aff75b7dfce4.diff L

[clang] [BoundsSafety][doc] Fix formatting (PR #126245)

2025-02-07 Thread Piotr Fusik via cfe-commits
https://github.com/pfusik closed https://github.com/llvm/llvm-project/pull/126245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-02-07 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: ping https://github.com/llvm/llvm-project/pull/125020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-02-07 Thread Michael Flanders via cfe-commits
@@ -912,3 +924,33 @@ void top_malloc_no_crash_fn() { free(pptr); } } // namespace alloca_region_pointer + +namespace true_negatives_return_expressions { +struct Container { int *x; }; + +int test2() { + int x = 14; Flandini wrote: Added in 51f8e2e589424b67b

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

2025-02-07 Thread Michael Flanders via cfe-commits
@@ -912,3 +924,33 @@ void top_malloc_no_crash_fn() { free(pptr); } } // namespace alloca_region_pointer + +namespace true_negatives_return_expressions { +struct Container { int *x; }; + +int test2() { + int x = 14; Flandini wrote: I also added a similar tes

[clang] [llvm] [clang-linker-wrapper][lit] Fix OpenMP SPIR-V ELF test again (PR #126142)

2025-02-07 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex ready_for_review https://github.com/llvm/llvm-project/pull/126142 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen][XCore] Replace PointerType::getUnqual(Type) with opaque version (NFC) (PR #126279)

2025-02-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mats Jun Larsen (junlarsen) Changes Follow-up to #123569 --- Full diff: https://github.com/llvm/llvm-project/pull/126279.diff 1 Files Affected: - (modified) clang/lib/CodeGen/Targets/XCore.cpp (+1-1) ``diff diff --git a/clang

[clang] [CodeGen][XCore] Replace PointerType::getUnqual(Type) with opaque version (NFC) (PR #126279)

2025-02-07 Thread Mats Jun Larsen via cfe-commits
https://github.com/junlarsen created https://github.com/llvm/llvm-project/pull/126279 Follow-up to #123569 >From 507705cff12ac89e1f23c0b7233cfd5a13e882d6 Mon Sep 17 00:00:00 2001 From: Mats Jun Larsen Date: Sat, 8 Feb 2025 02:57:46 +0900 Subject: [PATCH] [CodeGen][XCore] Replace PointerType::g

[clang] [CodeGen][SystemZ] Replace PointerType::getUnqual(Type) with opaque version (NFC) (PR #126280)

2025-02-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-systemz Author: Mats Jun Larsen (junlarsen) Changes Follow-up to #126278 --- Full diff: https://github.com/llvm/llvm-project/pull/126280.diff 1 Files Affected: - (modified) clang/lib/CodeGen/Targets/SystemZ.cpp (+1-1) ``diff diff -

[clang] [CodeGen][SystemZ] Replace PointerType::getUnqual(Type) with opaque version (NFC) (PR #126280)

2025-02-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mats Jun Larsen (junlarsen) Changes Follow-up to #126278 --- Full diff: https://github.com/llvm/llvm-project/pull/126280.diff 1 Files Affected: - (modified) clang/lib/CodeGen/Targets/SystemZ.cpp (+1-1) ``diff diff --git a/cla

[clang] bfba621 - [clang-linker-wrapper][lit] Fix OpenMP SPIR-V ELF test again (#126142)

2025-02-07 Thread via cfe-commits
Author: Nick Sarnie Date: 2025-02-07T18:02:48Z New Revision: bfba6215cec20bee308a4637298a590057004ff8 URL: https://github.com/llvm/llvm-project/commit/bfba6215cec20bee308a4637298a590057004ff8 DIFF: https://github.com/llvm/llvm-project/commit/bfba6215cec20bee308a4637298a590057004ff8.diff LOG: [

[clang] [CodeGen][XCore] Replace PointerType::getUnqual(Type) with opaque version (NFC) (PR #126279)

2025-02-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Mats Jun Larsen (junlarsen) Changes Follow-up to #123569 --- Full diff: https://github.com/llvm/llvm-project/pull/126279.diff 1 Files Affected: - (modified) clang/lib/CodeGen/Targets/XCore.cpp (+1-1) ``diff diff --git

[clang] [CodeGen][SystemZ] Replace PointerType::getUnqual(Type) with opaque version (NFC) (PR #126280)

2025-02-07 Thread Mats Jun Larsen via cfe-commits
https://github.com/junlarsen created https://github.com/llvm/llvm-project/pull/126280 Follow-up to #126278 >From 31586f0db70c1d7da7decb0fef3473930fe17c7b Mon Sep 17 00:00:00 2001 From: Mats Jun Larsen Date: Sat, 8 Feb 2025 02:59:34 +0900 Subject: [PATCH] [CodeGen][SystemZ] Replace PointerType:

[clang] [llvm] [clang-linker-wrapper][lit] Fix OpenMP SPIR-V ELF test again (PR #126142)

2025-02-07 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex closed https://github.com/llvm/llvm-project/pull/126142 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebKit checkers] Treat an implicit value initialization as trivial (PR #126203)

2025-02-07 Thread Ryosuke Niwa via cfe-commits
@@ -368,6 +368,11 @@ class RefCounted { } RefPtr trivial66() { return children[0]; } Ref trivial67() { return *children[0]; } + struct point { +double x; +double y; + }; + void trivial68() { point pt = { 1.0 }; } rniwa wrote: It implicitly ini

[clang] [llvm] [CaptureTracking][FunctionAttrs] Add support for CaptureInfo (PR #125880)

2025-02-07 Thread Nikita Popov via cfe-commits
@@ -774,7 +774,7 @@ define i1 @captureICmpRev(ptr %x) { define i1 @nocaptureInboundsGEPICmp(ptr %x) { ; FNATTRS: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) ; FNATTRS-LABEL: define i1 @nocaptureInboundsGEPICmp -; FNATTRS-SAME: (ptr rea

[clang] [LinkerWrapper] Clean up options after proper forwarding (PR #126297)

2025-02-07 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 d9500f5032312776c69e4bf41722d62ef9c76e49 1a6aa666e5ac32a559d0eb2e854d08f45695e6ac --e

[clang] [LinkerWrapper] Clean up options after proper forwarding (PR #126297)

2025-02-07 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/126297 >From f553b8a2d53f41690402f6a7f781b74c97fc81d4 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Fri, 7 Feb 2025 13:39:56 -0600 Subject: [PATCH] [LinkerWrapper] Clean up options after proper forwarding Summary:

[clang] [OpenMP] Fix infinite loop on recursive initializers (PR #126269)

2025-02-07 Thread Joseph Huber via cfe-commits
jhuber6 wrote: /cherry-pick https://github.com/llvm/llvm-project/commit/605a9e37b64b5b5647f1f3e560f7ffe31157841c https://github.com/llvm/llvm-project/pull/126269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [llvm] [CaptureTracking][FunctionAttrs] Add support for CaptureInfo (PR #125880)

2025-02-07 Thread Nikita Popov via cfe-commits
@@ -358,49 +360,64 @@ UseCaptureKind llvm::DetermineUseCaptureKind( // Volatile stores make the address observable. auto *ACXI = cast(I); if (U.getOperandNo() == 1 || U.getOperandNo() == 2 || ACXI->isVolatile()) - return UseCaptureKind::MAY_CAPTURE; -return

[clang] 7abca75 - [Index] Skip adding call relations to deduction guides (#126151)

2025-02-07 Thread via cfe-commits
Author: Ben Barham Date: 2025-02-07T12:02:13-08:00 New Revision: 7abca756d1434f0e51cd0af8da647d51f38f634e URL: https://github.com/llvm/llvm-project/commit/7abca756d1434f0e51cd0af8da647d51f38f634e DIFF: https://github.com/llvm/llvm-project/commit/7abca756d1434f0e51cd0af8da647d51f38f634e.diff LO

[clang] [Index] Skip adding call relations to deduction guides (PR #126151)

2025-02-07 Thread Ben Barham via cfe-commits
https://github.com/bnbarham closed https://github.com/llvm/llvm-project/pull/126151 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-07 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl deleted https://github.com/llvm/llvm-project/pull/125319 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CaptureTracking][FunctionAttrs] Add support for CaptureInfo (PR #125880)

2025-02-07 Thread Nikita Popov via cfe-commits
@@ -358,49 +360,59 @@ UseCaptureKind llvm::DetermineUseCaptureKind( // Volatile stores make the address observable. auto *ACXI = cast(I); if (U.getOperandNo() == 1 || U.getOperandNo() == 2 || ACXI->isVolatile()) - return UseCaptureKind::MAY_CAPTURE; -return

[clang] [Fuchsia] Disable building runtimes with LTO (PR #126306)

2025-02-07 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/126306 Temporarily disable LTO'd runtimes, while we investigate an issue building Fuchsia with LTO. >From e74084d6efca42e322001394ae7710d10932a5b9 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Fri, 7 Feb 2025 12:47:

[clang] [Fuchsia] Disable building runtimes with LTO (PR #126306)

2025-02-07 Thread Paul Kirth via cfe-commits
ilovepi wrote: * **#126306** https://app.graphite.dev/github/pr/llvm/llvm-project/126306?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/1263

[clang] [Fuchsia] Disable building runtimes with LTO (PR #126306)

2025-02-07 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi ready_for_review https://github.com/llvm/llvm-project/pull/126306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP][clang]: Implement a conditional lifetimebound_if builtin. (PR #125520)

2025-02-07 Thread via cfe-commits
higher-performance wrote: > it would be great to get something that "magically" works with a single > attribute and does not need complicated compile-time computations. If we > cannot get that, the approach with `clang::lifetimebound_like` seems like the > second-best alternative. The closest

[clang] [Fuchsia] Disable building runtimes with LTO (PR #126306)

2025-02-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Paul Kirth (ilovepi) Changes Temporarily disable LTO'd runtimes, while we investigate an issue building Fuchsia with LTO. --- Full diff: https://github.com/llvm/llvm-project/pull/126306.diff 1 Files Affected: - (modified) clang/cmake/ca

[clang] [llvm] [CaptureTracking][FunctionAttrs] Add support for CaptureInfo (PR #125880)

2025-02-07 Thread via cfe-commits
@@ -358,49 +360,59 @@ UseCaptureKind llvm::DetermineUseCaptureKind( // Volatile stores make the address observable. auto *ACXI = cast(I); if (U.getOperandNo() == 1 || U.getOperandNo() == 2 || ACXI->isVolatile()) - return UseCaptureKind::MAY_CAPTURE; -return

[clang] [LinkerWrapper] Clean up options after proper forwarding (PR #126297)

2025-02-07 Thread Joseph Huber via cfe-commits
@@ -9220,13 +9220,24 @@ void LinkerWrapper::ConstructJob(Compilation &C, const JobAction &JA, for (StringRef Arg : LinkerArgs) CmdArgs.push_back(Args.MakeArgString( "--device-linker=" + TC->getTripleString() + "=" + Arg)); + + // Forward the LTO

[clang] [llvm] [CaptureTracking][FunctionAttrs] Add support for CaptureInfo (PR #125880)

2025-02-07 Thread Nikita Popov via cfe-commits
@@ -774,7 +774,7 @@ define i1 @captureICmpRev(ptr %x) { define i1 @nocaptureInboundsGEPICmp(ptr %x) { ; FNATTRS: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) ; FNATTRS-LABEL: define i1 @nocaptureInboundsGEPICmp -; FNATTRS-SAME: (ptr rea

[clang] [clang-tools-extra] [flang] [lldb] [llvm] [mlir] [polly] Add static to command line option (cl::opt) (PR #126243)

2025-02-07 Thread Rahul Joshi via cfe-commits
jurahul wrote: Also, the commit description should be something like: "[NFC] Make file-local cl::opt global variables static" or something like that https://github.com/llvm/llvm-project/pull/126243 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

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

2025-02-07 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed 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] [LinkerWrapper] Clean up options after proper forwarding (PR #126297)

2025-02-07 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/126297 Summary: Recent changes made a lot of this stuff redundant or unused, clean it up a bit. Also snuck in a change to pass the CUDA path since we still use it for `fatbinary` internally. >From 1a6aa666e5ac32a559d

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

2025-02-07 Thread Helena Kotas via cfe-commits
@@ -48,94 +48,108 @@ struct TwoFloats { // CHECK: HLSLResourceClassAttr {{.*}} Implicit CBuffer // CHECK: HLSLResourceAttr {{.*}} Implicit CBuffer cbuffer CB { - // CHECK: VarDecl {{.*}} col:9 used a1 'hlsl_constant float' + // CHECK: VarDecl {{.*}} used a1 'hlsl_constant flo

[clang] [LinkerWrapper] Clean up options after proper forwarding (PR #126297)

2025-02-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes Summary: Recent changes made a lot of this stuff redundant or unused, clean it up a bit. Also snuck in a change to pass the CUDA path since we still use it for `fatbinary` internally. --- Full diff: https:/

[clang] 479ffe8 - [OpenMP] Fix Xarch OpenMP test on Windows

2025-02-07 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2025-02-07T13:41:40-06:00 New Revision: 479ffe851bda03d7707b5aae633f231980b71344 URL: https://github.com/llvm/llvm-project/commit/479ffe851bda03d7707b5aae633f231980b71344 DIFF: https://github.com/llvm/llvm-project/commit/479ffe851bda03d7707b5aae633f231980b71344.diff

[clang] 605a9e3 - [OpenMP] Fix infinite loop on recursive initializers (#126269)

2025-02-07 Thread via cfe-commits
Author: Joseph Huber Date: 2025-02-07T13:44:20-06:00 New Revision: 605a9e37b64b5b5647f1f3e560f7ffe31157841c URL: https://github.com/llvm/llvm-project/commit/605a9e37b64b5b5647f1f3e560f7ffe31157841c DIFF: https://github.com/llvm/llvm-project/commit/605a9e37b64b5b5647f1f3e560f7ffe31157841c.diff

[clang] [OpenMP] Fix infinite loop on recursive initializers (PR #126269)

2025-02-07 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/126269 ___ 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-07 Thread Helena Kotas via cfe-commits
@@ -48,94 +48,108 @@ struct TwoFloats { // CHECK: HLSLResourceClassAttr {{.*}} Implicit CBuffer // CHECK: HLSLResourceAttr {{.*}} Implicit CBuffer cbuffer CB { - // CHECK: VarDecl {{.*}} col:9 used a1 'hlsl_constant float' + // CHECK: VarDecl {{.*}} used a1 'hlsl_constant flo

[clang] [FreeBSD] Support -stdlib=libstdc++ (PR #126302)

2025-02-07 Thread Alexander Richardson via cfe-commits
@@ -452,12 +452,12 @@ void FreeBSD::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, void FreeBSD::AddCXXStdlibLibArgs(const ArgList &Args, ArgStringList &CmdArgs) const { + Generic_ELF::AddCXXStdlibLibArgs(Args, CmdArgs); unsi

[clang] [LinkerWrapper] Clean up options after proper forwarding (PR #126297)

2025-02-07 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/126297 >From a19b3263a99c3def8ec4b756d8cf85233ebf9735 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Fri, 7 Feb 2025 13:39:56 -0600 Subject: [PATCH] [LinkerWrapper] Clean up options after proper forwarding Summary:

[clang] [LinkerWrapper] Clean up options after proper forwarding (PR #126297)

2025-02-07 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/126297 >From 5267aa9911ea8bdce217f7420e123b5976df3f5b Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Fri, 7 Feb 2025 13:39:56 -0600 Subject: [PATCH] [LinkerWrapper] Clean up options after proper forwarding Summary:

[clang] [clang][ExtractAPI] combine typedef records if the underlying type's name is underscored (PR #125964)

2025-02-07 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-5` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/14302 Here is th

[clang] [clang-tools-extra] [flang] [lldb] [llvm] [mlir] [polly] Add static to command line option (cl::opt) (PR #126243)

2025-02-07 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: All these changes are independent and quite straight forward. I'd suggest to split in some way, so it's easier to review, land, and revert if we miss and break something. Maybe by component. also globals vs function local etc. https://github.com/llvm/llvm-project/pull/12624

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

2025-02-07 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: If you wanted to do things "properly", you'd probably define `__interrupt` and `__cregister` as attributes in clang/include/clang/Basic/Attr.td . But at first glance, using macros to ignore `__interrupt` and `__cregister` behaves basically correctly, if you're not actuall

[clang] [LinkerWrapper] Clean up options after proper forwarding (PR #126297)

2025-02-07 Thread Nick Sarnie via cfe-commits
@@ -9220,13 +9220,24 @@ void LinkerWrapper::ConstructJob(Compilation &C, const JobAction &JA, for (StringRef Arg : LinkerArgs) CmdArgs.push_back(Args.MakeArgString( "--device-linker=" + TC->getTripleString() + "=" + Arg)); + + // Forward the LTO

[clang] [LinkerWrapper] Clean up options after proper forwarding (PR #126297)

2025-02-07 Thread Nick Sarnie via cfe-commits
@@ -9220,13 +9220,24 @@ void LinkerWrapper::ConstructJob(Compilation &C, const JobAction &JA, for (StringRef Arg : LinkerArgs) CmdArgs.push_back(Args.MakeArgString( "--device-linker=" + TC->getTripleString() + "=" + Arg)); + + // Forward the LTO

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

2025-02-07 Thread Owen Pan via cfe-commits
@@ -14185,6 +14185,32 @@ TEST_F(FormatTest, LayoutCxx11BraceInitializers) { "ff, g, hh, ii, jj, kk,\n" "};", NoBinPacking); + NoBinPacking.BinPackLongBracedLists = false; owenca wrote: ```suggestion NoBinPacki

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

2025-02-07 Thread Owen Pan via cfe-commits
@@ -14185,6 +14185,32 @@ TEST_F(FormatTest, LayoutCxx11BraceInitializers) { "ff, g, hh, ii, jj, kk,\n" "};", NoBinPacking); + NoBinPacking.BinPackLongBracedLists = false; + verifyFormat("const Aa a = {\n" +

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

2025-02-07 Thread Owen Pan via cfe-commits
@@ -1212,6 +1212,22 @@ struct FormatStyle { /// \version 3.7 bool BinPackArguments; + /// If ``BinPackLongBracedLists`` is ``true`` it overrides + /// ``BinPackArguments`` if there are 20 or more items in a braced + /// initializer list. + /// \code + ///BinPackLo

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

2025-02-07 Thread Owen Pan via cfe-commits
@@ -14185,6 +14185,32 @@ TEST_F(FormatTest, LayoutCxx11BraceInitializers) { "ff, g, hh, ii, jj, kk,\n" "};", NoBinPacking); + NoBinPacking.BinPackLongBracedLists = false; + verifyFormat("const Aa a = {\n" +

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

2025-02-07 Thread Owen Pan via cfe-commits
@@ -2520,6 +2536,9 @@ struct FormatStyle { /// (e.g. a type or variable name), clang-format formats as if the ``{}`` were /// the parentheses of a function call with that name. If there is no name, /// a zero-length name is assumed. + /// + /// ``BinPackArguments`` may

[clang] [llvm] Try to use non-volatile registers for `preserve_none` parameters (PR #88333)

2025-02-07 Thread Joshua Haberman via cfe-commits
haberman wrote: Consider the case that `boring()` uses `preserve_most`: ```c __attribute__((preserve_most)) void boring(void *); __attribute__((preserve_none)) void (continuation)(void *, void *, void *, void *, void*); __attribute__((preserve_none)) void entry(void *a, void *b, void *c, void

[clang] [clang-format] Improve function pointer CastRParen detection. (PR #126019)

2025-02-07 Thread Owen Pan via cfe-commits
@@ -874,6 +874,11 @@ TEST_F(TokenAnnotatorTest, UnderstandsCasts) { EXPECT_TOKEN(Tokens[14], tok::r_paren, TT_CastRParen); EXPECT_TOKEN(Tokens[15], tok::amp, TT_UnaryOperator); + Tokens = annotate("func((foo(bar::*)(void))&a);"); owenca wrote: So `foo` i

[clang] [clang-format] Improve function pointer CastRParen detection. (PR #126019)

2025-02-07 Thread Owen Pan via cfe-commits
owenca wrote: The root cause is that the l_paren after the return type is not annotated. That's why the space between them is missing. https://github.com/llvm/llvm-project/pull/126019 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [clang] Force AttributedStmtClass to not be scope parents (PR #125370)

2025-02-07 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu updated https://github.com/llvm/llvm-project/pull/125370 >From 380ae2020f71cc5006db2e29b0a69f61297f585c Mon Sep 17 00:00:00 2001 From: Yutong Zhu Date: Sat, 1 Feb 2025 20:09:13 -0500 Subject: [PATCH 1/2] Force AttributedStmtClass to not be scope parents --- clang

[clang] [flang] [lld] [Flang] Rename libFortranRuntime.a to libflang_rt.runtime.a (PR #122341)

2025-02-07 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/122341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [sanitizer] [clang] Introduce fsanitize-bounds-strict-flex-arrays (PR #126163)

2025-02-07 Thread Florian Mayer via cfe-commits
@@ -444,6 +444,19 @@ class LangOptionsBase { IncompleteOnly = 3, }; + enum class ArrayBoundsStrictFlexArraysLevelKind { fmayer wrote: i have a weak preference for flags to have a value that can represent the state that is the same as if they were not

[clang] [sanitizer] [clang] Introduce fsanitize-bounds-strict-flex-arrays (PR #126163)

2025-02-07 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/126163 >From e9f2dbecb2b4836100a565b4c741fc3425d08966 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Thu, 6 Feb 2025 16:50:02 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

[clang] Revert "[Fuchsia] Support PGO" (PR #126293)

2025-02-07 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-4` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/14311 Here is th

[clang] [sanitizer] [clang] Introduce fsanitize-bounds-strict-flex-arrays (PR #126163)

2025-02-07 Thread Florian Mayer via cfe-commits
@@ -1192,13 +1193,40 @@ llvm::Value *CodeGenFunction::EmitLoadOfCountedByField( return nullptr; } +LangOptions::StrictFlexArraysLevelKind +CodeGenFunction::effectiveArrayBoundsFlexArraysLevel() { + using StrictFlexArraysLevelKind = LangOptions::StrictFlexArraysLevelKind; +

[clang] [sanitizer] [clang] Introduce fsanitize-bounds-strict-flex-arrays (PR #126163)

2025-02-07 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/126163 >From e9f2dbecb2b4836100a565b4c741fc3425d08966 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Thu, 6 Feb 2025 16:50:02 -0800 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

[clang] [sanitizer] [clang] Introduce fsanitize-undefined-strict-flex-arrays (PR #126163)

2025-02-07 Thread Florian Mayer via cfe-commits
https://github.com/fmayer edited https://github.com/llvm/llvm-project/pull/126163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [sanitizer] [clang] Introduce fsanitize-undefined-strict-flex-arrays (PR #126163)

2025-02-07 Thread Florian Mayer via cfe-commits
fmayer wrote: > Usually our tweak flags looks like -fsanitize-- > > "bounds" is a group for (array-bounds + local-bounds) "undefined" is also > group, but we already have -fsanitize-undefined-, but they kind of affect a > few sanitizers > > so: `-fsanitize-undefined-strict-flex-arrays` or >

[clang] [Fuchsia] Disable building runtimes with LTO (PR #126306)

2025-02-07 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/126306 >From 996088f74e517bcde209dfbbb1c1e5c245f96535 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Fri, 7 Feb 2025 12:47:05 -0800 Subject: [PATCH] [Fuchsia] Disable building runtimes with LTO Temporarily disable LT

[clang] Revert "[Fuchsia] Support PGO" (PR #126293)

2025-02-07 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/126293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Fuchsia] Support PGO" (PR #126293)

2025-02-07 Thread Petr Hosek via cfe-commits
petrhosek wrote: LGTM https://github.com/llvm/llvm-project/pull/126293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3e2afe5 - Revert "[Fuchsia] Support PGO" (#126293)

2025-02-07 Thread via cfe-commits
Author: Paul Kirth Date: 2025-02-07T16:57:11-08:00 New Revision: 3e2afe5f019b7a1c60e23cb2743018bd2d0417b1 URL: https://github.com/llvm/llvm-project/commit/3e2afe5f019b7a1c60e23cb2743018bd2d0417b1 DIFF: https://github.com/llvm/llvm-project/commit/3e2afe5f019b7a1c60e23cb2743018bd2d0417b1.diff LO

[clang] [Clang][Sema] Fix wrong initialization kind when handling initializing structured bindings from an array with direct-list-initialization (PR #124793)

2025-02-07 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis updated https://github.com/llvm/llvm-project/pull/124793 >From 16596add29b63ee0282e026dec7b1d5946863113 Mon Sep 17 00:00:00 2001 From: Yanzuo Liu Date: Wed, 29 Jan 2025 00:38:15 +0800 Subject: [PATCH 1/4] Fix wrong initialization kind --- clang/lib/Sema/SemaInit.cpp

[clang] [libc] [libcxx] [lldb] [llvm] [doc] Add Discord invite link alongside channel links (PR #126352)

2025-02-07 Thread Alex Bradbury via cfe-commits
https://github.com/asb created https://github.com/llvm/llvm-project/pull/126352 By far the most important part of this patch is updating GettingInvolved.rst to include the invite link, but I've grepped for any other discord.com links. I'm no Discord expert, but from my experience (confirmed via

[clang] [libc] [libcxx] [lldb] [llvm] [doc] Add Discord invite link alongside channel links (PR #126352)

2025-02-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libc Author: Alex Bradbury (asb) Changes By far the most important part of this patch is updating GettingInvolved.rst to include the invite link, but I've grepped for any other discord.com links. I'm no Discord expert, but from my experience (confirmed

[clang] [libc] [libcxx] [lldb] [llvm] [doc] Add Discord invite link alongside channel links (PR #126352)

2025-02-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libcxx Author: Alex Bradbury (asb) Changes By far the most important part of this patch is updating GettingInvolved.rst to include the invite link, but I've grepped for any other discord.com links. I'm no Discord expert, but from my experience (confirm

[clang] 6f241e3 - [Clang][Sema] Fix wrong initialization kind when handling initializing structured bindings from an array with direct-list-initialization (#124793)

2025-02-07 Thread via cfe-commits
Author: Yanzuo Liu Date: 2025-02-08T14:31:47+08:00 New Revision: 6f241e36831927e3aea113cfc017c34fdeda340a URL: https://github.com/llvm/llvm-project/commit/6f241e36831927e3aea113cfc017c34fdeda340a DIFF: https://github.com/llvm/llvm-project/commit/6f241e36831927e3aea113cfc017c34fdeda340a.diff LO

[clang] [Clang][Sema] Fix wrong initialization kind when handling initializing structured bindings from an array with direct-list-initialization (PR #124793)

2025-02-07 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/124793 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [libcxx] [lldb] [llvm] [doc] Add Discord invite link alongside channel links (PR #126352)

2025-02-07 Thread Alex Bradbury via cfe-commits
https://github.com/asb edited https://github.com/llvm/llvm-project/pull/126352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [ASTDump] Add support for structural value template arguments in TextNodeDumper (PR #126341)

2025-02-07 Thread via cfe-commits
https://github.com/sakria9 updated https://github.com/llvm/llvm-project/pull/126341 >From a382aa9de206a194397f9424150f170d35101b42 Mon Sep 17 00:00:00 2001 From: sakria9 Date: Sat, 8 Feb 2025 04:00:08 + Subject: [PATCH 1/8] [ASTDump] Add support for structural value template arguments in T

[clang] [clang] [ASTDump] Add support for structural value template arguments in TextNodeDumper (PR #126341)

2025-02-07 Thread via cfe-commits
@@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -std=c++20 -ast-dump -ast-dump-filter=pr126341 %s | FileCheck %s sakria9 wrote: Moved. https://github.com/llvm/llvm-project/pull/126341 ___ cfe-commits mailing list cfe-commits@lis

[clang] [clang] [ASTDump] Add support for structural value template arguments in TextNodeDumper (PR #126341)

2025-02-07 Thread via cfe-commits
sakria9 wrote: @zyn0217 Hi, I have 1) modified the release note 2) moved the test 3) supported dump structural value in `JSONNodeDumper`. Please take a look. https://github.com/llvm/llvm-project/pull/126341 ___ cfe-commits mailing list cfe-commits@lis

[clang] [Clang][Sema] Fix wrong initialization kind when handling initializing structured bindings from an array with direct-list-initialization (PR #124793)

2025-02-07 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux-bootstrap-hwasan` running on `sanitizer-buildbot11` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/55/builds/6756 Here is the rel

[clang] [Clang][Sema] Fix wrong initialization kind when handling initializing structured bindings from an array with direct-list-initialization (PR #124793)

2025-02-07 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-cmake-x86_64-avx512-win` running on `avx512-intel64-win` while building `clang` at step 4 "cmake stage 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/81/builds/4525 Here is the relevant pi

[clang] [WebKit Checkers] Treat const Objective-C ivar as a safe origin (PR #126353)

2025-02-07 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/126353 Like const C++ member variables, treat const Ref, RefPtr, CheckedRef, CheckedPtr Objective-C ivars as a safe pointer origin in WebKit checkers. >From b3d79dd62e88afa0e83101165ea878f12176e0f2 Mon Sep 17 00:00:00 2

[clang] [WebKit Checkers] Treat const Objective-C ivar as a safe origin (PR #126353)

2025-02-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ryosuke Niwa (rniwa) Changes Like const C++ member variables, treat const Ref, RefPtr, CheckedRef, CheckedPtr Objective-C ivars as a safe pointer origin in WebKit checkers. --- Full diff: https://github.com/llvm/llvm-project/pull/126353.d

[clang] [WebKit Checkers] Treat const Objective-C ivar as a safe origin (PR #126353)

2025-02-07 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/126353 >From b3d79dd62e88afa0e83101165ea878f12176e0f2 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Fri, 7 Feb 2025 23:21:06 -0800 Subject: [PATCH 1/2] [WebKit Checkers] Treat const Objective-C ivar as a safe origin

[clang] [libcxxabi] [llvm] [Clang] Mangling of pack indexing type and expression for itanium (PR #123513)

2025-02-07 Thread via cfe-commits
https://github.com/Aveitua01 approved this pull request. https://github.com/llvm/llvm-project/pull/123513 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxxabi] [llvm] [Clang] Mangling of pack indexing type and expression for itanium (PR #123513)

2025-02-07 Thread via cfe-commits
https://github.com/Aveitua01 approved this pull request. https://github.com/llvm/llvm-project/pull/123513 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FreeBSD] Support -stdlib=libstdc++ (PR #126302)

2025-02-07 Thread Jessica Clarke via cfe-commits
@@ -452,12 +452,12 @@ void FreeBSD::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, void FreeBSD::AddCXXStdlibLibArgs(const ArgList &Args, ArgStringList &CmdArgs) const { + Generic_ELF::AddCXXStdlibLibArgs(Args, CmdArgs); unsi

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

2025-02-07 Thread Eli Friedman via cfe-commits
@@ -9111,3 +9118,50 @@ def wasm_opt : Flag<["--"], "wasm-opt">, Group, HelpText<"Enable the wasm-opt optimizer (default)">, MarshallingInfoNegativeFlag>; + + + +//===--===// +// cl2000 Options +//===-

[clang] [FreeBSD] Support -stdlib=libstdc++ (PR #126302)

2025-02-07 Thread Alexander Richardson via cfe-commits
@@ -452,12 +452,12 @@ void FreeBSD::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, void FreeBSD::AddCXXStdlibLibArgs(const ArgList &Args, ArgStringList &CmdArgs) const { + Generic_ELF::AddCXXStdlibLibArgs(Args, CmdArgs); unsi

[clang] [C++20][Modules][Serialization] Delay marking pending incomplete decl chains until the end of `finishPendingActions`. (PR #121245)

2025-02-07 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#126289 https://github.com/llvm/llvm-project/pull/121245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Fuchsia] Support PGO" (PR #126293)

2025-02-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Paul Kirth (ilovepi) Changes Reverts llvm/llvm-project#120323 This breaks some internal Fuchsia builders. We can reland again later, once that is addresed. --- Full diff: https://github.com/llvm/llvm-project/pull/126293.diff 2 Files Af

[clang] Revert "[Fuchsia] Support PGO" (PR #126293)

2025-02-07 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/126293 Reverts llvm/llvm-project#120323 This breaks some internal Fuchsia builders. We can reland again later, once that is addresed. >From 9611deb1401eb27477ae438ed257fccc87a395b7 Mon Sep 17 00:00:00 2001 From: Paul

[clang] [C++20][Modules][Serialization] Delay marking pending incomplete decl chains until the end of `finishPendingActions`. (PR #121245)

2025-02-07 Thread Michael Park via cfe-commits
mpark wrote: /cherry-pick a9e249f64e800fbb20a3b26c0cfb68c1a1aee5e1 https://github.com/llvm/llvm-project/pull/121245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Fuchsia] Support PGO" (PR #126293)

2025-02-07 Thread Paul Kirth via cfe-commits
ilovepi wrote: Pausing for now, since there may be an easy fix on our side, and this doesn't affect any public builds. https://github.com/llvm/llvm-project/pull/126293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

<    1   2   3   4   5   6   >