[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
MaxEW707 wrote: > The scenario I am thinking about is when the user passed -fms-extensions and > no other individual flags. I think that mode should enable all of the > Microsoft extensions. Then users can opt out of whatever extensions they > don't want to enable. But I think it's confusing i

[clang] [Clang][Interp] Fix the location of uninitialized base warning (PR #100761)

2024-07-29 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/100761 >From eb237d1b6434c16366f8095f47af1456cb776a27 Mon Sep 17 00:00:00 2001 From: yronglin Date: Fri, 26 Jul 2024 23:09:42 +0800 Subject: [PATCH 1/4] [Clang][Interp] Fix the location of uninitialized base warning

[clang] [clang][ExprConst] allow single element access of vector object to be constant expression (PR #101126)

2024-07-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vikram Hegde (vikramRH) Changes This is a slightly updated version of https://github.com/llvm/llvm-project/pull/72607 (I could not find a way to continue with the same PR, hopefully this is not very confusing). @sethp , I have tried addre

[clang] [clang][ExprConst] allow single element access of vector object to be constant expression (PR #101126)

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

[clang] [clang][ExprConst] allow single element access of vector object to be constant expression (PR #101126)

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

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

2024-07-29 Thread Nathan James via cfe-commits
njames93 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; > ``` There is no way to handle that and you shouldn't try. Best you could do is just emit a

[clang] [clang][ExprConst] allow single element access of vector object to be constant expression (PR #101126)

2024-07-29 Thread Vikram Hegde via cfe-commits
vikramRH wrote: * **#101126** https://app.graphite.dev/github/pr/llvm/llvm-project/101126?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 * `main` This stack of pull requests is managed by Grap

[clang] [clang][ExprConst] allow single element access of vector object to be constant expression (PR #101126)

2024-07-29 Thread Vikram Hegde via cfe-commits
https://github.com/vikramRH created https://github.com/llvm/llvm-project/pull/101126 None >From 690901f2370381285afa7cf7c2f7401d89e568f6 Mon Sep 17 00:00:00 2001 From: Vikram Date: Mon, 29 Jul 2024 08:56:07 -0400 Subject: [PATCH] [clang][ExprConst] allow single element access of vector object

[clang] [clang codegen] Emit int TBAA metadata on more FP math libcalls (PR #100302)

2024-07-29 Thread via cfe-commits
https://github.com/vfdff updated https://github.com/llvm/llvm-project/pull/100302 >From c750234674531788ee26958954a5f9a6b59ea866 Mon Sep 17 00:00:00 2001 From: zhongyunde 00443407 Date: Tue, 23 Jul 2024 23:10:42 -0400 Subject: [PATCH 1/5] [clang codegen] Emit int TBAA metadata on more FP math

[clang] [docs][msan] List common cases reported by msan (PR #101105)

2024-07-29 Thread Thurston Dang via cfe-commits
@@ -8,11 +8,18 @@ MemorySanitizer Introduction -MemorySanitizer is a detector of uninitialized reads. It consists of a +MemorySanitizer is a detector of uninitialized memory use. It consists of a compiler instrumentation module and a run-time library. Typical

[clang] [docs][msan] List common cases reported by msan (PR #101105)

2024-07-29 Thread Thurston Dang via cfe-commits
@@ -8,11 +8,18 @@ MemorySanitizer Introduction -MemorySanitizer is a detector of uninitialized reads. It consists of a +MemorySanitizer is a detector of uninitialized memory use. It consists of a compiler instrumentation module and a run-time library. Typical

[clang] [docs][msan] List common cases reported by msan (PR #101105)

2024-07-29 Thread Thurston Dang via cfe-commits
@@ -8,11 +8,18 @@ MemorySanitizer Introduction -MemorySanitizer is a detector of uninitialized reads. It consists of a +MemorySanitizer is a detector of uninitialized memory use. It consists of a compiler instrumentation module and a run-time library. Typical

[clang] [docs][msan] List common cases reported by msan (PR #101105)

2024-07-29 Thread Thurston Dang via cfe-commits
https://github.com/thurstond approved this pull request. https://github.com/llvm/llvm-project/pull/101105 ___ 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 Hubert Tong via cfe-commits
@@ -0,0 +1,108 @@ +// RUN: %clang_cc1 -DWIN -verify=nan-not-constant -std=c++23 -fsyntax-only %s +// RUN: %clang_cc1 -verify -std=c++23 -fsyntax-only %s +// RUN: %clang_cc1 -verify=cplusplus20andless -std=c++20 -fsyntax-only %s + +// expected-no-diagnostics + + +#ifdef WIN +#de

[clang] [lld] [llvm] [LTO] enable `ObjCARCContractPass` only on optimized build (PR #101114)

2024-07-29 Thread Nuri Amari via cfe-commits
@@ -588,12 +588,6 @@ bool EmitAssemblyHelper::AddEmitPasses(legacy::PassManager &CodeGenPasses, // this also adds codegenerator level optimization passes. CodeGenFileType CGFT = getCodeGenFileType(Action); - // Add ObjC ARC final-cleanup optimizations. This is done as pa

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

2024-07-29 Thread Hubert Tong via cfe-commits
@@ -0,0 +1,106 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 4 + +// RUN: %clang_cc1 -x c++ -triple x86_64-unknown-unknown -std=c++23 \ +// RUN: -emit-llvm -o - %s | FileCheck %s + +#define NAN (__builtin_nanf("")) +#define

[clang] [X86_32][C++] fix 0 sized struct case in vaarg. (PR #86388)

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

[clang] [X86_32][C++] fix 0 sized struct case in vaarg. (PR #86388)

2024-07-29 Thread Longsheng Mou via cfe-commits
https://github.com/CoTinker updated https://github.com/llvm/llvm-project/pull/86388 >From 54f75d7068d0acf336d6d1e61bcf800ff52cc310 Mon Sep 17 00:00:00 2001 From: Longsheng Mou Date: Sat, 23 Mar 2024 17:53:58 +0800 Subject: [PATCH] [X86_32] fix 0 sized struct case in vaarg. struct SuperEmpty {

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

2024-07-29 Thread Hubert Tong via cfe-commits
@@ -253,8 +253,10 @@ def FmodF16F128 : F16F128MathTemplate, Builtin { def FrexpF16F128 : F16F128MathTemplate, Builtin { let Spellings = ["__builtin_frexp"]; - let Attributes = [FunctionWithBuiltinPrefix, NoThrow]; + let Attributes = [FunctionWithBuiltinPrefix, NoThrow, Con

[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

[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
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] [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] [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 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] [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] [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-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] [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] [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] 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] 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] [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] [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-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] [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] 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] 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] [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] [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] [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] [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] [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] [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] [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] [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-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] [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] [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
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] [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 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-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 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] [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 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] [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 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] [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] [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] [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] [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] [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] [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] 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] [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] [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] 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] [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] [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] [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-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] [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] [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
@@ -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

[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] [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 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] 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

[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-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-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-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] [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

[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

[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

[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

[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] [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] [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][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] [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] [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] [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

[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

[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

[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

[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] [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 (__

  1   2   3   4   5   >