[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-13 Thread via cfe-commits
https://github.com/akshaykumars614 created https://github.com/llvm/llvm-project/pull/81670 (bad error message on incorrect string literal) Fixed the error message for incorrect string literal before: test.cpp:1:19: error: invalid character ' ' character in raw string delimiter; use PREFIX( )P

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-13 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (akshaykumars614) Changes (bad error message on incorrect string literal) Fixed the error message for incorrect string literal before: test.cpp:1:19: error: invalid character ' ' character in raw string delimiter; use PREFIX( )PREFI

[clang] [llvm] [clang] Add fixed point precision macros (PR #81207)

2024-02-13 Thread via cfe-commits
https://github.com/PiJoules updated https://github.com/llvm/llvm-project/pull/81207 >From 3696de68d417e6aaec50ef3b01332420effd2ac2 Mon Sep 17 00:00:00 2001 From: Leonard Chan Date: Thu, 8 Feb 2024 16:12:35 -0800 Subject: [PATCH] [clang] Add fixed point precision macros This defines the builtin

[clang] [clang][InstallAPI] Introduce basic driver to write out tbd files (PR #81571)

2024-02-13 Thread Juergen Ributzka via cfe-commits
https://github.com/ributzka commented: It is great to finally see this come together :D Thank you Cyndy https://github.com/llvm/llvm-project/pull/81571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [clang][InstallAPI] Introduce basic driver to write out tbd files (PR #81571)

2024-02-13 Thread Juergen Ributzka via cfe-commits
@@ -0,0 +1,65 @@ +//===- InstallAPI/Context.h -*- C++ -*-===// +// +// 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] [clang][InstallAPI] Introduce basic driver to write out tbd files (PR #81571)

2024-02-13 Thread Juergen Ributzka via cfe-commits
https://github.com/ributzka edited https://github.com/llvm/llvm-project/pull/81571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][InstallAPI] Introduce basic driver to write out tbd files (PR #81571)

2024-02-13 Thread Juergen Ributzka via cfe-commits
@@ -45,6 +45,7 @@ ".rs", ".ifs", ".rc", +".tbd", ributzka wrote: This doesn't seem to be used by the current tests. https://github.com/llvm/llvm-project/pull/81571 ___ cfe-commits mailing list cfe-co

[clang] [clang][InstallAPI] Introduce basic driver to write out tbd files (PR #81571)

2024-02-13 Thread Juergen Ributzka via cfe-commits
@@ -804,4 +804,7 @@ def warn_android_unversioned_fallback : Warning< def err_drv_triple_version_invalid : Error< "version '%0' in target triple '%1' is invalid">; + +def err_drv_installapi_unsupported : Error< + "the clang compiler does not support '%0' for InstallAPI">; --

[clang] [clang][InstallAPI] Introduce basic driver to write out tbd files (PR #81571)

2024-02-13 Thread Juergen Ributzka via cfe-commits
@@ -4319,6 +4324,12 @@ void Driver::BuildActions(Compilation &C, DerivedArgList &Args, if (!MergerInputs.empty()) Actions.push_back( C.MakeAction(MergerInputs, types::TY_Image)); + } else if (Args.hasArg(options::OPT_installapi)) { +assert(Inputs.size(

[clang] [clang][InstallAPI] Introduce basic driver to write out tbd files (PR #81571)

2024-02-13 Thread Juergen Ributzka via cfe-commits
@@ -94,6 +94,7 @@ TYPE("lto-bc", LTO_BC, INVALID, "o", phases TYPE("ast", AST, INVALID, "ast", phases::Compile, phases::Backend, phases::Assemble, phases::Link) TYPE("ifs", IFS,

[clang] [llvm] [clang] Add fixed point precision macros (PR #81207)

2024-02-13 Thread via cfe-commits
PiJoules wrote: > I'm by no means a fixed-point expert, so this is a bit of a drive-by review. > > One thing to note is that we shouldn't be using N1169 because TR 18037 is > freely available: > https://standards.iso.org/ittf/PubliclyAvailableStandards/c051126_ISO_IEC_TR_18037_2008.zip > > Th

[clang] [llvm] [clang] Add fixed point precision macros (PR #81207)

2024-02-13 Thread via cfe-commits
@@ -1097,6 +1150,47 @@ static void InitializePredefinedMacros(const TargetInfo &TI, TI.getTypeWidth(TI.getIntMaxType()) && "uintmax_t and intmax_t have different widths?"); + if (LangOpts.FixedPoint) { +// Each unsigned type has the same width as th

[clang] [llvm] [clang] Add fixed point precision macros (PR #81207)

2024-02-13 Thread via cfe-commits
https://github.com/PiJoules edited https://github.com/llvm/llvm-project/pull/81207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-13 Thread via cfe-commits
akshaykumars614 wrote: I am new to this project. Please let me know if any files need to be added. I don't believe any testing or test suite changes are required for this change. https://github.com/llvm/llvm-project/pull/81670 ___ cfe-commits mailing

[clang] bad error message on incorrect string literal #18079 (PR #81670)

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

[clang] [ObjC] Check entire chain of superclasses to see if class layout can be statically known (PR #81335)

2024-02-13 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/81335 >From ebaa78d07b5472cac2a1407c2dfb50f4b3f0 Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Fri, 9 Feb 2024 17:51:15 -0500 Subject: [PATCH 1/2] [ObjC] Add pre-commi

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-13 Thread Shilei Tian via cfe-commits
shiltian wrote: The patch is in a good shape now. I have made two other prime patches (#81674 and #81669). I'll rebase this one once they are landed. This patch only changes one bf16 instruction with the necessary infrastructure for others. I'll update all of them once this patch is landed. H

[clang] [NFC] Add API documentation and annotations (PR #78635)

2024-02-13 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 edited https://github.com/llvm/llvm-project/pull/78635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Add API documentation and annotations (PR #78635)

2024-02-13 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 approved this pull request. https://github.com/llvm/llvm-project/pull/78635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Add API documentation and annotations (PR #78635)

2024-02-13 Thread Joshua Batista via cfe-commits
@@ -570,7 +716,13 @@ double4 sin(double4); //===--===// // sqrt builtins //===--===// + +/// \fn T sqrt(T Val) +/// \brief Returns the squar

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-13 Thread Shilei Tian via cfe-commits
@@ -79,17 +79,17 @@ define amdgpu_ps void @test_llvm_amdgcn_fdot2_bf16_bf16_sis( ; GFX11: ; %bb.0: ; %entry ; GFX11-NEXT:v_mov_b32_e32 v2, s1 ; GFX11-NEXT:s_delay_alu instid0(VALU_DEP_1) -; GFX11-NEXT:v_dot2_bf16_bf16 v2, s0, 0x10001, v2 +; GFX11-NEXT:v_do

[clang] [llvm] InstCombine: Enable SimplifyDemandedUseFPClass and remove flag (PR #81108)

2024-02-13 Thread via cfe-commits
https://github.com/KidiIT commented: All reviewed and resolved🫶❤️ https://github.com/llvm/llvm-project/pull/81108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Fixits for unsafe arguments of function pointer calls (PR #80358)

2024-02-13 Thread via cfe-commits
https://github.com/jkorous-apple updated https://github.com/llvm/llvm-project/pull/80358 >From 245ea0a82fdd1b24a5c7175fc90379a86df77fe8 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Wed, 24 Jan 2024 17:35:47 -0800 Subject: [PATCH 1/4] [-Wunsafe-buffer-usage] Emit fixits for array used as a p

[clang] [-Wunsafe-buffer-usage] Fixits for unsafe arguments of function pointer calls (PR #80358)

2024-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis @llvm/pr-subscribers-clang Author: None (jkorous-apple) Changes depends on https://github.com/llvm/llvm-project/pull/80347 --- Full diff: https://github.com/llvm/llvm-project/pull/80358.diff 3 Files Affected: - (modified) clang/lib/Ana

[clang] [compiler-rt] [asan][windows] Eliminate the static asan runtime on windows (PR #81677)

2024-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-compiler-rt-sanitizer Author: Charlie Barto (barcharcraz) Changes This is one of the major changes we (Microsoft) have made in the version of asan we ship with Visual Studio. Here's the description of these changes from our internal PR 1. Build one D

[clang] [compiler-rt] [asan][windows] Eliminate the static asan runtime on windows (PR #81677)

2024-02-13 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 4af24d4ab76539706bfbceec4b3923426fb1b9e7...c7eaa51d14fca4fac23ad8e5a937a8494f031eeb compi

[clang] [-Wunsafe-buffer-usage] Fixits for array decayed to pointer (PR #80347)

2024-02-13 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 approved this pull request. LGTM! (We probably do not need to use `CHECK-DAG` at most places in our tests since we have fixed the non-deterministic issue, but it's irrelevant to this PR.) https://github.com/llvm/llvm-project/pull/80347 ___

[clang] [clang][InstallAPI] Introduce basic driver to write out tbd files (PR #81571)

2024-02-13 Thread Cyndy Ishida via cfe-commits
@@ -0,0 +1,65 @@ +//===- InstallAPI/Context.h -*- C++ -*-===// +// +// 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] [-Wunsafe-buffer-usage] Fixits for unsafe arguments of function pointer calls (PR #80358)

2024-02-13 Thread via cfe-commits
https://github.com/jkorous-apple updated https://github.com/llvm/llvm-project/pull/80358 >From 245ea0a82fdd1b24a5c7175fc90379a86df77fe8 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Wed, 24 Jan 2024 17:35:47 -0800 Subject: [PATCH 1/5] [-Wunsafe-buffer-usage] Emit fixits for array used as a p

[clang] [ObjC] Check entire chain of superclasses to see if class layout can be statically known (PR #81335)

2024-02-13 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/81335 >From 1067d095fc6eb955f32c913a9efa42fb1b8e37d0 Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Fri, 9 Feb 2024 17:51:15 -0500 Subject: [PATCH 1/2] [ObjC] Add pre-commi

[clang] [clang][InstallAPI] Introduce basic driver to write out tbd files (PR #81571)

2024-02-13 Thread Cyndy Ishida via cfe-commits
@@ -4319,6 +4324,12 @@ void Driver::BuildActions(Compilation &C, DerivedArgList &Args, if (!MergerInputs.empty()) Actions.push_back( C.MakeAction(MergerInputs, types::TY_Image)); + } else if (Args.hasArg(options::OPT_installapi)) { +assert(Inputs.size(

[clang] e06f352 - [-Wunsafe-buffer-usage] Emit fixits for array decayed to pointer (#80347)

2024-02-13 Thread via cfe-commits
Author: jkorous-apple Date: 2024-02-13T14:31:11-08:00 New Revision: e06f3522cc55cec60084a1278109ab236ef7a3ee URL: https://github.com/llvm/llvm-project/commit/e06f3522cc55cec60084a1278109ab236ef7a3ee DIFF: https://github.com/llvm/llvm-project/commit/e06f3522cc55cec60084a1278109ab236ef7a3ee.diff

[clang] [-Wunsafe-buffer-usage] Fixits for array decayed to pointer (PR #80347)

2024-02-13 Thread via cfe-commits
https://github.com/jkorous-apple closed https://github.com/llvm/llvm-project/pull/80347 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][InstallAPI] Introduce basic driver to write out tbd files (PR #81571)

2024-02-13 Thread Juergen Ributzka via cfe-commits
@@ -4319,6 +4324,12 @@ void Driver::BuildActions(Compilation &C, DerivedArgList &Args, if (!MergerInputs.empty()) Actions.push_back( C.MakeAction(MergerInputs, types::TY_Image)); + } else if (Args.hasArg(options::OPT_installapi)) { +assert(Inputs.size(

[clang] [-Wunsafe-buffer-usage] Fixits for unsafe arguments of function pointer calls (PR #80358)

2024-02-13 Thread via cfe-commits
https://github.com/jkorous-apple updated https://github.com/llvm/llvm-project/pull/80358 >From 0679f7aef924b9c81e9632f75d9a29b3e469fb33 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Thu, 25 Jan 2024 13:52:12 -0800 Subject: [PATCH 1/3] [-Wunsafe-buffer-usage] Emit fixits for arguments of func

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-13 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/80908 >From bfd3170dc5e4d6e53fb98b46b37f2bf3c3ebf86d Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Tue, 13 Feb 2024 17:39:23 -0500 Subject: [PATCH] [RFC][WIP][AMDGPU] Use `bf16` instead of `i16` for bfloat Current

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-13 Thread Shilei Tian via cfe-commits
@@ -1,8 +1,7 @@ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -verify-machineinstrs < %s | FileCheck %s --check-prefixes=GFX11,SDAG-GFX11 -; RUN: llc -global-isel -mtriple=amdgcn -mcpu=gfx1100 -verify-mach

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

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

[clang] [clang][InstallAPI] Introduce basic driver to write out tbd files (PR #81571)

2024-02-13 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/81571 >From 0f938ae8480f74a44bf6fe4aac6105e457315bb9 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 12 Feb 2024 20:53:25 -0800 Subject: [PATCH 1/2] [clang][InstallAPI] Introduce basic driver to write out

[clang] [ObjC] Check entire chain of superclasses to see if class layout can be statically known (PR #81335)

2024-02-13 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/81335 >From af164727a52b49f50a71550326380e16e94e4356 Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Fri, 9 Feb 2024 17:51:15 -0500 Subject: [PATCH 1/2] [ObjC] Add pre-commi

[clang] [clang][InstallAPI] Introduce basic driver to write out tbd files (PR #81571)

2024-02-13 Thread Juergen Ributzka via cfe-commits
https://github.com/ributzka approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/81571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-13 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/80089 >From 7774e4036ac1de7fdf5fe4c6b3208b492853ffc5 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 23 Jan 2024 23:28:42 + Subject: [PATCH 1/8] add signed-integer-wrap sanitizer --- clang/include/clan

[clang] [ObjC] Check entire chain of superclasses to see if class layout can be statically known (PR #81335)

2024-02-13 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/81335 >From 983587c37e18979552ac4ad3891b423c1897a35b Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Fri, 9 Feb 2024 17:51:15 -0500 Subject: [PATCH 1/2] [ObjC] Add pre-commi

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-13 Thread Justin Stitt via cfe-commits
@@ -3554,12 +3572,20 @@ Value *ScalarExprEmitter::EmitOverflowCheckedBinOp(const BinOpInfo &Ops) { const std::string *handlerName = &CGF.getLangOpts().OverflowHandler; if (handlerName->empty()) { -// If the signed-integer-overflow sanitizer is enabled, emit a call

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-13 Thread Justin Stitt via cfe-commits
@@ -0,0 +1,77 @@ +// Check that -fsanitize=signed-integer-wrap instruments with -fwrapv +// RUN: %clang_cc1 -fwrapv -triple x86_64-apple-darwin -emit-llvm -o - %s -fsanitize=signed-integer-wrap | FileCheck %s --check-prefix=CHECKSIW + +// Check that -fsanitize=signed-integer-over

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-13 Thread Justin Stitt via cfe-commits
@@ -0,0 +1,77 @@ +// Check that -fsanitize=signed-integer-wrap instruments with -fwrapv +// RUN: %clang_cc1 -fwrapv -triple x86_64-apple-darwin -emit-llvm -o - %s -fsanitize=signed-integer-wrap | FileCheck %s --check-prefix=CHECKSIW + +// Check that -fsanitize=signed-integer-over

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-13 Thread Justin Stitt via cfe-commits
@@ -0,0 +1,77 @@ +// Check that -fsanitize=signed-integer-wrap instruments with -fwrapv JustinStitt wrote: Gotcha, I did just that in [5497e8b](https://github.com/llvm/llvm-project/pull/80089/commits/5497e8bc6849bf64c1158ff16b4aa04fd9141920). Thanks Nick! http

[clang] [analyzer] WebKit checkers: support ref and deref defined on different classes. (PR #68170)

2024-02-13 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ closed https://github.com/llvm/llvm-project/pull/68170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] WebKit checkers: support ref and deref defined on different classes. (PR #68170)

2024-02-13 Thread Artem Dergachev via cfe-commits
haoNoQ wrote: Closing because of the other PR. https://github.com/llvm/llvm-project/pull/68170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [attributes][analyzer] Generalize [[clang::suppress]] to declarations. (PR #80371)

2024-02-13 Thread Artem Dergachev via cfe-commits
haoNoQ wrote: Ok I'll try to land! https://github.com/llvm/llvm-project/pull/80371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 017675f - [attributes][analyzer] Generalize [[clang::suppress]] to declarations. (#80371)

2024-02-13 Thread via cfe-commits
Author: Artem Dergachev Date: 2024-02-13T14:57:55-08:00 New Revision: 017675fff116c26bef7f0a389c983c909a3141fd URL: https://github.com/llvm/llvm-project/commit/017675fff116c26bef7f0a389c983c909a3141fd DIFF: https://github.com/llvm/llvm-project/commit/017675fff116c26bef7f0a389c983c909a3141fd.dif

[clang] [attributes][analyzer] Generalize [[clang::suppress]] to declarations. (PR #80371)

2024-02-13 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ closed https://github.com/llvm/llvm-project/pull/80371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-13 Thread Jon Roelofs via cfe-commits
jroelofs wrote: > I am new to this project. Please let me know if any files need to be added. > > I don't believe any testing or test suite changes are required for this > change. This particular change will break this usage of that diagnostic, which expects that format argument: https://git

[clang] Add comments and macros support to Python bindings (PR #81684)

2024-02-13 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] Add comments and macros support to Python bindings (PR #81684)

2024-02-13 Thread Dan Miller via cfe-commits
https://github.com/dnmiller created https://github.com/llvm/llvm-project/pull/81684 The Python bindings currently do not expose the comment parsing engine and are missing a few macro utility functions. This adds bindings for the comments. >From 497478f08570f1333966c0843d713268bc9ba5c7 Mon Sep

[clang] Add comments and macros support to Python bindings (PR #81684)

2024-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Dan Miller (dnmiller) Changes The Python bindings currently do not expose the comment parsing engine and are missing a few macro utility functions. This adds bindings for the comments. --- Full diff: https://github.com/llvm/llvm-project/p

[clang] Add comments and macros support to Python bindings (PR #81684)

2024-02-13 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r fd3a0c185f177351207783fc2a604dac086cdaf7...497478f08570f1333966c0843d713268bc9ba5c7 clang

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-13 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/80089 >From 7774e4036ac1de7fdf5fe4c6b3208b492853ffc5 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 23 Jan 2024 23:28:42 + Subject: [PATCH 1/9] add signed-integer-wrap sanitizer --- clang/include/clan

[clang] [-Wunsafe-buffer-usage] Fixits for unsafe arguments of function pointer calls (PR #80358)

2024-02-13 Thread Artem Dergachev via cfe-commits
@@ -282,8 +282,8 @@ isInUnspecifiedPointerContext(internal::Matcher InnerMatcher) { //(i.e., computing the distance between two pointers); or ... auto CallArgMatcher = - callExpr(forEachArgumentWithParam(InnerMatcher, - hasPointerType() /* array

[clang] [alpha.webkit.UncountedCallArgsChecker] Check the safety of the object argument in a member function call. (PR #81400)

2024-02-13 Thread Artem Dergachev via cfe-commits
@@ -70,6 +70,15 @@ class UncountedCallArgsChecker // or std::function call operator). unsigned ArgIdx = isa(CE) && isa_and_nonnull(F); + if (auto *MemberCallExpr = dyn_cast(CE)) { +auto *E = MemberCallExpr->getImplicitObjectArgument(); +auto *

[clang] [-Wunsafe-buffer-usage] Fixits for unsafe arguments of function pointer calls (PR #80358)

2024-02-13 Thread via cfe-commits
@@ -282,8 +282,8 @@ isInUnspecifiedPointerContext(internal::Matcher InnerMatcher) { //(i.e., computing the distance between two pointers); or ... auto CallArgMatcher = - callExpr(forEachArgumentWithParam(InnerMatcher, - hasPointerType() /* array

[clang] [alpha.webkit.UncountedCallArgsChecker] Check the safety of the object argument in a member function call. (PR #81400)

2024-02-13 Thread Artem Dergachev via cfe-commits
@@ -183,6 +196,22 @@ class UncountedCallArgsChecker Report->addRange(CallArg->getSourceRange()); BR->emitReport(std::move(Report)); } + + void reportBugOnThis(const Expr *CallArg) const { +assert(CallArg); + +SmallString<100> Buf; +llvm::raw_svector_ostre

[clang] [ObjC] Check entire chain of superclasses to see if class layout can be statically known (PR #81335)

2024-02-13 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/81335 >From 6917791b07ad4fe696e7d5d1e9f378eb0e5ed78d Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Fri, 9 Feb 2024 17:51:15 -0500 Subject: [PATCH 1/2] [ObjC] Add pre-commi

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-13 Thread Stanislav Mekhanoshin via cfe-commits
@@ -0,0 +1,8 @@ +// RUN: llvm-mc -arch=amdgcn -mcpu=gfx1100 -show-encoding %s | FileCheck %s rampitec wrote: You also need a disasm test for this. https://github.com/llvm/llvm-project/pull/80908 ___ cfe-commits mailing

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-13 Thread Stanislav Mekhanoshin via cfe-commits
@@ -1,8 +1,7 @@ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -verify-machineinstrs < %s | FileCheck %s --check-prefixes=GFX11,SDAG-GFX11 -; RUN: llc -global-isel -mtriple=amdgcn -mcpu=gfx1100 -verify-mach

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-13 Thread Stanislav Mekhanoshin via cfe-commits
@@ -488,6 +488,49 @@ static bool printImmediateFloat16(uint32_t Imm, const MCSubtargetInfo &STI, return true; } +static bool printImmediateBFloat16(uint32_t Imm, const MCSubtargetInfo &STI, + raw_ostream &O) { + if (Imm == 0x3F80) +O <

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-13 Thread Stanislav Mekhanoshin via cfe-commits
@@ -4185,9 +4185,17 @@ bool SIInstrInfo::isInlineConstant(const MachineOperand &MO, case AMDGPU::OPERAND_REG_INLINE_C_V2FP16: case AMDGPU::OPERAND_REG_INLINE_AC_V2FP16: return AMDGPU::isInlinableLiteralV2F16(Imm); + case AMDGPU::OPERAND_REG_IMM_V2BF16: + case AMDGPU:

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-13 Thread Stanislav Mekhanoshin via cfe-commits
@@ -2819,11 +2819,11 @@ def int_amdgcn_fdot2_f16_f16 : def int_amdgcn_fdot2_bf16_bf16 : ClangBuiltin<"__builtin_amdgcn_fdot2_bf16_bf16">, DefaultAttrsIntrinsic< -[llvm_i16_ty], // %r +[llvm_bfloat_ty], // %r rampitec wrote: clang/test/CodeGenOp

[clang] [-Wunsafe-buffer-usage] Fixits for unsafe arguments of function pointer calls (PR #80358)

2024-02-13 Thread via cfe-commits
https://github.com/jkorous-apple updated https://github.com/llvm/llvm-project/pull/80358 >From dfc9d95c185f5228f5c9680a19aa396d20e33d19 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Thu, 25 Jan 2024 13:52:12 -0800 Subject: [PATCH 1/3] [-Wunsafe-buffer-usage] Emit fixits for arguments of func

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-13 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/80089 >From 7774e4036ac1de7fdf5fe4c6b3208b492853ffc5 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 23 Jan 2024 23:28:42 + Subject: [PATCH 01/10] add signed-integer-wrap sanitizer --- clang/include/cl

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-13 Thread Shilei Tian via cfe-commits
@@ -2819,11 +2819,11 @@ def int_amdgcn_fdot2_f16_f16 : def int_amdgcn_fdot2_bf16_bf16 : ClangBuiltin<"__builtin_amdgcn_fdot2_bf16_bf16">, DefaultAttrsIntrinsic< -[llvm_i16_ty], // %r +[llvm_bfloat_ty], // %r shiltian wrote: The cast will be ins

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-13 Thread Justin Stitt via cfe-commits
JustinStitt wrote: > UBSan is documented clang/docs/UndefinedBehaviorSanitizer.rst > https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html > > Please make sure to update the list [of available > checks](https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#available-checks). > >

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-02-13 Thread John McCall via cfe-commits
https://github.com/rjmccall edited https://github.com/llvm/llvm-project/pull/75481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-02-13 Thread John McCall via cfe-commits
@@ -1035,7 +1050,7 @@ EmitIntegerTruncationCheckHelper(Value *Src, QualType SrcType, Value *Dst, } llvm::Value *Check = nullptr; - // 1. Extend the truncated value back to the same width as the Src. + // 1. Convert the Dst back to the same type as Src.

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-02-13 Thread John McCall via cfe-commits
@@ -1239,6 +1257,228 @@ void ScalarExprEmitter::EmitIntegerSignChangeCheck(Value *Src, QualType SrcType, {Src, Dst}); } +// Should be called within CodeGenFunction::SanitizerScope RAII scope. +// Returns 'i1 false' when the truncation Src -> Dst was lossy. +st

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-02-13 Thread John McCall via cfe-commits
@@ -1097,6 +1112,27 @@ void ScalarExprEmitter::EmitIntegerTruncationCheck(Value *Src, QualType SrcType, {Src, Dst}); } +static llvm::Value *EmitIsNegativeTestHelper(Value *V, QualType VType, + const char *Name, +

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-02-13 Thread John McCall via cfe-commits
@@ -5570,11 +5570,44 @@ LValue CodeGenFunction::EmitBinaryOperatorLValue(const BinaryOperator *E) { break; } -RValue RV = EmitAnyExpr(E->getRHS()); +llvm::Value *Previous = nullptr; +RValue RV; +QualType SrcType = E->getRHS()->getType(); +// If L

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-02-13 Thread John McCall via cfe-commits
@@ -324,6 +326,19 @@ class ScalarExprEmitter void EmitIntegerSignChangeCheck(Value *Src, QualType SrcType, Value *Dst, QualType DstType, SourceLocation Loc); + /// Emit a check that an [implicit] truncation of a bitfield does not + /// dis

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-02-13 Thread John McCall via cfe-commits
@@ -1097,6 +1112,27 @@ void ScalarExprEmitter::EmitIntegerTruncationCheck(Value *Src, QualType SrcType, {Src, Dst}); } +static llvm::Value *EmitIsNegativeTestHelper(Value *V, QualType VType, + const char *Name, +

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-02-13 Thread John McCall via cfe-commits
@@ -5570,11 +5570,44 @@ LValue CodeGenFunction::EmitBinaryOperatorLValue(const BinaryOperator *E) { break; } -RValue RV = EmitAnyExpr(E->getRHS()); +llvm::Value *Previous = nullptr; +RValue RV; +QualType SrcType = E->getRHS()->getType(); +// If L

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-02-13 Thread John McCall via cfe-commits
https://github.com/rjmccall commented: You should handle compound assignments. https://github.com/llvm/llvm-project/pull/75481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-02-13 Thread John McCall via cfe-commits
@@ -122,6 +122,26 @@ Non-comprehensive list of changes in this release New Compiler Flags -- +- ``-fsanitize=implicit-unsigned-bitfield-truncation`` catches implicit + unsigned conversions involving bitfields. +- ``-fsanitize=implicit-signed-bitfield-truncatio

[clang] Detect a return value of Ref & RefPtr (PR #81580)

2024-02-13 Thread Artem Dergachev via cfe-commits
@@ -118,6 +118,26 @@ bool isCtorOfRefCounted(const clang::FunctionDecl *F) { || FunctionName == "Identifier"; } +bool isReturnValueRefCounted(const clang::FunctionDecl *F) { + assert(F); + auto *type = F->getReturnType().getTypePtrOrNull(); + while (type) { +if

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-13 Thread Shilei Tian via cfe-commits
@@ -488,6 +488,49 @@ static bool printImmediateFloat16(uint32_t Imm, const MCSubtargetInfo &STI, return true; } +static bool printImmediateBFloat16(uint32_t Imm, const MCSubtargetInfo &STI, + raw_ostream &O) { + if (Imm == 0x3F80) +O <

[clang] [clang] Add `intrin0.h` header to mimic `intrin0.h` used by MSVC STL for clang-cl (PR #75711)

2024-02-13 Thread Max Winkler via cfe-commits
MaxEW707 wrote: Ping Wondering if there is anything else required of me to progress this PR forward. Let me know :). https://github.com/llvm/llvm-project/pull/75711 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-13 Thread Shilei Tian via cfe-commits
@@ -4185,9 +4185,17 @@ bool SIInstrInfo::isInlineConstant(const MachineOperand &MO, case AMDGPU::OPERAND_REG_INLINE_C_V2FP16: case AMDGPU::OPERAND_REG_INLINE_AC_V2FP16: return AMDGPU::isInlinableLiteralV2F16(Imm); + case AMDGPU::OPERAND_REG_IMM_V2BF16: + case AMDGPU:

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-13 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/80908 >From d72bf8bb9d1091ba76e17bf09b0aad9073e18caa Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Tue, 13 Feb 2024 19:02:41 -0500 Subject: [PATCH] [RFC][WIP][AMDGPU] Use `bf16` instead of `i16` for bfloat Current

[clang] [llvm] [CMake][PGO] Build Sema.cpp to generate profdata for PGO builds (PR #77347)

2024-02-13 Thread Tom Stellard via cfe-commits
@@ -26,9 +30,23 @@ if(LLVM_BUILD_INSTRUMENTED) message(STATUS "To enable merging PGO data LLVM_PROFDATA has to point to llvm-profdata") else() add_custom_target(generate-profdata - COMMAND "${Python3_EXECUTABLE}" ${CMAKE_CURRENT_SOURCE_DIR}/perf-helper.py merge

[clang] [-Wunsafe-buffer-usage] Fixits for unsafe arguments of function pointer calls (PR #80358)

2024-02-13 Thread Artem Dergachev via cfe-commits
@@ -282,8 +282,8 @@ isInUnspecifiedPointerContext(internal::Matcher InnerMatcher) { //(i.e., computing the distance between two pointers); or ... auto CallArgMatcher = - callExpr(forEachArgumentWithParam(InnerMatcher, - hasPointerType() /* array

[clang] [compiler-rt] [asan][windows] Eliminate the static asan runtime on windows (PR #81677)

2024-02-13 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Added know some folks who may know how Asan in used by Chromium on Windows. https://github.com/llvm/llvm-project/pull/81677 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [compiler-rt] [asan][windows] Eliminate the static asan runtime on windows (PR #81677)

2024-02-13 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka commented: This is long description, but it does not explain WHY. Could you please add some explanation there? https://github.com/llvm/llvm-project/pull/81677 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] f45b9d9 - [RISCV] Add canonical ISA string as Module metadata in IR. (#80760)

2024-02-13 Thread via cfe-commits
Author: Craig Topper Date: 2024-02-13T16:17:50-08:00 New Revision: f45b9d987dfc5904d4129aa006ab20614b3174e3 URL: https://github.com/llvm/llvm-project/commit/f45b9d987dfc5904d4129aa006ab20614b3174e3 DIFF: https://github.com/llvm/llvm-project/commit/f45b9d987dfc5904d4129aa006ab20614b3174e3.diff

[clang] [RISCV] Add canonical ISA string as Module metadata in IR. (PR #80760)

2024-02-13 Thread Craig Topper via cfe-commits
https://github.com/topperc closed https://github.com/llvm/llvm-project/pull/80760 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-13 Thread Johannes Doerfert via cfe-commits
jdoerfert wrote: High level question: Does this patch eliminate the variadic call edge, or, does it perform inlining on very special variadic function definitions? I thought the former but `isFunctionInlinable`, sufficiently confused me. https://github.com/llvm/llvm-project/pull/81058 ___

[clang] [llvm] [MC/DC] Refactor: Let MCDCConditionID int16_t with zero-origin (PR #81257)

2024-02-13 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/81257 >From b2e8b3eaa067844a5fa5643aca17dbb0f237182e Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Sat, 10 Feb 2024 00:08:36 +0900 Subject: [PATCH 1/2] [MC/DC] Refactor: Let MCDCConditionID int16_t with zero-or

[clang] [clang][CodeGen] Shift relink option implementation away from module cloning (PR #81693)

2024-02-13 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j created https://github.com/llvm/llvm-project/pull/81693 We recently implemented a new option allowing relinking of bitcode modules via the "-mllvm -relink-builtin-bitcode-postop" option. This implementation relied on llvm::CloneModule() in order to pass copies to mod

[clang] [clang][CodeGen] Shift relink option implementation away from module cloning (PR #81693)

2024-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jacob Lambert (lamb-j) Changes We recently implemented a new option allowing relinking of bitcode modules via the "-mllvm -relink-builtin-bitcode-postop" option. This implementation relied on llvm::CloneModule() in order to pass copies to

[clang] [llvm] MIPS/clang: Fix asm constraint for softfloat (PR #79116)

2024-02-13 Thread Brad Smith via cfe-commits
brad0 wrote: @wzssyqa Ping. https://github.com/llvm/llvm-project/pull/79116 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Shift relink option implementation away from module cloning (PR #81693)

2024-02-13 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/81693 >From aff288af78b94dbd7ef317ce368f25a305798adc Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Tue, 13 Feb 2024 17:30:21 -0800 Subject: [PATCH 1/2] [clang][CodeGen] Shift relink option implementation away from

<    1   2   3   4   5   >