[clang] [clang][CodeGen] Emit atomic IR in place of optimized libcalls. (PR #73176)

2024-02-13 Thread Rainer Orth via cfe-commits
rorth wrote: Confirmed: reverting the patch locally restores the build. https://github.com/llvm/llvm-project/pull/73176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #67592)

2024-02-13 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/67592 >From 55b67a58ef8b9856e5f0a8f535b8617f59711dec Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Wed, 27 Sep 2023 11:59:04 -0700 Subject: [PATCH 01/12] Fix value of __FUNCTION__ and __func__ in MSVC mode. ---

[clang] [clang] Use "notable" for "interesting" identifiers in `IdentifierInfo` (PR #81542)

2024-02-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, but agreed on adding [NFC] to the patch title https://github.com/llvm/llvm-project/pull/81542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #67592)

2024-02-13 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/67592 >From 55b67a58ef8b9856e5f0a8f535b8617f59711dec Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Wed, 27 Sep 2023 11:59:04 -0700 Subject: [PATCH 01/13] Fix value of __FUNCTION__ and __func__ in MSVC mode. ---

[clang] [clang-format] Support of TableGen basic format restrictions. (PR #81611)

2024-02-13 Thread Hirofumi Nakamura via cfe-commits
https://github.com/hnakamura5 created https://github.com/llvm/llvm-project/pull/81611 - Allow/force to break the line or not. - Allow to insert space or not. This is separated part from https://github.com/llvm/llvm-project/pull/76059. Now we come to format in basic style ! >From 7ee4b35f0aed43

[clang] [clang-format] Support of TableGen basic format restrictions. (PR #81611)

2024-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Hirofumi Nakamura (hnakamura5) Changes - Allow/force to break the line or not. - Allow to insert space or not. This is separated part from https://github.com/llvm/llvm-project/pull/76059. Now we come to format in basic style ! ---

[clang] [llvm] [ARM] __ARM_ARCH macro definition fix (PR #81493)

2024-02-13 Thread James Westwood via cfe-commits
https://github.com/jwestwood921 updated https://github.com/llvm/llvm-project/pull/81493 >From 0a970c1e8d5137e1c202f688f06d738b890dd98c Mon Sep 17 00:00:00 2001 From: James Westwood Date: Fri, 9 Feb 2024 19:06:20 + Subject: [PATCH] __ARM_ARCH macro definition fix This patch changes how the

[clang] [llvm] [ARM] __ARM_ARCH macro definition fix (PR #81493)

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

[clang] 89c1bf1 - [ARM] __ARM_ARCH macro definition fix (#81493)

2024-02-13 Thread via cfe-commits
Author: James Westwood Date: 2024-02-13T15:12:35Z New Revision: 89c1bf1230e011f2f0e43554c278205fa1819de5 URL: https://github.com/llvm/llvm-project/commit/89c1bf1230e011f2f0e43554c278205fa1819de5 DIFF: https://github.com/llvm/llvm-project/commit/89c1bf1230e011f2f0e43554c278205fa1819de5.diff LOG

[clang] [clang-format] Support of TableGen basic format restrictions. (PR #81611)

2024-02-13 Thread Hirofumi Nakamura via cfe-commits
https://github.com/hnakamura5 updated https://github.com/llvm/llvm-project/pull/81611 >From 7ee4b35f0aed434053b6fd6329ef39de97bc22db Mon Sep 17 00:00:00 2001 From: hnakamura5 Date: Tue, 13 Feb 2024 23:50:15 +0900 Subject: [PATCH 1/2] [clang-format] Support of TableGen basic format restrictions

[clang] [llvm] [ARM] __ARM_ARCH macro definition fix (PR #81493)

2024-02-13 Thread via cfe-commits
github-actions[bot] wrote: @jwestwood921 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 b

[clang] [clang-format] Support of TableGen basic format restrictions. (PR #81611)

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

[clang] clangCodeGen: Introduce `mcdc::State` with `MCDCState.h` (PR #81497)

2024-02-13 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/81497 >From 80db8d1d054933a204b8b551687f65a80ea9cafa Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Tue, 13 Feb 2024 01:04:50 +0900 Subject: [PATCH] clangCodeGen: Introduce `mcdc::State` with `MCDCState.h` This

[clang] clangCodeGen: Introduce `mcdc::State` with `MCDCState.h` (PR #81497)

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

[clang] clangCodeGen: Introduce `MCDC::State` with `MCDCState.h` (PR #81497)

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

[clang] [clang-format] Support of TableGen basic format restrictions. (PR #81611)

2024-02-13 Thread Hirofumi Nakamura via cfe-commits
@@ -55,5 +55,268 @@ TEST_F(FormatTestTableGen, NoSpacesInSquareBracketLists) { verifyFormat("def flag : Flag<[\"-\", \"--\"], \"foo\">;"); } +TEST_F(FormatTestTableGen, LiteralsAndIdentifiers) { + verifyFormat("def LiteralAndIdentifiers {\n" + " let someInteg

[clang] [clang-format] Support of TableGen basic format restrictions. (PR #81611)

2024-02-13 Thread Hirofumi Nakamura via cfe-commits
@@ -5822,6 +5860,24 @@ bool TokenAnnotator::canBreakBefore(const AnnotatedLine &Line, return false; if (Left.is(TT_TemplateString) && Left.opensScope()) return true; + } else if (Style.isTableGen()) { +// Avoid to break after "def", "class", "let" and so o

[clang] [clang-format] Support of TableGen basic format restrictions. (PR #81611)

2024-02-13 Thread Hirofumi Nakamura via cfe-commits
@@ -5072,7 +5072,38 @@ bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line, Left.endsSequence(tok::greatergreater, tok::l_brace))) { return false; } + } else if (Style.isTableGen()) { +// Avoid to connect [ and {. [{ is start token of mul

[clang] [clang-format] Support of TableGen basic format restrictions. (PR #81611)

2024-02-13 Thread Hirofumi Nakamura via cfe-commits
https://github.com/hnakamura5 edited https://github.com/llvm/llvm-project/pull/81611 ___ 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 incorrect hint for InitListExpr in prefer-member-initializer (PR #81560)

2024-02-13 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/81560 ___ 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 incorrect hint for InitListExpr in prefer-member-initializer (PR #81560)

2024-02-13 Thread Julian Schmidt via cfe-commits
@@ -216,6 +217,7 @@ void PreferMemberInitializerCheck::check( else { ReplaceRange = Init->getInit()->getSourceRange(); } +AddBracket = isa(Init->getInit()); 5chmidti wrote: This could be inside the else-branch right above, rig

[clang] [clang-format] Support of TableGen basic format restrictions. (PR #81611)

2024-02-13 Thread Hirofumi Nakamura via cfe-commits
https://github.com/hnakamura5 updated https://github.com/llvm/llvm-project/pull/81611 >From 7ee4b35f0aed434053b6fd6329ef39de97bc22db Mon Sep 17 00:00:00 2001 From: hnakamura5 Date: Tue, 13 Feb 2024 23:50:15 +0900 Subject: [PATCH 1/3] [clang-format] Support of TableGen basic format restrictions

[clang-tools-extra] [clang-tidy] fix incorrect hint for InitListExpr in prefer-member-initializer (PR #81560)

2024-02-13 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti commented: FYI: I have found a false-negative that is unrelated to this pr and issue, but my fix builds upon your pr. I filed an issue for it here #81613 and will post a pr once yours in merged, I don't want to make a stack just for that fix. https://github.com/llvm

[clang-tools-extra] [clang-tidy] fix incorrect hint for InitListExpr in prefer-member-initializer (PR #81560)

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

[clang] [clang-format] Support of TableGen basic format restrictions. (PR #81611)

2024-02-13 Thread Hirofumi Nakamura via cfe-commits
https://github.com/hnakamura5 edited https://github.com/llvm/llvm-project/pull/81611 ___ 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 incorrect hint for InitListExpr in prefer-member-initializer (PR #81560)

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

[clang] [clang][analyzer] Change default value of checker option in unix.StdCLibraryFunctions. (PR #80457)

2024-02-13 Thread Balázs Kéri via cfe-commits
balazske wrote: > * a [straightforward leak of a string returned by > `strdup()`](https://codechecker-demo.eastus.cloudapp.azure.com/Default/report-detail?run=postgres_REL_13_0_modelposix_defaulton&newcheck=postgres_REL_13_0_modelposix_defaultoff&is-unique=on&diff-type=New&report-id=3467892&repo

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-13 Thread Chris B via cfe-commits
@@ -4518,6 +4518,12 @@ def HLSLCreateHandle : LangBuiltin<"HLSL_LANG"> { let Prototype = "void*(unsigned char)"; } +def HLSLDotProduct : LangBuiltin<"HLSL_LANG"> { + let Spellings = ["__builtin_hlsl_dot"]; + let Attributes = [NoThrow, Const, CustomTypeChecking]; --

[clang] [llvm] [MC/DC] Refactor: Introduce `ConditionIDs` as `std::array<2>` (PR #81221)

2024-02-13 Thread Alan Phipps via cfe-commits
https://github.com/evodius96 approved this pull request. https://github.com/llvm/llvm-project/pull/81221 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM] Add `__builtin_readsteadycounter` intrinsic and builtin for realtime clocks (PR #81331)

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

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-13 Thread Chris B via cfe-commits
@@ -144,6 +144,92 @@ double3 cos(double3); _HLSL_BUILTIN_ALIAS(__builtin_elementwise_cos) double4 cos(double4); +//===--===// +// dot product builtins +//===

[clang] [clang][analyzer] Change default value of checker option in unix.StdCLibraryFunctions. (PR #80457)

2024-02-13 Thread Balázs Kéri via cfe-commits
balazske wrote: Because the many cases with `fileno` I can agree to change the summary so we assume that it never fails. Probably an other checker may find a case if the passed file handle is invalid because it was not initialized, or the file was already closed (`StreamChecker` should find th

[clang] [clang-format] Always insert a space between #if and l_paren (PR #81578)

2024-02-13 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/81578 >From 02d2d44046a4cf6ca8c5bb1897b6677c01d81974 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 13 Feb 2024 00:03:19 -0800 Subject: [PATCH] [clang-format] Always add a space after #if and #elif Fixes #81569. --

[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #67592)

2024-02-13 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/67592 >From 55b67a58ef8b9856e5f0a8f535b8617f59711dec Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Wed, 27 Sep 2023 11:59:04 -0700 Subject: [PATCH 01/14] Fix value of __FUNCTION__ and __func__ in MSVC mode. ---

[clang] [clang-format] Always add a space after #if and #elif (PR #81578)

2024-02-13 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/81578 ___ 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 incorrect hint for InitListExpr in prefer-member-initializer (PR #81560)

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

[clang] [clang][analyzer] Change default value of checker option in unix.StdCLibraryFunctions. (PR #80457)

2024-02-13 Thread via cfe-commits
NagyDonat wrote: > > * a [straightforward leak of a string returned by > > `strdup()`](https://codechecker-demo.eastus.cloudapp.azure.com/Default/report-detail?run=postgres_REL_13_0_modelposix_defaulton&newcheck=postgres_REL_13_0_modelposix_defaultoff&is-unique=on&diff-type=New&report-id=3467892

[clang] 381a00d - [clang][Driver][HLSL] Fix formatting of clang-dxc options group title

2024-02-13 Thread David Spickett via cfe-commits
Author: David Spickett Date: 2024-02-13T16:05:03Z New Revision: 381a00de4fdcccd904dac6a0856fb44f12ba0abb URL: https://github.com/llvm/llvm-project/commit/381a00de4fdcccd904dac6a0856fb44f12ba0abb DIFF: https://github.com/llvm/llvm-project/commit/381a00de4fdcccd904dac6a0856fb44f12ba0abb.diff LOG

[clang] 11fcae6 - [LLVM] Add `__builtin_readsteadycounter` intrinsic and builtin for realtime clocks (#81331)

2024-02-13 Thread via cfe-commits
Author: Joseph Huber Date: 2024-02-13T10:06:25-06:00 New Revision: 11fcae69dbea4860e20ab799ecca9b0432d7f19d URL: https://github.com/llvm/llvm-project/commit/11fcae69dbea4860e20ab799ecca9b0432d7f19d DIFF: https://github.com/llvm/llvm-project/commit/11fcae69dbea4860e20ab799ecca9b0432d7f19d.diff

[clang] [llvm] [LLVM] Add `__builtin_readsteadycounter` intrinsic and builtin for realtime clocks (PR #81331)

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

[clang] 1d84792 - [clang][Driver] Small correction to print-runtime-dir

2024-02-13 Thread David Spickett via cfe-commits
Author: David Spickett Date: 2024-02-13T16:14:03Z New Revision: 1d8479225a8c1efc8c90511e6c7fe608ff38163c URL: https://github.com/llvm/llvm-project/commit/1d8479225a8c1efc8c90511e6c7fe608ff38163c DIFF: https://github.com/llvm/llvm-project/commit/1d8479225a8c1efc8c90511e6c7fe608ff38163c.diff LOG

[clang] [analyzer] Fix core.VLASize checker false positive taint reports (PR #68140)

2024-02-13 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp updated https://github.com/llvm/llvm-project/pull/68140 >From 4b310278d2923ff718d074a7f7c8806ad03c6401 Mon Sep 17 00:00:00 2001 From: Daniel Krupp Date: Tue, 3 Oct 2023 19:58:28 +0200 Subject: [PATCH 1/2] [analyzer] Fix core.VLASize checker false positive taint report

[clang] [clang-format][NFC] Make LangOpts global in namespace Format (PR #81390)

2024-02-13 Thread Lei Huang via cfe-commits
lei137 wrote: @owenca This PR broke the following PowerPC bots: * https://lab.llvm.org/buildbot/#/builders/230 * https://lab.llvm.org/buildbot/#/builders/121 But the rhel both https://lab.llvm.org/buildbot/#/builders/57 is fine. AFAIK the only difference between these bots is that builder 57 i

[clang] [analyzer] Fix core.VLASize checker false positive taint reports (PR #68140)

2024-02-13 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 46122082a61ef5bb2871d2d9158739133ad0e113 7a1019c966b6705a4f2a9aff7d42400e4cacb867 --

[clang] 7a5c1a4 - [clang][docs] Fix warning in LanguageExtensions

2024-02-13 Thread David Spickett via cfe-commits
Author: David Spickett Date: 2024-02-13T16:39:59Z New Revision: 7a5c1a4abc750fef335c2ee5191d59ebe9e4bf18 URL: https://github.com/llvm/llvm-project/commit/7a5c1a4abc750fef335c2ee5191d59ebe9e4bf18 DIFF: https://github.com/llvm/llvm-project/commit/7a5c1a4abc750fef335c2ee5191d59ebe9e4bf18.diff LOG

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-13 Thread David Peixotto via cfe-commits
@@ -0,0 +1,202 @@ +// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ +// RUN: -emit-llvm -disable-llvm-passes -O3 -o - | FileCheck %s +// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-h

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-13 Thread David Peixotto via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ +// RUN: -emit-llvm -disable-llvm-passes -verify -verify-ignore-unexpected + +float test_first_arg_is_not_vector ( floa

[clang] [analyzer] Fix core.VLASize checker false positive taint reports (PR #68140)

2024-02-13 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp updated https://github.com/llvm/llvm-project/pull/68140 >From 4b310278d2923ff718d074a7f7c8806ad03c6401 Mon Sep 17 00:00:00 2001 From: Daniel Krupp Date: Tue, 3 Oct 2023 19:58:28 +0200 Subject: [PATCH 1/3] [analyzer] Fix core.VLASize checker false positive taint report

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

2024-02-13 Thread Joshua Cranmer via cfe-commits
https://github.com/jcranmer-intel approved this pull request. 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] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-13 Thread David Peixotto via cfe-commits
@@ -144,6 +144,92 @@ double3 cos(double3); _HLSL_BUILTIN_ALIAS(__builtin_elementwise_cos) double4 cos(double4); +//===--===// +// dot product builtins +//===

[clang] [llvm] [MC/DC] Refactor: Introduce `ConditionIDs` as `std::array<2>` (PR #81221)

2024-02-13 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/81221 >From 66bb6cc3fd339360c16c6a98ce08f34978f665e0 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Fri, 9 Feb 2024 07:56:51 +0900 Subject: [PATCH 1/3] [MC/DC] Refactor: Introduce `ConditionIDs` as `std::array<2

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-13 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ +// RUN: -emit-llvm -disable-llvm-passes -verify -verify-ignore-unexpected + +float test_first_arg_is_not_vector ( floa

[clang] [analyzer] Fix core.VLASize checker false positive taint reports (PR #68140)

2024-02-13 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp updated https://github.com/llvm/llvm-project/pull/68140 >From 4b310278d2923ff718d074a7f7c8806ad03c6401 Mon Sep 17 00:00:00 2001 From: Daniel Krupp Date: Tue, 3 Oct 2023 19:58:28 +0200 Subject: [PATCH 1/4] [analyzer] Fix core.VLASize checker false positive taint report

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-13 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,202 @@ +// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ +// RUN: -emit-llvm -disable-llvm-passes -O3 -o - | FileCheck %s +// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-h

[clang-tools-extra] [clangd] Extract Function: add hoisting support (PR #75533)

2024-02-13 Thread Julian Schmidt via cfe-commits
5chmidti wrote: Ping https://github.com/llvm/llvm-project/pull/75533 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-13 Thread David Peixotto via cfe-commits
@@ -0,0 +1,202 @@ +// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ +// RUN: -emit-llvm -disable-llvm-passes -O3 -o - | FileCheck %s +// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-h

[clang] [clang][CodeGen] Emit atomic IR in place of optimized libcalls. (PR #73176)

2024-02-13 Thread via cfe-commits
Logikable wrote: https://reviews.llvm.org/D118021 likely related, looking into this. https://github.com/llvm/llvm-project/pull/73176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9be7b0a - [IRGen][AArch64][RISCV] Generalize bitcast between i1 predicate vector and i8 fixed vector. (#76548)

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

[clang] [IRGen][AArch64][RISCV] Generalize bitcast between i1 predicate vector and i8 fixed vector. (PR #76548)

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

[clang] [clang-tools-extra] [lldb] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-02-13 Thread David Blaikie via cfe-commits
@@ -5401,6 +5409,8 @@ std::string CGDebugInfo::GetName(const Decl *D, bool Qualified) const { // feasible some day. return TA.getAsIntegral().getBitWidth() <= 64 && IsReconstitutableType(TA.getIntegralType()); + case Template

[clang] [llvm] [llvm][AArch64] Do not inline a function with different signing scheme. (PR #80642)

2024-02-13 Thread Nick Desaulniers via cfe-commits
@@ -5167,6 +5199,41 @@ void llvm::UpgradeFunctionAttributes(Function &F) { F.removeRetAttrs(AttributeFuncs::typeIncompatible(F.getReturnType())); for (auto &Arg : F.args()) Arg.removeAttrs(AttributeFuncs::typeIncompatible(Arg.getType())); + + if (!ModuleMetadataIsMater

[clang] [llvm] [llvm][AArch64] Do not inline a function with different signing scheme. (PR #80642)

2024-02-13 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,126 @@ +; Check the inliner doesn't inline a function with different sign return address schemes. +; RUN: opt < %s -passes=inline -S | FileCheck %s + +declare void @init(ptr) + +define internal i32 @foo_all() #0 { + ret i32 43 +} + +define internal i32 @foo_nonleaf()

[clang] [llvm] [llvm][AArch64] Do not inline a function with different signing scheme. (PR #80642)

2024-02-13 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,126 @@ +; Check the inliner doesn't inline a function with different sign return address schemes. +; RUN: opt < %s -passes=inline -S | FileCheck %s + +declare void @init(ptr) + +define internal i32 @foo_all() #0 { + ret i32 43 +} + +define internal i32 @foo_nonleaf()

[clang] [llvm] [llvm][AArch64] Do not inline a function with different signing scheme. (PR #80642)

2024-02-13 Thread Nick Desaulniers via cfe-commits
@@ -1606,6 +1606,10 @@ Error IRLinker::run() { // Loop over all of the linked values to compute type mappings. computeTypeMapping(); + // Update function attributes before copy them to destation module. nickdesaulniers wrote: s/copy/copying/ https://git

[clang] [llvm] [llvm][AArch64] Do not inline a function with different signing scheme. (PR #80642)

2024-02-13 Thread Nick Desaulniers via cfe-commits
@@ -5155,7 +5155,39 @@ struct StrictFPUpgradeVisitor : public InstVisitor { }; } // namespace -void llvm::UpgradeFunctionAttributes(Function &F) { +static void +CopyModuleAttributeToFunction(Function &F, StringRef FnAttrName, + StringRef ModAttrNa

[clang] [llvm] [llvm][AArch64] Do not inline a function with different signing scheme. (PR #80642)

2024-02-13 Thread Nick Desaulniers via cfe-commits
@@ -2110,6 +2110,21 @@ llvm::InlineResult llvm::InlineFunction(CallBase &CB, InlineFunctionInfo &IFI, return InlineResult::failure("incompatible strictfp attributes"); } + // Do not inline function with a different signing scheme. + if (CalledFunc->getFnAttribute("sig

[clang] [llvm] [llvm][AArch64] Do not inline a function with different signing scheme. (PR #80642)

2024-02-13 Thread Nick Desaulniers via cfe-commits
@@ -5155,7 +5155,39 @@ struct StrictFPUpgradeVisitor : public InstVisitor { }; } // namespace -void llvm::UpgradeFunctionAttributes(Function &F) { +static void +CopyModuleAttributeToFunction(Function &F, StringRef FnAttrName, + StringRef ModAttrNa

[clang] [llvm] [llvm][AArch64] Do not inline a function with different signing scheme. (PR #80642)

2024-02-13 Thread Nick Desaulniers via cfe-commits
@@ -5155,7 +5155,39 @@ struct StrictFPUpgradeVisitor : public InstVisitor { }; } // namespace -void llvm::UpgradeFunctionAttributes(Function &F) { +static void +CopyModuleAttributeToFunction(Function &F, StringRef FnAttrName, + StringRef ModAttrNa

[clang] [llvm] [llvm][AArch64] Do not inline a function with different signing scheme. (PR #80642)

2024-02-13 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,43 @@ +; Testcase to check that module with different branch-target-enforcement can +; be mixed. +; +; RUN: llvm-as %s -o %t1.bc +; RUN: llvm-as %p/Inputs/foo.ll -o %t2.bc +; RUN: llvm-lto -exported-symbol main \ +; RUN: -exported-symbol foo \ +; RUN:

[clang] 742a06f - [clang] Remove #undef alloca workaround (#81534)

2024-02-13 Thread via cfe-commits
Author: Arthur Eubanks Date: 2024-02-13T09:49:22-08:00 New Revision: 742a06f577b4c3b1c1f994e91bb6579ae89fe4b0 URL: https://github.com/llvm/llvm-project/commit/742a06f577b4c3b1c1f994e91bb6579ae89fe4b0 DIFF: https://github.com/llvm/llvm-project/commit/742a06f577b4c3b1c1f994e91bb6579ae89fe4b0.diff

[clang] [clang] Remove #undef alloca workaround (PR #81534)

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

[clang] [llvm] [llvm][AArch64] Do not inline a function with different signing scheme. (PR #80642)

2024-02-13 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: thanks for the patch! https://github.com/llvm/llvm-project/pull/80642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AArch64] Do not inline a function with different signing scheme. (PR #80642)

2024-02-13 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: Also, consider submitting your 3 commits as 3 distinct PRs. The first is ready to land. I think the auto upgrade could be detached from the inlining decisions. Also, I'm kind of surprised you didn't have to change anything in clang codegen of LLVM IR. Shouldn't clang

[clang] [llvm] [llvm][AArch64] Do not inline a function with different signing scheme. (PR #80642)

2024-02-13 Thread Nick Desaulniers via cfe-commits
@@ -5155,7 +5155,39 @@ struct StrictFPUpgradeVisitor : public InstVisitor { }; } // namespace -void llvm::UpgradeFunctionAttributes(Function &F) { +static void +CopyModuleAttributeToFunction(Function &F, StringRef FnAttrName, + StringRef ModAttrNa

[clang] [C23] Fix handling of alignas (PR #81637)

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

[clang] [C23] Fix handling of alignas (PR #81637)

2024-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes In C++, alignas is an attribute specifier, while in C23, it's an alias of _Alignas, which is a type specifier/qualifier. This means that they parse differently in some circumstances. Fixes https://git

[clang] [clang][CodeGen] Emit atomic IR in place of optimized libcalls. (PR #73176)

2024-02-13 Thread Rainer Orth via cfe-commits
rorth wrote: The libcalls per se wouldn't be a problem since on 32-bit Solaris/sparc `-latomic` is always linked due to that. However, the `__sync_*` libcalls aren't defined in `libatomic.so`, thus the link failure. https://github.com/llvm/llvm-project/pull/73176 _

[clang-tools-extra] [clangd] Add 'apply all clangd fixes' and 'apply all '_' fixes' QuickFixes (PR #79867)

2024-02-13 Thread Tor Shepherd via cfe-commits
torshepherd wrote: Ping https://github.com/llvm/llvm-project/pull/79867 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [lldb] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-02-13 Thread Andrey Ali Khan Bolshakov via cfe-commits
@@ -5401,6 +5409,8 @@ std::string CGDebugInfo::GetName(const Decl *D, bool Qualified) const { // feasible some day. return TA.getAsIntegral().getBitWidth() <= 64 && IsReconstitutableType(TA.getIntegralType()); + case Template

[clang] [C23] Fix handling of alignas (PR #81637)

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

[clang] [C23] Fix handling of alignas (PR #81637)

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

[clang] [C23] Fix handling of alignas (PR #81637)

2024-02-13 Thread via cfe-commits
@@ -3518,8 +3518,24 @@ void Parser::ParseDeclarationSpecifiers( DS.Finish(Actions, Policy); return; -case tok::l_square: +// alignment-specifier +case tok::kw__Alignas: + if (!getLangOpts().C11) +Diag(Tok, diag::ext_c11_feature) << Tok.getN

[clang] [C23] Fix handling of alignas (PR #81637)

2024-02-13 Thread via cfe-commits
@@ -114,6 +114,19 @@ C Language Changes C23 Feature Support ^^^ +- Corrected parsing behavior for the ``alignas`` specifier/qualifier in C23. We + previously handled it as an attribute as in C++, but there are parsing + differences. The behavioral differences

[clang] [C23] Fix handling of alignas (PR #81637)

2024-02-13 Thread Aaron Ballman via cfe-commits
@@ -3518,8 +3518,24 @@ void Parser::ParseDeclarationSpecifiers( DS.Finish(Actions, Policy); return; -case tok::l_square: +// alignment-specifier +case tok::kw__Alignas: + if (!getLangOpts().C11) +Diag(Tok, diag::ext_c11_feature) << Tok.getN

[clang] [C23] Fix handling of alignas (PR #81637)

2024-02-13 Thread Aaron Ballman via cfe-commits
@@ -114,6 +114,19 @@ C Language Changes C23 Feature Support ^^^ +- Corrected parsing behavior for the ``alignas`` specifier/qualifier in C23. We + previously handled it as an attribute as in C++, but there are parsing + differences. The behavioral differences

[clang-tools-extra] [clangd] fix extract-to-function for overloaded operators (PR #81640)

2024-02-13 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti created https://github.com/llvm/llvm-project/pull/81640 When selecting code that contains the use of overloaded operators, the SelectionTree will attribute the operator to the operator declaration, not to the `CXXOperatorCallExpr`. To allow extract-to-function to work

[clang-tools-extra] [clangd] fix extract-to-function for overloaded operators (PR #81640)

2024-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Julian Schmidt (5chmidti) Changes When selecting code that contains the use of overloaded operators, the SelectionTree will attribute the operator to the operator declaration, not to the `CXXOperatorCallExpr`. To allow extract-to-function

[clang] [clang][CodeGen] Emit atomic IR in place of optimized libcalls. (PR #73176)

2024-02-13 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Looks like a bug in the SPARC backend. https://github.com/llvm/llvm-project/pull/73176#pullrequestreview-1811677691 indicated that atomic expansion was working correctly for all backends, but I guess it isn't working correctly on SPARC. https://github.com/llvm/llvm-proj

[clang-tools-extra] [clangd] fix extract-to-function for overloaded operators (PR #81640)

2024-02-13 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/81640 >From c9886f24d53de59f11028dc06c56a96ef5896e0e Mon Sep 17 00:00:00 2001 From: Julian Schmidt Date: Tue, 13 Feb 2024 18:59:16 +0100 Subject: [PATCH 1/2] [clangd] fix extract-to-function for overloaded operators

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-02-13 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/81642 Our current method of storing the template arguments as written for `(Class/Var)Template(Partial)SpecializationDecl` suffers from a number of flaws: - We use `TypeSourceInfo` to store `TemplateArgumentLocs` fo

[clang] [HLSL] Vector standard conversions (PR #71098)

2024-02-13 Thread John McCall via cfe-commits
https://github.com/rjmccall approved this pull request. Thanks, LGTM https://github.com/llvm/llvm-project/pull/71098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules @llvm/pr-subscribers-clang Author: Krystian Stasiowski (sdkrystian) Changes Our current method of storing the template arguments as written for `(Class/Var)Template(Partial)SpecializationDecl` suffers from a number of flaws: - We use `Type

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

2024-02-13 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Precommit CI seems to have found some related failures that should be investigated. I'd love to hear opinions from the codegen code owners on this, as well as @zygoloid as UBSan code owner. I'm not opposed to the changes, though I do find it somewhat strange to add them to

[clang] [Clang][Sema] Diagnose friend declarations with enum elaborated-type-specifier in all language modes (PR #80171)

2024-02-13 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/80171 >From 5de10ae0864dacf5f48daf476a4fa20177545d9b Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 31 Jan 2024 11:09:11 -0500 Subject: [PATCH] [Clang][Sema] Diagnose friend declarations with enum el

[clang] [clang] Remove #undef alloca workaround (PR #81534)

2024-02-13 Thread via cfe-commits
Prabhuk wrote: Hi, this change seems to break building (Fuchsia) Clang toolchain on Windows. Log: https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket/8756186536543250705/+/u/clang/install/stdout Builder: https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/clang-windows-x

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

2024-02-13 Thread Nick Desaulniers 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 Nick Desaulniers 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 Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers commented: PATCH mostly LGTM 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/UndefinedBehaviorSani

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

2024-02-13 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers edited https://github.com/llvm/llvm-project/pull/80089 ___ 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 Nick Desaulniers via cfe-commits
@@ -0,0 +1,77 @@ +// Check that -fsanitize=signed-integer-wrap instruments with -fwrapv nickdesaulniers wrote: > I must be doing something wrong because it suggests I remove all my Check: > ...'s and replace them with Check: {{.*}} Huh, indeed. I can repro. Not

<    1   2   3   4   5   >