[clang] [clang][OpenMP] Rename `varlists` to `varlist`, NFC (PR #101058)

2024-07-29 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz updated https://github.com/llvm/llvm-project/pull/101058 >From e6286e542ede1dfe5b63ce3b8d86a78fc8c8c895 Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Mon, 29 Jul 2024 13:29:09 -0500 Subject: [PATCH 1/2] [clang][OpenMP] Rename `varlists` to `varlist`, NFC

[clang] [C] Disable use of NRVO (PR #101038)

2024-07-29 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > We shouldn't merge this PR unless we need an immediate fix, which seems > unlikely given how longstanding this behavior is. Agreed, it's definitely not in shape for committing. As for needing an immediate fix, what surprised me was that two different people ran into this

[clang] [C] Disable use of NRVO (PR #101038)

2024-07-29 Thread John McCall via cfe-commits
rjmccall wrote: Note that we're forced to override that ABI rule in C++ sometimes — I believe we're now required (since C++11?) to elide a copy/move when initializing a normal object with a return value, and even if we weren't, it'd clearly be unreasonable compiler behavior to do an extra non-

[clang] [NFC][clang] Fix typo of `riscv_rvv_vector_bits` in AttrDocs (PR #101046)

2024-07-29 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp approved this pull request. https://github.com/llvm/llvm-project/pull/101046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C] Disable use of NRVO (PR #101038)

2024-07-29 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: I'm a bit less clear on what to do now. It sounds like nobody is opposed to a language dialect flag (default off) so users can retain the existing behavior. But it also sounds like perhaps the correct approach to this is to modify codegen and not the NRVO markings when buil

[clang] [CMake][Fuchsia] Include libunwind and libc++abi in baremetal build (PR #100908)

2024-07-29 Thread via cfe-commits
https://github.com/PiJoules approved this pull request. https://github.com/llvm/llvm-project/pull/100908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] add support for handling assume attributes (PR #101063)

2024-07-29 Thread via cfe-commits
https://github.com/vortex73 created https://github.com/llvm/llvm-project/pull/101063 None >From 97de745341dfc17e7ad9c595d239346a9114a4c6 Mon Sep 17 00:00:00 2001 From: Narayan Sreekumar Date: Tue, 30 Jul 2024 00:18:46 +0530 Subject: [PATCH] [Clang] add support for handling assume attributes -

[clang] [Clang] add support for handling assume attributes (PR #101063)

2024-07-29 Thread via cfe-commits
https://github.com/vortex73 edited https://github.com/llvm/llvm-project/pull/101063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C] Disable use of NRVO (PR #101038)

2024-07-29 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I agree it's strange choice the effects of elide-constructor are applied on the CodeGen side, by ignoring the AST, instead of on the AST directly. https://github.com/llvm/llvm-project/pull/101038 ___ cfe-commits mailing list cfe-commit

[clang] [Clang] add support for handling assume attributes (PR #101063)

2024-07-29 Thread via cfe-commits
vortex73 wrote: @steakhal Kinda stuck... It builds properly but doesn't detect the assume attribute. https://github.com/llvm/llvm-project/pull/101063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [Clang] add support for handling assume attributes (PR #101063)

2024-07-29 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 13996378d81c8fa9a364aeaafd7382abbc1db83a 97de745341dfc17e7ad9c595d239346a9114a4c6 --e

[clang] [analyzer] Assert Callee is FunctionDecl in doesFnIntendToHandleOwner… (PR #101066)

2024-07-29 Thread via cfe-commits
https://github.com/smanna12 created https://github.com/llvm/llvm-project/pull/101066 …ship() This patch replaces dyn_cast<> with cast<> for converting Callee to FunctionDecl, asserting non-null assumption to prevent undefined behavior due to null dereferences and enforces the invariant that C

[clang] [analyzer] Assert Callee is FunctionDecl in doesFnIntendToHandleOwner… (PR #101066)

2024-07-29 Thread via cfe-commits
https://github.com/smanna12 edited https://github.com/llvm/llvm-project/pull/101066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Assert Callee is FunctionDecl in doesFnIntendToHandleOwnership() (PR #101066)

2024-07-29 Thread via cfe-commits
https://github.com/smanna12 edited https://github.com/llvm/llvm-project/pull/101066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Assert Callee is FunctionDecl in doesFnIntendToHandleOwnership() (PR #101066)

2024-07-29 Thread via cfe-commits
https://github.com/smanna12 ready_for_review https://github.com/llvm/llvm-project/pull/101066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Assert Callee is FunctionDecl in doesFnIntendToHandleOwnership() (PR #101066)

2024-07-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (smanna12) Changes This patch replaces dyn_cast<> with cast<> for converting Callee to FunctionDecl, asserting non-null assumption to prevent undefined behavior due to null dereferences and enforces the invariant that Callee must be

[clang] [analyzer] Assert Callee is FunctionDecl in doesFnIntendToHandleOwnership() (PR #101066)

2024-07-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: None (smanna12) Changes This patch replaces dyn_cast<> with cast<> for converting Callee to FunctionDecl, asserting non-null assumption to prevent undefined behavior due to null dereferences and enforces the invariant th

[clang] [Clang] add support for handling assume attributes (PR #101063)

2024-07-29 Thread Balazs Benics via cfe-commits
steakhal wrote: No, its cool. You are on the right track. Ill come back to you tomorrow. https://github.com/llvm/llvm-project/pull/101063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [C] Disable use of NRVO (PR #101038)

2024-07-29 Thread John McCall via cfe-commits
rjmccall wrote: My argument above is that the x86-64 psABI requires us to not pass `&t` as the indirect return address. Following that rule fixes the problem here even if we keep doing NRVO. I think the approximate shape of the correct fix here is to: (1) Use the function Eli pointed out to c

[clang] [clang] constexpr atomic builtins (__c11_atomic_OP and __atomic_OP) (PR #98756)

2024-07-29 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/98756 From e21d8acf36c188056bc2f08b60470fdd6d62cf7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= Date: Sat, 13 Jul 2024 20:59:22 +0200 Subject: [PATCH] [clang] constexpr atomic builtins (__

[clang] [clang-format] Use double hyphen for multiple-letter flags (PR #100978)

2024-07-29 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks requested changes to this pull request. You certainly can add the double hyphen flags, but you can't remove the single ones. https://github.com/llvm/llvm-project/pull/100978 ___ cfe-commits mailing list cfe-commit

[clang] [C] Disable use of NRVO (PR #101038)

2024-07-29 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: >From my testing in compiler explorer, GCC and Clang always produce programs >that return 1 as far back as we can test. ICC and MSVC do otherwise, they return 0. So I think this supports the notion that this should be a dialect, and we have to wire defaults differently in MSVC

[libunwind] [libunwind][AIX] Fix the wrong traceback from signal handler (PR #101069)

2024-07-29 Thread Xing Xue via cfe-commits
https://github.com/xingxue-ibm created https://github.com/llvm/llvm-project/pull/101069 Patch [llvm#92291](https://github.com/llvm/llvm-project/pull/92291) causes wrong traceback from a signal handler for AIX because the AIX unwinder uses the traceback table at the end of each function instead

[libunwind] [libunwind][AIX] Fix the wrong traceback from signal handler (PR #101069)

2024-07-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libunwind Author: Xing Xue (xingxue-ibm) Changes Patch [llvm#92291](https://github.com/llvm/llvm-project/pull/92291) causes wrong traceback from a signal handler for AIX because the AIX unwinder uses the traceback table at the end of each function inst

[clang] [analyzer] Assert Callee is FunctionDecl in doesFnIntendToHandleOwnership() (PR #101066)

2024-07-29 Thread via cfe-commits
https://github.com/smanna12 edited https://github.com/llvm/llvm-project/pull/101066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin, fmax and frexp. (PR #88978)

2024-07-29 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/88978 >From 3acc848f4fcc68445dfc849f9c6f8d384d3692af Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Tue, 16 Apr 2024 13:09:58 -0700 Subject: [PATCH 01/14] Adding C23 constexpr math functions fmin and frexp.

[clang] [Clang][Sema] Remove duplicate check in if-condition (PR #101070)

2024-07-29 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/101070 Resolves #101041 >From 521082f25bc42104fd436a412b2de2edb60b7b0e Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Mon, 29 Jul 2024 20:24:15 +0100 Subject: [PATCH] [Clang][Sema] Remove duplicate check in

[clang] [Clang][Sema] Remove duplicate check in if-condition (PR #101070)

2024-07-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jannick Kremer (DeinAlptraum) Changes Resolves #101041 --- Full diff: https://github.com/llvm/llvm-project/pull/101070.diff 1 Files Affected: - (modified) clang/lib/Sema/SemaOpenMP.cpp (+1-2) ``diff diff --git a/clang/lib/Se

[clang] [C] Disable use of NRVO (PR #101038)

2024-07-29 Thread Richard Smith via cfe-commits
zygoloid wrote: > Richard, I'm sorry to contradict you, but Aaron is correct to guess that this > is ABI-affecting: ABIs should and sometimes do specify whether an indirect > return address is allowed to be aliased. My claim was narrowly that the choice to perform or not perform NRVO for an i

[clang] [clang-format] Use double hyphen for multiple-letter flags (PR #100978)

2024-07-29 Thread via cfe-commits
magic-akari wrote: > You certainly can add the double hyphen flags, but you can't remove the > single ones. There seems to be a misunderstanding. Please review the original issue. I did _not_ eliminate support for single hyphens in clang-format. What I did was modify the scripts that call c

[clang] [Clang][Sema] Remove duplicate check in if-condition (PR #101070)

2024-07-29 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @zyn0217 I hope you're the right person to ask for a review here? https://github.com/llvm/llvm-project/pull/101070 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C] Disable use of NRVO (PR #101038)

2024-07-29 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: >So I think this supports the notion that this should be a dialect, and we have >to wire defaults differently in MSVC mode as well. I doubt anyone is intentionally depending on equality here. > C++ does have some restrictions on accessing objects that are being > initiali

[libunwind] [libunwind][AIX] Fix the wrong traceback from signal handler (PR #101069)

2024-07-29 Thread David Tenty via cfe-commits
https://github.com/daltenty milestoned https://github.com/llvm/llvm-project/pull/101069 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind][AIX] Fix the wrong traceback from signal handler (PR #101069)

2024-07-29 Thread David Tenty via cfe-commits
https://github.com/daltenty approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/101069 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C] Disable use of NRVO (PR #101038)

2024-07-29 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > I doubt anyone is intentionally depending on equality here. > The difference wrt the gnu::cleanup behavior looks plausible: https://github.com/llvm/llvm-project/issues/100868 https://github.com/llvm/llvm-project/pull/101038 ___ cf

[clang] [clang-format] Use double hyphen for multiple-letter flags (PR #100978)

2024-07-29 Thread Björn Schäpers via cfe-commits
HazardyKnusperkeks wrote: My bad, I thought you changed the options to those scripts. https://github.com/llvm/llvm-project/pull/100978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Use double hyphen for multiple-letter flags (PR #100978)

2024-07-29 Thread Björn Schäpers via cfe-commits
HazardyKnusperkeks wrote: Okay, I can't revoke my vote and remove me as reviewer. As demonstrated I'm not qualified to review python changes. https://github.com/llvm/llvm-project/pull/100978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)

2024-07-29 Thread Chris Warner via cfe-commits
https://github.com/cwarner-8702 created https://github.com/llvm/llvm-project/pull/101073 Expanding on [the previous PR](https://github.com/llvm/llvm-project/pull/98352), this is an attempt to remove the limitation that the option can only apply to signed integer types. Because unsigned types

[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)

2024-07-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-tidy @llvm/pr-subscribers-clang-tools-extra Author: Chris Warner (cwarner-8702) Changes Expanding on [the previous PR](https://github.com/llvm/llvm-project/pull/98352), this is an attempt to remove the limitation that t

[clang] [Clang] Resolve FIXME: Use class method when receiver is reference to class (PR #85316)

2024-07-29 Thread Rose Silicon via cfe-commits
https://github.com/RSilicon closed https://github.com/llvm/llvm-project/pull/85316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind][AIX] Fix the wrong traceback from signal handler (PR #101069)

2024-07-29 Thread Xing Xue via cfe-commits
https://github.com/xingxue-ibm updated https://github.com/llvm/llvm-project/pull/101069 >From 05110959c01b5b7d4f2530e4d21232053db939f3 Mon Sep 17 00:00:00 2001 From: Xing Xue Date: Mon, 29 Jul 2024 14:53:36 -0400 Subject: [PATCH 1/2] Fix the problem introduced by upstream patch https://github.

[clang] [clang][OpenMP] Rename `varlists` to `varlist`, NFC (PR #101058)

2024-07-29 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz updated https://github.com/llvm/llvm-project/pull/101058 >From e6286e542ede1dfe5b63ce3b8d86a78fc8c8c895 Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Mon, 29 Jul 2024 13:29:09 -0500 Subject: [PATCH 1/3] [clang][OpenMP] Rename `varlists` to `varlist`, NFC

[libunwind] [libunwind][AIX] Fix the wrong traceback from signal handler (PR #101069)

2024-07-29 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. https://github.com/llvm/llvm-project/pull/101069 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LinkerWrapper] Make `-Xoffload-linker` match `-Xlinker` semantics (PR #101032)

2024-07-29 Thread Joel E. Denny via cfe-commits
@@ -32,6 +32,9 @@ def builtin_bitcode_EQ : Joined<["--"], "builtin-bitcode=">, def device_linker_args_EQ : Joined<["--"], "device-linker=">, Flags<[WrapperOnlyOption]>, MetaVarName<" or =">, HelpText<"Arguments to pass to the device linker invocation">; +def device_compiler

[clang] [LinkerWrapper] Make `-Xoffload-linker` match `-Xlinker` semantics (PR #101032)

2024-07-29 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/101032 >From 19d0d5622fbc5b7df07e2fc907b8e7c50216bcde Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Mon, 29 Jul 2024 10:36:12 -0500 Subject: [PATCH 1/2] [LinkerWrapper] Make `-Xoffload-linker` match `-Xlinker` sem

[clang] [LinkerWrapper] Make `-Xoffload-linker` match `-Xlinker` semantics (PR #101032)

2024-07-29 Thread Joel E. Denny via cfe-commits
https://github.com/jdenny-ornl approved this pull request. https://github.com/llvm/llvm-project/pull/101032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Create a new check to look for mis-use in calls that take iterators (PR #99917)

2024-07-29 Thread Nathan James via cfe-commits
https://github.com/njames93 updated https://github.com/llvm/llvm-project/pull/99917 >From 4762dc02504b63ad8ee5922e0f051aff6c4b1f15 Mon Sep 17 00:00:00 2001 From: Nathan James Date: Tue, 23 Jul 2024 10:59:45 +0100 Subject: [PATCH] Create a new check to look for mis-use in calls that take iterat

[clang] [C] Disable use of NRVO (PR #101038)

2024-07-29 Thread John McCall via cfe-commits
rjmccall wrote: I accept your pedantry. 🫡 > Do we support ABIs that don't have a rule like x86_64's? The ARM and ARM64 AAPCSs specify that "The memory to be used for the result may be modified at any point during the function call" and "The callee may modify the result memory block at any po

[clang] [C] Disable use of NRVO (PR #101038)

2024-07-29 Thread John McCall via cfe-commits
rjmccall wrote: > > C++ does have some restrictions on accessing objects that are being > > initialized through other names. It's possible that they're strong enough > > to satisfy the ABI rule here through a sort of reverse of the normal > > analysis: basically, any program that would violate

[clang] [LinkerWrapper] Make `-Xoffload-linker` match `-Xlinker` semantics (PR #101032)

2024-07-29 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr commented: Do we have some sort of documentation where this change of behavior needs to be communicated? https://github.com/llvm/llvm-project/pull/101032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] Ofast deprecation clarifications (PR #101005)

2024-07-29 Thread James Y Knight via cfe-commits
https://github.com/jyknight approved this pull request. LGTM, thanks. https://github.com/llvm/llvm-project/pull/101005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [APFloat] Add support for f8E3M4 IEEE 754 type (PR #99698)

2024-07-29 Thread Alexander Pivovarov via cfe-commits
apivovarov wrote: If there are no further questions, comments, or objections, I will merge this PR in a few hours. https://github.com/llvm/llvm-project/pull/99698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [LinkerWrapper] Make `-Xoffload-linker` match `-Xlinker` semantics (PR #101032)

2024-07-29 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Do we have some sort of documentation where this change of behavior needs to > be communicated? Could probably specify it more in the docs. https://github.com/llvm/llvm-project/pull/101032 ___ cfe-commits mailing list cfe-commits@lis

[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

2024-07-29 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/100272 >From 06b702cd38943314b2e6f873e64d70baed6f57f7 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 23 Jul 2024 20:21:49 + Subject: [PATCH 1/5] implement idiom exclusions Add flag `-fno-sanitize-overf

[clang] [flang] [Flang][Driver] Introduce -fopenmp-targets offloading option (PR #100152)

2024-07-29 Thread Andrzej Warzyński via cfe-commits
@@ -492,6 +493,18 @@ void Flang::addOffloadOptions(Compilation &C, const InputInfoList &Inputs, if (Args.hasArg(options::OPT_nogpulib)) CmdArgs.push_back("-nogpulib"); } + + // For all the host OpenMP offloading compile jobs we need to pass the targets + // info

[clang] [Clang][Sema][OpenMP] Allow `num_teams` to accept multiple expressions (PR #99732)

2024-07-29 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/99732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AIX] Detect `#pragma mc_func` (PR #99888)

2024-07-29 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > I'm wondering why this option isn't on by default for AIX. I don't think > anyone is going to know to turn this option on, whereas if it's on by > default, users have to make a decision as to how to proceed, which seems like > the better default. Yes I agree. This is at th

[clang] [C] Disable use of NRVO (PR #101038)

2024-07-29 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > > And C++17 rules forbid a copy on the caller side: "guaranteed copy elision" > > means semantically, there is no copy. > > An extra copy is permitted for trivially-copyable types; otherwise we'd be > required to pass and return all classes indirectly. So we're not forbi

[clang] [C] Disable use of NRVO (PR #101038)

2024-07-29 Thread Richard Smith via cfe-commits
zygoloid wrote: > Typically, the absence of a statement must be interpreted as a lack of a > guarantee. In this case, however, I would argue it is more plausible to infer > that the ABI authors did not consider the possibility of passing a pointer to > aliased memory for the return value, and

[clang] [clang][CodeGen] Don't crash on output whose size is zero. (PR #99849)

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

[clang] [HLSL] Implement output parameter (PR #101083)

2024-07-29 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/101083 HLSL output parameters are denoted with the `inout` and `out` keywords in the function declaration. When an argument to an output parameter is constructed a temporary value is constructed for the argument.

[clang] [HLSL] Implement output parameter (PR #101083)

2024-07-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-hlsl @llvm/pr-subscribers-clang-static-analyzer-1 Author: Chris B (llvm-beanz) Changes HLSL output parameters are denoted with the `inout` and `out` keywords in the function declaration. When an argument to an output parameter

[clang] [HLSL] Implement output parameter (PR #101083)

2024-07-29 Thread Chris B via cfe-commits
https://github.com/llvm-beanz edited https://github.com/llvm/llvm-project/pull/101083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema][OpenMP] Allow `num_teams` to accept multiple expressions (PR #99732)

2024-07-29 Thread Shilei Tian via cfe-commits
@@ -21587,32 +21597,39 @@ const ValueDecl *SemaOpenMP::getOpenMPDeclareMapperVarName() const { return cast(DSAStack->getDeclareMapperVarRef())->getDecl(); } -OMPClause *SemaOpenMP::ActOnOpenMPNumTeamsClause(Expr *NumTeams, +OMPClause *SemaOpenMP::ActOnOpenMPNumTeamsClause(A

[clang] [HLSL] Implement output parameter (PR #101083)

2024-07-29 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 fb7028237bac1dccd328b6c3150e50e222a0879b 874a9d50b63f2ed7220b2e19e8377b545455cd69 --e

[clang-tools-extra] [clang-tidy] Add modernize-use-cpp-style-comments check (PR #99713)

2024-07-29 Thread NagaChaitanya Vellanki via cfe-commits
chaitanyav wrote: I am moving this under readability, i will also post some code on how am i planning to output a fix. For now i don't have a good way to handle ``` int a = /*some value */ 5; ``` https://github.com/llvm/llvm-project/pull/99713 ___ c

[clang] [HLSL] Implement output parameter (PR #101083)

2024-07-29 Thread Chris B via cfe-commits
https://github.com/llvm-beanz updated https://github.com/llvm/llvm-project/pull/101083 >From e8ec3e24e0061714b5dc440b1b92086965809483 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Mon, 29 Jul 2024 16:05:11 -0500 Subject: [PATCH] [HLSL] Implement output parameter HLSL output parameters ar

[clang] [NFC][clang] Fix typo of `riscv_rvv_vector_bits` in AttrDocs (PR #101046)

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

[clang] [HLSL] Implement output parameter (PR #101083)

2024-07-29 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: Approach generally seems fine; not sure I'll have time to look more closely. https://github.com/llvm/llvm-project/pull/101083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [HLSL] Implement output parameter (PR #101083)

2024-07-29 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/101083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement output parameter (PR #101083)

2024-07-29 Thread Eli Friedman via cfe-commits
@@ -4057,6 +4057,10 @@ bool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, NewQType)) return MergeCompatibleFunctionDecls(New, Old, S, MergeTypeWithOld); +if (getLangOpts().HLSL && Cont

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

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

[clang] [clang CodeGen] Restrict return statements nested in return statements. (PR #94282)

2024-07-29 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic closed https://github.com/llvm/llvm-project/pull/94282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang CodeGen] Restrict return statements nested in return statements. (PR #94282)

2024-07-29 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Don't have time to continue looking at this for now. https://github.com/llvm/llvm-project/pull/94282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Pipelines] Do not run CoroSplit and CoroCleanup in LTO pre-link pipeline (PR #100205)

2024-07-29 Thread Wei Wang via cfe-commits
https://github.com/apolloww updated https://github.com/llvm/llvm-project/pull/100205 >From bd652d600a1b1c71fcc2d399f33024ca5c78f5ce Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Mon, 29 Apr 2024 10:24:53 -0700 Subject: [PATCH] [Pipelines] Do not run CoroSplit and CoroCleanup in ThinLTO pre-lin

[clang] [HLSL] Implement output parameter (PR #101083)

2024-07-29 Thread Chris B via cfe-commits
@@ -4057,6 +4057,10 @@ bool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, NewQType)) return MergeCompatibleFunctionDecls(New, Old, S, MergeTypeWithOld); +if (getLangOpts().HLSL && Cont

[clang] [HLSL] Implement output parameter (PR #101083)

2024-07-29 Thread Chris B via cfe-commits
@@ -4148,6 +4151,30 @@ static void emitWriteback(CodeGenFunction &CGF, assert(!isProvablyNull(srcAddr.getBasePointer()) && "shouldn't have writeback for provably null argument"); + if (CGF.getLangOpts().HLSL) { +if (writeback.CastExpr) { + RValue TmpVal =

[clang] [llvm] [Pipelines] Do not run CoroSplit and CoroCleanup in LTO pre-link pipeline (PR #100205)

2024-07-29 Thread Wei Wang via cfe-commits
https://github.com/apolloww updated https://github.com/llvm/llvm-project/pull/100205 >From 041670dc6a8e9f6a86af152567f0705034db6ad2 Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Mon, 29 Apr 2024 10:24:53 -0700 Subject: [PATCH 1/2] [Pipelines] Do not run CoroSplit and CoroCleanup in ThinLTO pre

[clang] [RISCV] full support for riscv_rvv_vector_bits attribute (PR #100110)

2024-07-29 Thread Craig Topper via cfe-commits
https://github.com/topperc edited https://github.com/llvm/llvm-project/pull/100110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement output parameter (PR #101083)

2024-07-29 Thread Chris B via cfe-commits
https://github.com/llvm-beanz edited https://github.com/llvm/llvm-project/pull/101083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add debug options to clang-linker-wrapper (PR #101008)

2024-07-29 Thread via cfe-commits
https://github.com/macurtis-amd updated https://github.com/llvm/llvm-project/pull/101008 >From 5590228721e4ce719001311137d8eb674b0e2a3d Mon Sep 17 00:00:00 2001 From: Matthew Curtis Date: Thu, 25 Jul 2024 15:37:25 -0500 Subject: [PATCH 1/3] [clang-linker-wrapper] Add '--lto-in-process' to force

[clang] Add debug options to clang-linker-wrapper (PR #101008)

2024-07-29 Thread via cfe-commits
https://github.com/macurtis-amd edited https://github.com/llvm/llvm-project/pull/101008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement output parameter (PR #101083)

2024-07-29 Thread Eli Friedman via cfe-commits
@@ -4057,6 +4057,10 @@ bool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, NewQType)) return MergeCompatibleFunctionDecls(New, Old, S, MergeTypeWithOld); +if (getLangOpts().HLSL && Cont

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

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

[clang] [C] Disable use of NRVO (PR #101038)

2024-07-29 Thread John McCall via cfe-commits
rjmccall wrote: > Should we try to convince at least the GCC folks that they're getting this > wrong too? It does feel like a wider conversation is necessary, yeah. The fact that everybody is doing this even on x86_64 where it's pretty incontrovertibly forbidden seems significant. https://g

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-07-29 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik updated https://github.com/llvm/llvm-project/pull/95474 >From 69b09ea5b0f0a1c5419c488ade29b6fedc6de773 Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Thu, 13 Jun 2024 14:20:50 -0700 Subject: [PATCH 1/4] [Clang] Implement P2280R4 Using unknown pointers and refere

[clang] Add debug options to clang-linker-wrapper (PR #101008)

2024-07-29 Thread Joseph Huber via cfe-commits
@@ -781,6 +791,8 @@ bool isValidCIdentifier(StringRef S) { Error linkBitcodeFiles(SmallVectorImpl &InputFiles, SmallVectorImpl &OutputFiles, const ArgList &Args) { + if (Verbose) +llvm::errs() << "Linking bitcode files\n";

[clang] Add debug options to clang-linker-wrapper (PR #101008)

2024-07-29 Thread Joseph Huber via cfe-commits
@@ -581,8 +581,16 @@ Expected clang(ArrayRef InputFiles, const ArgList &Args) { if (SaveTemps) CmdArgs.push_back("-save-temps"); - if (SaveTemps && linkerSupportsLTO(Args)) -CmdArgs.push_back("-Wl,--save-temps"); + if (linkerSupportsLTO(Args)) { +if (SaveTemps

[clang] Add debug options to clang-linker-wrapper (PR #101008)

2024-07-29 Thread Joseph Huber via cfe-commits
@@ -581,8 +581,16 @@ Expected clang(ArrayRef InputFiles, const ArgList &Args) { if (SaveTemps) CmdArgs.push_back("-save-temps"); - if (SaveTemps && linkerSupportsLTO(Args)) -CmdArgs.push_back("-Wl,--save-temps"); + if (linkerSupportsLTO(Args)) { +if (SaveTemps

[clang] [Tooling] -fsyntax-only adjuster: remove -c and -S (PR #101103)

2024-07-29 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/101103 compile_commands.json entries often have -c. When adding -fsyntax-only, we should remove -c to prevent the following warning: ``` % clang -c -fsyntax-only a.c clang: warning: argument unused during compilation:

[clang] [Tooling] -fsyntax-only adjuster: remove -c and -S (PR #101103)

2024-07-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Fangrui Song (MaskRay) Changes compile_commands.json entries often have -c. When adding -fsyntax-only, we should remove -c to prevent the following warning: ``` % clang -c -fsyntax-only a.c clang: warning: argument unused during compilatio

[clang-tools-extra] [clang-doc] Fixes command line not appearing in html output (PR #101104)

2024-07-29 Thread via cfe-commits
https://github.com/PeterChou1 created https://github.com/llvm/llvm-project/pull/101104 Fixes https://github.com/llvm/llvm-project/issues/96819 currently the html output for clang-doc does not include block command comments this patch modifies the html generator to generate its output >From fb

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-29 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/99833 >From e0528ecc441e33822426b8b3d6522d056c95bb54 Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Fri, 21 Jun 2024 20:37:40 -0700 Subject: [PATCH 1/7] Support MSVC lvalue to temporary reference binding --- clang/do

[clang] [Clang][Sema] Remove duplicate check in if-condition (PR #101070)

2024-07-29 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. Thanks. (However I'm not an OpenMP maintainer, but since this PR is clearly an NFC change, I'd boldly approve it.) https://github.com/llvm/llvm-project/pull/101070 ___ cfe-commits mailing list cfe

[clang] [C++20][Modules] Allow using stdarg.h with header units (PR #100739)

2024-07-29 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/100739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Allow using stdarg.h with header units (PR #100739)

2024-07-29 Thread Chuanqi Xu via cfe-commits
@@ -4543,7 +4544,7 @@ ASTReader::ASTReadResult ASTReader::ReadAST(StringRef FileName, ModuleKind Type, // Mark this identifier as being from an AST file so that we can track // whether we need to serialize it. - markIdentifierFromAST(*this, *II); + markI

[clang] [C++20][Modules] Allow using stdarg.h with header units (PR #100739)

2024-07-29 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/100739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Remove duplicate check in if-condition (PR #101070)

2024-07-29 Thread Younan Zhang via cfe-commits
zyn0217 wrote: (I presume you don't have commit access, so I'll help you merge it. Next time, please add an "NFC" term to the commit title if the PR doesn't contain any functional changes.) https://github.com/llvm/llvm-project/pull/101070 ___ cfe-com

[clang] c9cc6c4 - [Clang][Sema][NFC] Remove duplicate check in if-condition (#101070)

2024-07-29 Thread via cfe-commits
Author: Jannick Kremer Date: 2024-07-30T10:02:15+08:00 New Revision: c9cc6c4772df6fc6f30d1e6831b83fe4db5f2044 URL: https://github.com/llvm/llvm-project/commit/c9cc6c4772df6fc6f30d1e6831b83fe4db5f2044 DIFF: https://github.com/llvm/llvm-project/commit/c9cc6c4772df6fc6f30d1e6831b83fe4db5f2044.diff

[clang] [Clang][Sema] Remove duplicate check in if-condition (PR #101070)

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

<    1   2   3   4   5   >