[clang] Fix codegen for transparent_union function params (PR #104816)

2024-09-05 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/104816 >From 5ceb717b6f9ce11a12fde4aa9aaa89b4e017ef70 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Mon, 19 Aug 2024 12:24:31 -0400 Subject: [PATCH 1/3] Fix codegen for transparent_union function params Update codegen

[clang] Fix codegen for transparent_union function params (PR #104816)

2024-09-05 Thread Lei Huang via cfe-commits
lei137 wrote: > s-barannikov done. https://github.com/llvm/llvm-project/pull/104816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix codegen for transparent_union function params (PR #104816)

2024-09-05 Thread Lei Huang via cfe-commits
lei137 wrote: > May it make sense to add tests with the argument passed in memory / by > reference? @s-barannikov Done. https://github.com/llvm/llvm-project/pull/104816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [clang][rtsan] Add realtime_sanitizer to Features.def (PR #106650)

2024-09-05 Thread Chris Apple via cfe-commits
cjappl wrote: Weekly ping of reviewers - also added a couple more folks if they have time to take a look. Current state: no reviews https://github.com/llvm/llvm-project/pull/106650 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [clang][rtsan] Add realtime_sanitizer to Features.def (PR #106650)

2024-09-05 Thread Chris Apple via cfe-commits
cjappl wrote: Oh, also cc @davidtrevelyan https://github.com/llvm/llvm-project/pull/106650 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][rtsan] Add realtime_sanitizer to Features.def (PR #106650)

2024-09-05 Thread Chris Apple via cfe-commits
https://github.com/cjappl edited https://github.com/llvm/llvm-project/pull/106650 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-05 Thread Зишан Мирза via cfe-commits
https://github.com/zimirza updated https://github.com/llvm/llvm-project/pull/107285 From b982621407a1ab1746a023809aae5c6a2b983679 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=97=D0=B8=D1=88=D0=B0=D0=BD=20=D0=9C=D0=B8=D1=80=D0=B7?= =?UTF-8?q?=D0=B0?= <149377404+zimi...@users.noreply.github.com>

[clang] [clang] Fix FnInfoOpts::operator&= and FnInfoOpts::operator|= not updating assigned operands (PR #107050)

2024-09-05 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM... but in the future, please try to make the commit message indicate what effects this has. (I'll rewrite it this time.) https://github.com/llvm/llvm-project/pull/107050 ___ cfe-commit

[clang] 9de972e - [clang] Fix FnInfoOpts::operator&= and FnInfoOpts::operator|= not updating assigned operands (#107050)

2024-09-05 Thread via cfe-commits
Author: Ming-Yi Lai Date: 2024-09-05T12:35:12-07:00 New Revision: 9de972e3e1ecea506a3884bd2fc47570ce83e4df URL: https://github.com/llvm/llvm-project/commit/9de972e3e1ecea506a3884bd2fc47570ce83e4df DIFF: https://github.com/llvm/llvm-project/commit/9de972e3e1ecea506a3884bd2fc47570ce83e4df.diff L

[clang] [clang] Fix FnInfoOpts::operator&= and FnInfoOpts::operator|= not updating assigned operands (PR #107050)

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

[clang] [clang] Fix FnInfoOpts::operator&= and FnInfoOpts::operator|= not updating assigned operands (PR #107050)

2024-09-05 Thread via cfe-commits
github-actions[bot] wrote: @mylai-mtk Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a buil

[clang] Reapply "[Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros" (PR #102135)

2024-09-05 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/102135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros" (PR #102135)

2024-09-05 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Minor comments, I agree with @cor3ntin that you should split this into two PRs. It will be much better to review in smaller form. https://github.com/llvm/llvm-project/pull/102135 ___ cfe-commits mailing list cfe-co

[clang] Reapply "[Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros" (PR #102135)

2024-09-05 Thread Shafik Yaghmour via cfe-commits
@@ -4558,6 +4574,12 @@ bool Lexer::LexDependencyDirectiveToken(Token &Result) { Result.setRawIdentifierData(TokPtr); if (!isLexingRawMode()) { const IdentifierInfo *II = PP->LookUpIdentifierInfo(Result); + if (Result.isModuleContextualKeyword()) { +//

[clang] Reapply "[Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros" (PR #102135)

2024-09-05 Thread Shafik Yaghmour via cfe-commits
@@ -652,14 +647,14 @@ bool Parser::ParseTopLevelDecl(DeclGroupPtrTy &Result, // Recognize context-sensitive C++20 'export module' and 'export import' // declarations. case tok::identifier: { - IdentifierInfo *II = NextToken().getIdentifierInfo(); - if ((II

[clang] 53d5ffe - [clang] Check inline defs when emitting speculative vtable (#100785)

2024-09-05 Thread via cfe-commits
Author: Fabian Parzefall Date: 2024-09-05T12:39:39-07:00 New Revision: 53d5ffea6be7216589599b6415c021f8bd13cd37 URL: https://github.com/llvm/llvm-project/commit/53d5ffea6be7216589599b6415c021f8bd13cd37 DIFF: https://github.com/llvm/llvm-project/commit/53d5ffea6be7216589599b6415c021f8bd13cd37.di

[clang] [clang] Check inline defs when emitting speculative vtable (PR #100785)

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

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-05 Thread Sarah Spall via cfe-commits
@@ -0,0 +1,45 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \ +// RUN: -o - | FileCheck %s --check-prefixes=CHECK + +// CHECK: %hlsl.select = select i1 +// CHECK: ret i32 %hlsl.selec

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-05 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,45 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ farzonl wrote: This might be a DXism that doesn't apply going forward with upstream, but select is an HLSL 2021 and above feature. It doesn't seem like we have the proper gating if

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-05 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/107129 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-09-05 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/104856 >From 44e814b925a1ad8ac40fe6904542cbade516c065 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Mon, 19 Aug 2024 13:34:13 -0700 Subject: [PATCH 1/4] [DirectX] Add DirectXTargetCodeGenInfo Adds TargetCodeGenInfo

[clang] [flang] [flang][Driver] Support --no-warnings option (PR #107455)

2024-09-05 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu created https://github.com/llvm/llvm-project/pull/107455 Because of the way visibility is implemented in Options.td, options that are aliases do not inherit the visibility of the option being aliased. Therefore, explicitly set the visibility of the alias to be th

[clang] [llvm] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-09-05 Thread Helena Kotas via cfe-commits
hekota wrote: > It would be good to have some test coverage to go along with this. Test added. https://github.com/llvm/llvm-project/pull/104856 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [flang] [flang][Driver] Support --no-warnings option (PR #107455)

2024-09-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tarun Prabhu (tarunprabhu) Changes Because of the way visibility is implemented in Options.td, options that are aliases do not inherit the visibility of the option being aliased. Therefore, explicitly set the visibility of the alias to be

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-05 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,129 @@ +// RUN: %clang_cc1 -finclude-default-header +// -triple dxil-pc-shadermodel6.6-library %s -emit-llvm-only +// -disable-llvm-passes -verify -verify-ignore-unexpected + +int test_no_arg() { + return select(); + // expected-error@-1 {{no matching function for cal

[clang] [llvm] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-09-05 Thread Helena Kotas via cfe-commits
hekota wrote: > We should be able to test this by defining a global or calling a function > with the `__hlsl_resource_t` type. Test added. https://github.com/llvm/llvm-project/pull/104856 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [clang-tools-extra] [NFC] Add explicit #include llvm-config.h where its macros are used, clang part. (PR #107301)

2024-09-05 Thread Nikita Popov via cfe-commits
@@ -15,6 +15,7 @@ #include "clang/Driver/InputInfo.h" #include "clang/Driver/Options.h" #include "clang/Driver/SanitizerArgs.h" +#include "llvm/Config/llvm-config.h" // for LLVM_HOST_TRIPLE nikic wrote: Possibly we should not have the include for cases like th

[clang] [clang-tools-extra] [NFC] Add explicit #include llvm-config.h where its macros are used, clang part. (PR #107301)

2024-09-05 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/107301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Support --no-warnings option (PR #107455)

2024-09-05 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu updated https://github.com/llvm/llvm-project/pull/107455 >From 984032c16fd7ebadf06737973ad3a165b689cc3c Mon Sep 17 00:00:00 2001 From: Tarun Prabhu Date: Thu, 5 Sep 2024 13:34:51 -0600 Subject: [PATCH] [flang][Driver] Support --no-warnings option Because of the w

[clang] [llvm] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-09-05 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,53 @@ +//===- DirectX.cpp-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-05 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,129 @@ +// RUN: %clang_cc1 -finclude-default-header +// -triple dxil-pc-shadermodel6.6-library %s -emit-llvm-only +// -disable-llvm-passes -verify -verify-ignore-unexpected + +int test_no_arg() { + return select(); + // expected-error@-1 {{no matching function for cal

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-05 Thread Farzon Lotfi via cfe-commits
@@ -1512,6 +1512,83 @@ void SetElementTypeAsReturnType(Sema *S, CallExpr *TheCall, TheCall->setType(ReturnType); } +static bool CheckScalarOrVector(Sema *S, CallExpr *TheCall, QualType Scalar, + unsigned ArgIndex) { + assert(TheCall->getNumArg

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-05 Thread Farzon Lotfi via cfe-commits
@@ -1512,6 +1512,83 @@ void SetElementTypeAsReturnType(Sema *S, CallExpr *TheCall, TheCall->setType(ReturnType); } +static bool CheckScalarOrVector(Sema *S, CallExpr *TheCall, QualType Scalar, + unsigned ArgIndex) { + assert(TheCall->getNumArg

[clang] [llvm] [CodeView] Flatten cmd args in frontend for LF_BUILDINFO (PR #106369)

2024-09-05 Thread via cfe-commits
@@ -322,6 +323,46 @@ static bool actionRequiresCodeGen(BackendAction Action) { Action != Backend_EmitLL; } +static std::string flattenClangCommandLine(ArrayRef Args, + StringRef MainFilename) { + if (Args.empty()) + { ---

[clang] [HIP][Clang][CodeGen] Handle hip bin symbols properly. (PR #107458)

2024-09-05 Thread via cfe-commits
https://github.com/jofrn created https://github.com/llvm/llvm-project/pull/107458 Remove '_' in fatbin symbol suffix when missing TU hash ID. Internalize gpubin symbol so that it is not unresolved at link-time. >From 99c7e926632b9ca52c18689fdab3a3358de5a3b6 Mon Sep 17 00:00:00 2001 From: jofer

[clang] [HIP][Clang][CodeGen] Handle hip bin symbols properly. (PR #107458)

2024-09-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (jofrn) Changes Remove '_' in fatbin symbol suffix when missing TU hash ID. Internalize gpubin symbol so that it is not unresolved at link-time. --- Full diff: https://github.com/llvm/llvm-project/pull/107458.diff 1 Files Affected:

[clang] [HIP][Clang][CodeGen] Handle hip bin symbols properly. (PR #107458)

2024-09-05 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 b798f4bd50bbf0f5eb46804afad10629797c73aa 99c7e926632b9ca52c18689fdab3a3358de5a3b6 --e

[clang] [HIP][Clang][CodeGen] Handle hip bin symbols properly. (PR #107458)

2024-09-05 Thread via cfe-commits
https://github.com/jofrn updated https://github.com/llvm/llvm-project/pull/107458 >From 99c7e926632b9ca52c18689fdab3a3358de5a3b6 Mon Sep 17 00:00:00 2001 From: jofernau Date: Thu, 5 Sep 2024 16:05:21 -0400 Subject: [PATCH 1/2] [HIP][Clang][CodeGen] Handle hip bin symbols properly. Remove '_' i

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-05 Thread Helena Kotas via cfe-commits
@@ -556,46 +562,120 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } -void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) { - if (!AL.isArgIdent(0)) { -Diag(AL.getLoc(), diag::err_attribute_argument_type) -

[clang] [flang] [flang][Driver] Support -Qunused-arguments (PR #107462)

2024-09-05 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu created https://github.com/llvm/llvm-project/pull/107462 This partially addresses: https://github.com/llvm/llvm-project/issues/89888 >From 302ee0694f6e2528076a4e2a98ca37213e78efae Mon Sep 17 00:00:00 2001 From: Tarun Prabhu Date: Thu, 5 Sep 2024 14:33:50 -0600 Su

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-09-05 Thread Matheus Izvekov via cfe-commits
@@ -9219,7 +9222,8 @@ class Sema final : public SemaBase { /// \returns true if an error occurred, false otherwise. bool CheckTemplateArgumentList( TemplateDecl *Template, SourceLocation TemplateLoc, - TemplateArgumentListInfo &TemplateArgs, bool PartialTemplateA

[clang] [flang] [flang][Driver] Support -Qunused-arguments (PR #107462)

2024-09-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver @llvm/pr-subscribers-clang Author: Tarun Prabhu (tarunprabhu) Changes This partially addresses: https://github.com/llvm/llvm-project/issues/89888 --- Full diff: https://github.com/llvm/llvm-project/pull/107462.diff 2 Files Affected: - (m

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-09-05 Thread Matheus Izvekov via cfe-commits
@@ -412,6 +445,30 @@ class SubstTemplateTemplateParmStorage std::optional PackIndex); }; +class DeducedTemplateStorage : public UncommonTemplateNameStorage, mizvekov wrote: This one is a too internal detail of how the different kinds of

[clang] [clang][CodeGen] Zero init unspecified fields in initializers in C (PR #97121)

2024-09-05 Thread via cfe-commits
yabinc wrote: @rjmccall and @efriedma-quic, ping for review? https://github.com/llvm/llvm-project/pull/97121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Support -Qunused-arguments (PR #107462)

2024-09-05 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LG. https://github.com/llvm/llvm-project/pull/107462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-09-05 Thread Matheus Izvekov via cfe-commits
@@ -645,6 +645,9 @@ static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, // It is sufficient to check value of getAsTemplateDecl. break; + case TemplateName::DeducedTemplate: + // FIXME: We can't reach here. + llvm_unreachable("unimp

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-09-05 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: > > That might not be enough. A function might not be used (or even referenced) > > in the TU that defines it, but only in other TUs. But it would certainly > > catch a number of issues already. > > Right, though catching that ends up being pretty impossible. The most you

[clang-tools-extra] [clang-tidy] fix misc-unconventional-assign-operator false positive for deducing this (PR #107409)

2024-09-05 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/107409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] fix misc-unconventional-assign-operator false positive for deducing this (PR #107409)

2024-09-05 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. LGTM, just a small documentation nit https://github.com/llvm/llvm-project/pull/107409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang-tools-extra] [clang-tidy] fix misc-unconventional-assign-operator false positive for deducing this (PR #107409)

2024-09-05 Thread Julian Schmidt via cfe-commits
@@ -112,6 +112,10 @@ Changes in existing checks ` check to support replacing member function calls too. +- Improved :doc:`misc-unconventional-assign-operator + ` check to avoid + false positive for c++23 deducing this. 5chmidti wrote: `C++23` https://g

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-09-05 Thread Matheus Izvekov via cfe-commits
@@ -1371,11 +1371,17 @@ class TemplateDiff { /// argument info into a tree. void DiffTemplate(const TemplateSpecializationType *FromTST, const TemplateSpecializationType *ToTST) { +// FIXME: With P3310R0, A TST formed from a DeducedTemplateName might

[clang] [compiler-rt] [libcxx] [cmake] Add hexagon-linux cmake cache files (PR #98712)

2024-09-05 Thread Brian Cain via cfe-commits
@@ -0,0 +1,25 @@ + +set(LLVM_DEFAULT_TARGET_TRIPLE hexagon-unknown-linux-musl CACHE STRING "") +set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR OFF CACHE BOOL "") +set(LLVM_ENABLE_RUNTIMES libcxx;libcxxabi;libunwind;compiler-rt CACHE STRING "") +set(LIBCXX_INCLUDE_BENCHMARKS OFF CACHE BOO

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

2024-09-05 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: ping @hubert-reinterpretcast https://github.com/llvm/llvm-project/pull/88978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-09-05 Thread Matheus Izvekov via cfe-commits
@@ -326,6 +320,48 @@ namespace classes { // expected-error@-1 {{no matching function for call}} } } // namespace packs + namespace nested { mizvekov wrote: The test case from 100692 doesn't have anything interesting new on top of this one. There

[clang] [flang] [mlir] [clang][flang][mlir] Support -frecord-command-line option (PR #102975)

2024-09-05 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu updated https://github.com/llvm/llvm-project/pull/102975 >From 6df2f16e9b875f598cb00738b6fb9e8a2d7fe448 Mon Sep 17 00:00:00 2001 From: Tarun Prabhu Date: Mon, 12 Aug 2024 14:32:08 -0600 Subject: [PATCH] [clang][flang][mlir] Support -frecord-command-line option Ad

[clang] [HIP][Clang][CodeGen] Handle hip bin symbols properly. (PR #107458)

2024-09-05 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: The current behavior of clang is expected. when gpu binary is not specified, it is expected to be used for -fgpu-rdc and the __hip_gpubin_handle_ symbol needs to be external and unique since they may need to be merged for partial linking. Make them internal will break partial

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-09-05 Thread Matheus Izvekov via cfe-commits
@@ -139,28 +165,63 @@ TemplateName::NameKind TemplateName::getKind() const { return AssumedTemplate; if (uncommon->getAsSubstTemplateTemplateParm()) return SubstTemplateTemplateParm; + if (uncommon->getAsDeducedTemplateName()) +return DeducedTemplate; + + assert

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-05 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/107129 >From 3e0cd3c450eb4aa28742c4879733987e9e2692e7 Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Wed, 28 Aug 2024 01:44:35 + Subject: [PATCH 1/7] implement select intrinsic --- clang/include/clang/Basic/Built

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-09-05 Thread Matheus Izvekov via cfe-commits
@@ -1198,6 +1198,18 @@ void TextNodeDumper::dumpBareTemplateName(TemplateName TN) { dumpTemplateName(STS->getReplacement(), "replacement"); return; } + case TemplateName::DeducedTemplate: { +OS << " deduced"; +const DeducedTemplateStorage *DTS = TN.getAsDedu

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-09-05 Thread Matheus Izvekov via cfe-commits
@@ -5327,9 +5332,29 @@ bool Sema::CheckTemplateArgumentList( SmallVector CanonicalArgumentPack; unsigned ArgIdx = 0, NumArgs = NewArgs.size(); LocalInstantiationScope InstScope(*this, true); - for (TemplateParameterList::iterator Param = Params->begin(), -

[clang] [clang-format] Add new option: WrapNamespaceBodyWithNewlines (PR #106145)

2024-09-05 Thread via cfe-commits
@@ -28104,6 +28104,211 @@ TEST_F(FormatTest, BreakBinaryOperations) { Style); } +TEST_F(FormatTest, WrapNamespaceBodyWithEmptyLinesNever) { + FormatStyle Style = getLLVMStyle(); + Style.FixNamespaceComments = false; + Style.ShortNamespaceLines = 0; + Style.M

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-05 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,129 @@ +// RUN: %clang_cc1 -finclude-default-header +// -triple dxil-pc-shadermodel6.6-library %s -emit-llvm-only +// -disable-llvm-passes -verify -verify-ignore-unexpected + +int test_no_arg() { + return select(); + // expected-error@-1 {{no matching function for cal

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #97308)

2024-09-05 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: I think I need a second run through https://github.com/llvm/llvm-project/pull/97308 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #97308)

2024-09-05 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/97308 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #97308)

2024-09-05 Thread Shafik Yaghmour via cfe-commits
@@ -5578,19 +5579,35 @@ ExprResult Sema::BuildCXXDefaultInitExpr(SourceLocation Loc, FieldDecl *Field) { ImmediateCallVisitor V(getASTContext()); if (!NestedDefaultChecking) V.TraverseDecl(Field); - if (V.HasImmediateCalls) { + + // CWG1815 + // Support lifetime ext

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #97308)

2024-09-05 Thread Shafik Yaghmour via cfe-commits
shafik wrote: I am not sure I see all the examples from: https://cplusplus.github.io/CWG/issues/1696.html https://github.com/llvm/llvm-project/pull/97308 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #97308)

2024-09-05 Thread Shafik Yaghmour via cfe-commits
@@ -6298,6 +6298,15 @@ class Sema final : public SemaBase { using ImmediateInvocationCandidate = llvm::PointerIntPair; + enum class LifetimeExtendingContext { +None, // Not in a lifetime extending context. +FlagOnly, // A flag indicating whether we are in l

[clang] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-05 Thread Michael Jones via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0J

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-05 Thread Sarah Spall via cfe-commits
@@ -1512,6 +1512,83 @@ void SetElementTypeAsReturnType(Sema *S, CallExpr *TheCall, TheCall->setType(ReturnType); } +static bool CheckScalarOrVector(Sema *S, CallExpr *TheCall, QualType Scalar, + unsigned ArgIndex) { + assert(TheCall->getNumArg

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-05 Thread Sarah Spall via cfe-commits
@@ -0,0 +1,45 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ spall wrote: How do I fix this? https://github.com/llvm/llvm-project/pull/107129 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-09-05 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,53 @@ +//===- DirectX.cpp-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] 24684bb - [sanitizer] Delay sanitizer args parsing (#107280)

2024-09-05 Thread via cfe-commits
Author: Evgenii Stepanov Date: 2024-09-05T14:09:33-07:00 New Revision: 24684bb4a9791145a36a97477eb1fd525a122d8e URL: https://github.com/llvm/llvm-project/commit/24684bb4a9791145a36a97477eb1fd525a122d8e DIFF: https://github.com/llvm/llvm-project/commit/24684bb4a9791145a36a97477eb1fd525a122d8e.di

[clang] Delay sanitizer args parsing. (PR #107280)

2024-09-05 Thread Evgenii Stepanov via cfe-commits
https://github.com/eugenis closed https://github.com/llvm/llvm-project/pull/107280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-09-05 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,53 @@ +//===- DirectX.cpp-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-05 Thread Farzon Lotfi via cfe-commits
@@ -387,6 +387,23 @@ float3 asin(float3); _HLSL_BUILTIN_ALIAS(__builtin_elementwise_asin) float4 asin(float4); +//===--===// +// asuint builtins +//===--

[clang] [llvm] [mlir] [TableGen] Add const variants of accessors for backend (PR #106658)

2024-09-05 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/106658 >From 4e1d789d052c9ae7d0fc3be73307f9d77bc5fa9f Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Thu, 29 Aug 2024 20:36:05 -0700 Subject: [PATCH] [TableGen] Add const variants of accessors for backend Split Reco

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-05 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,114 @@ +// RUN: %clang_cc1 -x hlsl -triple dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes -o - | FileCheck %s --check-prefixes=CHECK,NOINLINE +// RUN: %clang_cc1 -x hlsl -triple dxil-pc-shadermodel6.3-library %s -emit-llvm -O0 -o - | FileCheck %s

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-05 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,74 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -std=hlsl202x -emit-llvm -o - -disable-llvm-passes %s | FileCheck %s --check-prefixes=CHECK,NOINLINE +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -std=hlsl202x -emit-llvm -o - -disable-llv

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-05 Thread Damyan Pepper via cfe-commits
@@ -2474,7 +2474,9 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, // If we don't have a declaration to control inlining, the function isn't // explicitly marked as alwaysinline for semantic reasons, and inlining is // disabled, mark th

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-05 Thread Damyan Pepper via cfe-commits
@@ -1239,9 +1239,9 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy, if (getLangOpts().OpenMP && CurCodeDecl) CGM.getOpenMPRuntime().emitFunctionProlog(*this, CurCodeDecl); - if (FD && getLangOpts().HLSL) { + if (getLangOpts().HLSL) { // Handl

[clang] [llvm] [mlir] [TableGen] Add const variants of accessors for backend (PR #106658)

2024-09-05 Thread Rahul Joshi via cfe-commits
jurahul wrote: I posted the PSA at: https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089 https://github.com/llvm/llvm-project/pull/106658 ___ cfe-commits mailing list cfe-commit

[clang] [flang] [flang][Driver] Support -Xlinker in flang (PR #107472)

2024-09-05 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu edited https://github.com/llvm/llvm-project/pull/107472 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Support -Xlinker in flang (PR #107472)

2024-09-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver @llvm/pr-subscribers-clang Author: Tarun Prabhu (tarunprabhu) Changes Partially addresses: https://github.com/llvm/llvm-project/issues/89888 --- Full diff: https://github.com/llvm/llvm-project/pull/107472.diff 2 Files Affected: - (modifi

[clang] [HIP][Clang][CodeGen] Handle hip bin symbols properly. (PR #107458)

2024-09-05 Thread Yaxun Liu via cfe-commits
@@ -840,8 +840,10 @@ llvm::Function *CGNVCUDARuntime::makeModuleCtorFunction() { FatBinStr = new llvm::GlobalVariable( CGM.getModule(), CGM.Int8Ty, /*isConstant=*/true, llvm::GlobalValue::ExternalLinkage, nullptr, - "__hip_fatbin_" + CGM.getCo

[clang] [llvm] [NFCI]Clean up synthetic count (PR #107471)

2024-09-05 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 updated https://github.com/llvm/llvm-project/pull/107471 >From a18e042a0d03321d3ffca9ede92e976343a1b4c7 Mon Sep 17 00:00:00 2001 From: mingmingl Date: Thu, 5 Sep 2024 14:36:28 -0700 Subject: [PATCH 1/2] [NFCI]Clean up synthetic count --- clang/docs/tools/clang-f

[clang] [clang][scan] Report module dependencies in topological order (PR #107474)

2024-09-05 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/107474 Clients of the dependency scanner may benefit from being able to process modular dependencies in topological order. The scanner already processes dependencies in this order, so it makes sense to make it ea

[clang] [clang][scan] Report module dependencies in topological order (PR #107474)

2024-09-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes Clients of the dependency scanner may benefit from being able to process modular dependencies in topological order. The scanner already processes dependencies in this order, so it makes sense to make it

[clang] [llvm] [NFCI]Clean up synthetic count pass (PR #107471)

2024-09-05 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/107471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-05 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/107160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-05 Thread Justin Bogner via cfe-commits
@@ -556,46 +562,120 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } -void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) { - if (!AL.isArgIdent(0)) { -Diag(AL.getLoc(), diag::err_attribute_argument_type) -

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-05 Thread Justin Bogner via cfe-commits
@@ -559,46 +563,123 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } -void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) { - if (!AL.isArgIdent(0)) { -Diag(AL.getLoc(), diag::err_attribute_argument_type) -

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-05 Thread Justin Bogner via cfe-commits
@@ -559,46 +563,123 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } -void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) { - if (!AL.isArgIdent(0)) { -Diag(AL.getLoc(), diag::err_attribute_argument_type) -

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-05 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. A couple more very minor comments then this LGTM! https://github.com/llvm/llvm-project/pull/107160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [llvm] [NFCI]Clean up synthetic count pass (PR #107471)

2024-09-05 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/107471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] bd840a4 - [AMDGPU] Add target intrinsic for s_prefetch_data (#107133)

2024-09-05 Thread via cfe-commits
Author: Stanislav Mekhanoshin Date: 2024-09-05T15:14:31-07:00 New Revision: bd840a40042c2c67f56079493d0bcdbfc70325ba URL: https://github.com/llvm/llvm-project/commit/bd840a40042c2c67f56079493d0bcdbfc70325ba DIFF: https://github.com/llvm/llvm-project/commit/bd840a40042c2c67f56079493d0bcdbfc70325

[clang] [llvm] [AMDGPU] Add target intrinsic for s_prefetch_data (PR #107133)

2024-09-05 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec closed https://github.com/llvm/llvm-project/pull/107133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CodeView] Flatten cmd args in frontend for LF_BUILDINFO (PR #106369)

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

[clang] [llvm] [CodeView] Flatten cmd args in frontend for LF_BUILDINFO (PR #106369)

2024-09-05 Thread Saleem Abdulrasool via cfe-commits
@@ -484,8 +519,10 @@ static bool initTargetOptions(DiagnosticsEngine &Diags, Entry.Group == frontend::IncludeDirGroup::System)) Options.MCOptions.IASSearchPaths.push_back( Entry.IgnoreSysRoot ? Entry.Path : HSOpts.Sysroot + Entry.Path); - Options.MCOpt

[clang] [llvm] [CodeView] Flatten cmd args in frontend for LF_BUILDINFO (PR #106369)

2024-09-05 Thread Saleem Abdulrasool via cfe-commits
compnerd wrote: Please also get a sign off from @aganea https://github.com/llvm/llvm-project/pull/106369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA/HIP] propagate -cuid to a host-only compilation. (PR #107483)

2024-09-05 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B created https://github.com/llvm/llvm-project/pull/107483 Right now we're bailing out too early, and `-cuid` does not get set for the host-only compilations. >From 52a27293d1c93a7ed4dcef845f705808afa3c273 Mon Sep 17 00:00:00 2001 From: Artem Belevich Date: Thu, 5 Se

<    1   2   3   4   5   >