[clang] [Tooling] Fix FixedCompilationDatabase with header compile flags (PR #73913)

2024-01-19 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall updated https://github.com/llvm/llvm-project/pull/73913 >From 98768562935cdf1c42e41d9bbe09cfdc0a545c2a Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Thu, 30 Nov 2023 10:22:00 +0100 Subject: [PATCH] [Tooling] Fix FixedCompilationDatabase with header compile flags

[clang] 1ab418b - [Tooling] Fix FixedCompilationDatabase with header compile flags (#73913)

2024-01-19 Thread via cfe-commits
Author: Sam McCall Date: 2024-01-19T14:02:04+01:00 New Revision: 1ab418beb3cc9c31ebb2d5779069426d761ceb8f URL: https://github.com/llvm/llvm-project/commit/1ab418beb3cc9c31ebb2d5779069426d761ceb8f DIFF: https://github.com/llvm/llvm-project/commit/1ab418beb3cc9c31ebb2d5779069426d761ceb8f.diff LO

[clang] [Tooling] Fix FixedCompilationDatabase with header compile flags (PR #73913)

2024-01-19 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall closed https://github.com/llvm/llvm-project/pull/73913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFC] Optimize isAsciiIdentifierContinue (PR #78699)

2024-01-19 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/78699 >From 5b25a78e888086f5a9c25acab2dc446a85252ee4 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Fri, 19 Jan 2024 12:04:29 +0100 Subject: [PATCH 1/2] [Clang][NFC] Optimize isAsciiIdentifierContinue Precompute

[clang-tools-extra] [clang] [llvm] Move ExpandMemCmp and MergeIcmp to the middle end (PR #77370)

2024-01-19 Thread Gabriel Baraldi via cfe-commits
gbaraldi wrote: That's encouraging at least. https://github.com/llvm/llvm-project/pull/77370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc++] fix _Atomic c11 compare exchange does not update expected results (PR #78707)

2024-01-19 Thread via cfe-commits
https://github.com/huixie90 updated https://github.com/llvm/llvm-project/pull/78707 >From 37c3f40a4bd118dbcf3a1727e6bcf083b9826cdb Mon Sep 17 00:00:00 2001 From: Hui Date: Fri, 19 Jan 2024 12:33:43 + Subject: [PATCH] [libc++] fix _Atomic c11 compare exchange does not update expected result

[clang] 061eb62 - [Clang] [NFC] Remove default argument in ASTUnit.h (#78566)

2024-01-19 Thread via cfe-commits
Author: Sirraide Date: 2024-01-19T08:29:23-05:00 New Revision: 061eb62a9051ed06935135ffa3ea03eb250fd55e URL: https://github.com/llvm/llvm-project/commit/061eb62a9051ed06935135ffa3ea03eb250fd55e DIFF: https://github.com/llvm/llvm-project/commit/061eb62a9051ed06935135ffa3ea03eb250fd55e.diff LOG:

[clang] [Clang] [NFC] Remove default argument in ASTUnit.h (PR #78566)

2024-01-19 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/78566 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix build with GCC 14 on ARM (PR #78704)

2024-01-19 Thread Sander de Smalen via cfe-commits
@@ -760,8 +760,9 @@ KEYWORD(__builtin_available , KEYALL) KEYWORD(__builtin_sycl_unique_stable_name, KEYSYCL) // Keywords defined by Attr.td. +// The "EMPTY ## X" is used to prevent early macro-expansion of the keyword. #ifndef KEYWORD_ATTRIBUTE -#define KEYWORD_

[clang] [Clang] Fix build with GCC 14 on ARM (PR #78704)

2024-01-19 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm approved this pull request. https://github.com/llvm/llvm-project/pull/78704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [AMDGPU] Do not emit `V_DOT2C_F32_F16_e32` on GFX12 (PR #78709)

2024-01-19 Thread Mirko Brkušanin via cfe-commits
https://github.com/mbrkusanin approved this pull request. https://github.com/llvm/llvm-project/pull/78709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [Clang] Correct __builtin_dynamic_object_size for subobject types (PR #78526)

2024-01-19 Thread Nikita Popov via cfe-commits
nikic wrote: @bwendling I think you are reading the GCC docs too pedantically. In particular, they also say > If there are multiple objects ptr can point to and all of them are known at > compile time, the returned number is the maximum of remaining byte counts in > those objects if type & 2

[llvm] [clang] [AMDGPU] Remove gws feature from GFX12 (PR #78711)

2024-01-19 Thread Jay Foad via cfe-commits
https://github.com/jayfoad created https://github.com/llvm/llvm-project/pull/78711 This was already done for LLVM. This patch just updates the Clang builtin handling to match. >From 8ec83bbc08c6a364efda3724d5886dbd568f956f Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Fri, 19 Jan 2024 13:34:3

[llvm] [libcxxabi] [libc] [clang-tools-extra] [libunwind] [lldb] [libcxx] [clang] [lld] [flang] [compiler-rt] Fix a bug in Smith's algorithm used in complex div. (PR #78330)

2024-01-19 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: @rjmccall thanks for the review and clarification. @andykaylor do you have any other comments about this? https://github.com/llvm/llvm-project/pull/78330 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[llvm] [clang] [AMDGPU] Remove gws feature from GFX12 (PR #78711)

2024-01-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jay Foad (jayfoad) Changes This was already done for LLVM. This patch just updates the Clang builtin handling to match. --- Full diff: https://github.com/llvm/llvm-project/pull/78711.diff 3 Files Affected: - (modified) clang/test/CodeG

[llvm] [libcxxabi] [libc] [clang-tools-extra] [libunwind] [lldb] [libcxx] [clang] [lld] [flang] [compiler-rt] Fix a bug in Smith's algorithm used in complex div. (PR #78330)

2024-01-19 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: @AaronBallman any comments about this? Thanks. https://github.com/llvm/llvm-project/pull/78330 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [clang] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-19 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/73158 >From 13a26e8e7440c3b501730b22588af393a3e543cd Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Thu, 6 Jul 2023 08:07:45 +0100 Subject: [PATCH] [VPlan] Implement cloning of VPlans. This patch implements cloning fo

[clang] CI Test - Please ignore (PR #78712)

2024-01-19 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/78712 None >From e502c00bd9f1606c82507cb1684328d187523110 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 19 Jan 2024 14:40:38 +0100 Subject: [PATCH] CI Test - Please ignore --- clang/utils/ci/buildkite

[libcxx] [clang] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-19 Thread Mital Ashok via cfe-commits
MitalAshok wrote: @cor3ntin Still waiting for Windows checks, but yes, could you merge if you please https://github.com/llvm/llvm-project/pull/77768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [libclang] Compute the right spelling location (PR #72400)

2024-01-19 Thread Sebastian Poeplau via cfe-commits
sebastianpoeplau wrote: Ping https://github.com/llvm/llvm-project/pull/72400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-19 Thread via cfe-commits
https://github.com/seranu updated https://github.com/llvm/llvm-project/pull/77918 >From 8cc2aca8ab3d7b5d244dc7f1dfd42242ee888b15 Mon Sep 17 00:00:00 2001 From: Serban Ungureanu Date: Tue, 16 Jan 2024 22:19:52 +0200 Subject: [PATCH] [clang-format] Add formatting options EmptyLinesAfterTopLevelC

[clang] [Rewrite] Fix offset computation in RemoveText (PR #73827)

2024-01-19 Thread Sebastian Poeplau via cfe-commits
sebastianpoeplau wrote: Ping https://github.com/llvm/llvm-project/pull/73827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [include-cleaner] Add --only-headers flag, opposite of --ignore-headers (PR #78714)

2024-01-19 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall created https://github.com/llvm/llvm-project/pull/78714 None >From 97276e961ffb146182712832a346b2ee5d13bc30 Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Fri, 19 Jan 2024 14:45:51 +0100 Subject: [PATCH] [include-cleaner] Add --only-headers flag, opposite of --i

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-19 Thread via cfe-commits
seranu wrote: I updated the implementation and tried to include all the feedback I received. Regarding "NewLines between IncludeGroups" I think this is a separate option that, in my opinion, would be best implemented together with "IncludeBlocksStyle::IBS_Regroup" option. @mydeveloperday I'm

[llvm] [libcxxabi] [libc] [clang-tools-extra] [libunwind] [lldb] [libcxx] [clang] [lld] [flang] [compiler-rt] Fix a bug in Smith's algorithm used in complex div. (PR #78330)

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

[libcxxabi] [libc] [compiler-rt] [flang] [llvm] [lld] [libunwind] [clang] [lldb] [clang-tools-extra] [libcxx] Fix a bug in Smith's algorithm used in complex div. (PR #78330)

2024-01-19 Thread Aaron Ballman via cfe-commits
@@ -2712,9 +2712,22 @@ static void EmitComplexRangeDiag(const Driver &D, << EnumComplexRangeToStr(Range1) << EnumComplexRangeToStr(Range2); } -static std::string RenderComplexRangeOption(std::string Range) { +static std::string +RenderComplexRangeOption(LangOptions::Co

[libcxx] [clang] [libc] [libcxxabi] [libunwind] [compiler-rt] [lld] [clang-tools-extra] [flang] [lldb] [llvm] Fix a bug in Smith's algorithm used in complex div. (PR #78330)

2024-01-19 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: I think the current changes are reasonable to land for Clang 18 so we get the fix out to users. I don't have strong opinions on pushing this down into LLVM or outlining the function like John suggested; either approach is fine by me. I think outlining

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-19 Thread via cfe-commits
https://github.com/seranu updated https://github.com/llvm/llvm-project/pull/77918 >From ae7d3b51663d60dd5365bbcb47001f964ba54456 Mon Sep 17 00:00:00 2001 From: Serban Ungureanu Date: Tue, 16 Jan 2024 22:19:52 +0200 Subject: [PATCH] [clang-format] Add formatting options EmptyLinesAfterTopLevelC

[libc] [compiler-rt] [flang] [lld] [llvm] [clang] [lldb] [clang-tools-extra] [libcxx] [AMDGPU][GFX12] VOP encoding and codegen - add support for v_cvt fp8/… (PR #78414)

2024-01-19 Thread Jay Foad via cfe-commits
jayfoad wrote: Can you add a GFX12 RUN line to clang/test/CodeGenOpenCL/builtins-amdgcn-fp8.cl? That will probably require adding "fp8-conversion-insts" to the GFX12 part of TargetParser.cpp. You can do this in a separate patch if you want. https://github.com/llvm/llvm-project/pull/78414

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-19 Thread via cfe-commits
https://github.com/seranu updated https://github.com/llvm/llvm-project/pull/77918 >From d98120c41139cc674088258599c2c3cc9f2921dd Mon Sep 17 00:00:00 2001 From: Serban Ungureanu Date: Tue, 16 Jan 2024 22:19:52 +0200 Subject: [PATCH] [clang-format] Add formatting options EmptyLinesAfterTopLevelC

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-19 Thread Aaron Ballman via cfe-commits
@@ -11801,6 +11801,26 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-19 Thread Aaron Ballman via cfe-commits
@@ -692,6 +692,13 @@ def warn_maybe_falloff_nonvoid_function : Warning< def warn_falloff_nonvoid_function : Warning< "non-void function does not return a value">, InGroup; +def warn_const_attr_with_pure_attr : Warning< + "'const' attribute imposes more restrictions, 'pure'

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-19 Thread Aaron Ballman via cfe-commits
@@ -11801,6 +11801,26 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, AaronBallman wrote: ```suggestion static

[llvm] [clang-tools-extra] [clang] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-19 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti requested changes to this pull request. I found some things that should be addressed. @PiotrZSL you had a comment about "improving readability and promoting the use of standard library functions." in `ReleaseNotes.rst`, I just want to mention that this sentence is a

[clang] [clang-tools-extra] [llvm] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

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

[clang-tools-extra] [llvm] [clang] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-19 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,143 @@ +//===--- UseStdMinMaxCheck.cpp - clang-tidy ---===// +// +// 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: Ap

[clang-tools-extra] [clang] [llvm] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-19 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,143 @@ +//===--- UseStdMinMaxCheck.cpp - clang-tidy ---===// +// +// 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: Ap

[clang-tools-extra] [llvm] [clang] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-19 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,143 @@ +//===--- UseStdMinMaxCheck.cpp - clang-tidy ---===// +// +// 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: Ap

[llvm] [clang-tools-extra] [clang] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-19 Thread Julian Schmidt via cfe-commits
@@ -56,13 +56,16 @@ #include "UniqueptrDeleteReleaseCheck.h" #include "UppercaseLiteralSuffixCheck.h" #include "UseAnyOfAllOfCheck.h" +#include "UseStdMinMaxCheck.h" namespace clang::tidy { namespace readability { class ReadabilityModule : public ClangTidyModule { publi

[llvm] [clang-tools-extra] [clang] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-19 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,143 @@ +//===--- UseStdMinMaxCheck.cpp - clang-tidy ---===// +// +// 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: Ap

[clang-tools-extra] [llvm] [clang] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-19 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,143 @@ +//===--- UseStdMinMaxCheck.cpp - clang-tidy ---===// +// +// 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: Ap

[clang] [clang-tools-extra] [llvm] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-19 Thread Julian Schmidt via cfe-commits
@@ -224,6 +224,12 @@ New checks Recommends the smallest possible underlying type for an ``enum`` or ``enum`` class based on the range of its enumerators. +- New :doc:`readability-use-std-min-max + ` check. + + Replaces certain conditional statements with equivalent ``std

[clang-tools-extra] [clang] [llvm] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-19 Thread Julian Schmidt via cfe-commits
@@ -336,6 +336,7 @@ Clang-Tidy Checks :doc:`portability-restrict-system-includes `, "Yes" :doc:`portability-simd-intrinsics `, :doc:`portability-std-allocator-const `, + :doc:`readability-use-std-min-max `, "Yes" 5chmidti wrote: Sorting, same as th

[clang] [clang-tools-extra] [llvm] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-19 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,143 @@ +//===--- UseStdMinMaxCheck.cpp - clang-tidy ---===// +// +// 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: Ap

[clang] [clang-tools-extra] [llvm] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-19 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,143 @@ +//===--- UseStdMinMaxCheck.cpp - clang-tidy ---===// +// +// 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: Ap

[llvm] [clang] [clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-19 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,143 @@ +//===--- UseStdMinMaxCheck.cpp - clang-tidy ---===// +// +// 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: Ap

[clang] [coroutine] Suppress unreachable-code warning on coroutine statements. (PR #77454)

2024-01-19 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/77454 >From 3d7d3e5e5bc613637cb019e5e370654e0c58b5cd Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 9 Jan 2024 12:29:45 +0100 Subject: [PATCH 1/2] [coroutine] Suppress unreachable-code warning on coroutine statemen

[compiler-rt] [clang] [libcxx] [libcxxabi] [libunwind] [llvm] [lldb] [lld] [libc] [clang-tools-extra] [flang] Fix a bug in Smith's algorithm used in complex div. (PR #78330)

2024-01-19 Thread Zahira Ammarguellat via cfe-commits
@@ -2712,9 +2712,22 @@ static void EmitComplexRangeDiag(const Driver &D, << EnumComplexRangeToStr(Range1) << EnumComplexRangeToStr(Range2); } -static std::string RenderComplexRangeOption(std::string Range) { +static std::string +RenderComplexRangeOption(LangOptions::Co

[clang] [llvm] Adding support of AMDLIBM vector library (PR #78560)

2024-01-19 Thread Phoebe Wang via cfe-commits
@@ -3190,10 +3190,10 @@ def fno_experimental_isel : Flag<["-"], "fno-experimental-isel">, Group, - Values<"Accelerate,libmvec,MASSV,SVML,SLEEF,Darwin_libsystem_m,ArmPL,none">, + Values<"Accelerate,libmvec,MASSV,SVML,SLEEF,Darwin_libsystem_m,ArmPL,AMDLIBM,none">, -

[compiler-rt] [clang] [llvm] [libc] [clang-tools-extra] [flang] [flang] use setsid to assign the child to prevent zombie as it will be clean up by init process (PR #77944)

2024-01-19 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm closed https://github.com/llvm/llvm-project/pull/77944 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d54dfdd - [Clang] Fix build with GCC 14 on ARM (#78704)

2024-01-19 Thread via cfe-commits
Author: Nikita Popov Date: 2024-01-19T15:19:58+01:00 New Revision: d54dfdd1b53ff72344287d250c2b67329792c840 URL: https://github.com/llvm/llvm-project/commit/d54dfdd1b53ff72344287d250c2b67329792c840 DIFF: https://github.com/llvm/llvm-project/commit/d54dfdd1b53ff72344287d250c2b67329792c840.diff

[clang] [Clang] Fix build with GCC 14 on ARM (PR #78704)

2024-01-19 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/78704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-19 Thread via cfe-commits
https://github.com/seranu updated https://github.com/llvm/llvm-project/pull/77918 >From af4bd7c1a75b1bb17cf4facde2f3caf86f01511e Mon Sep 17 00:00:00 2001 From: Serban Ungureanu Date: Tue, 16 Jan 2024 22:19:52 +0200 Subject: [PATCH] [clang-format] Add formatting options EmptyLinesAfterTopLevelC

[clang] [analyzer] Demonstrate superfluous unsigned >= 0 assumption (PR #78442)

2024-01-19 Thread via cfe-commits
NagyDonat wrote: I didn't check for potential solutions yet, I wanted to document and report this ASAP and then switch to other tasks. I think I'll leave this commit here without merging it for some time, and if I don't end up resolving this within a month, then I'll find a place for this TC i

[clang] [coroutine] Suppress unreachable-code warning on coroutine statements. (PR #77454)

2024-01-19 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/77454 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [coroutine] Suppress unreachable-code warning on coroutine statements. (PR #77454)

2024-01-19 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 requested changes to this pull request. This also disables the warning when it was actually correct. See comments. https://github.com/llvm/llvm-project/pull/77454 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [coroutine] Suppress unreachable-code warning on coroutine statements. (PR #77454)

2024-01-19 Thread Utkarsh Saxena via cfe-commits
@@ -0,0 +1,50 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -std=c++20 -fsyntax-only -verify -Wunreachable-code + +#include "Inputs/std-coroutine.h" + +extern void abort (void) __attribute__ ((__noreturn__)); + +struct task { + struct promise_type { +std::suspend_

[clang] [coroutine] Suppress unreachable-code warning on coroutine statements. (PR #77454)

2024-01-19 Thread Utkarsh Saxena via cfe-commits
@@ -60,6 +61,45 @@ static bool isTrivialDoWhile(const CFGBlock *B, const Stmt *S) { return false; } +// Check if the block starts with a coroutine statement and see if the given +// unreachable 'S' is the substmt of the coroutine statement. +// +// We suppress the unreachab

[clang] [coroutine] Suppress unreachable-code warning on coroutine statements. (PR #77454)

2024-01-19 Thread Utkarsh Saxena via cfe-commits
@@ -60,6 +61,45 @@ static bool isTrivialDoWhile(const CFGBlock *B, const Stmt *S) { return false; } +// Check if the block starts with a coroutine statement and see if the given +// unreachable 'S' is the substmt of the coroutine statement. +// +// We suppress the unreachab

[clang] [coroutine] Suppress unreachable-code warning on coroutine statements. (PR #77454)

2024-01-19 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/77454 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AST] Fix a crash on attaching doc comments (PR #78716)

2024-01-19 Thread via cfe-commits
https://github.com/chenshanzhi created https://github.com/llvm/llvm-project/pull/78716 This crash is basically caused by calling `ASTContext::getRawCommentForDeclNoCacheImp` with its input arguments `RepresentativeLocForDecl` and `CommentsInTheFile` refering to different files. A reduced repro

[clang] [Clang][AST] Fix a crash on attaching doc comments (PR #78716)

2024-01-19 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 i

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-19 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From fb05243d0c0c3702b1615239a9337df337ad0c7c Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 01/10] add warning and test --- clang/include/clang/Basic/Diagnostic

[clang] [Clang][AST] Fix a crash on attaching doc comments (PR #78716)

2024-01-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shanzhi (chenshanzhi) Changes This crash is basically caused by calling `ASTContext::getRawCommentForDeclNoCacheImp` with its input arguments `RepresentativeLocForDecl` and `CommentsInTheFile` refering to different files. A reduced reprod

[clang] ed12388 - [AMDGPU] Do not emit `V_DOT2C_F32_F16_e32` on GFX12 (#78709)

2024-01-19 Thread via cfe-commits
Author: Jay Foad Date: 2024-01-19T14:36:27Z New Revision: ed123880826cd9a4acdcd05409b1fac4203a436a URL: https://github.com/llvm/llvm-project/commit/ed123880826cd9a4acdcd05409b1fac4203a436a DIFF: https://github.com/llvm/llvm-project/commit/ed123880826cd9a4acdcd05409b1fac4203a436a.diff LOG: [AMD

[llvm] [clang] [AMDGPU] Do not emit `V_DOT2C_F32_F16_e32` on GFX12 (PR #78709)

2024-01-19 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed https://github.com/llvm/llvm-project/pull/78709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [clang-tools-extra] [mlir] [libcxx] [libunwind] [openmp] [libcxxabi] [flang] [libc] [clang] [lld] [llvm] [lldb] [clang] static operators should evaluate object argument (PR #68485)

2024-01-19 Thread via cfe-commits
cor3ntin wrote: @SuperSodaSea I can merge this for you if both @MitalAshok and @shafik are happy with it! https://github.com/llvm/llvm-project/pull/68485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang-tools-extra] [libcxx] [libunwind] [llvm] [libcxxabi] [flang] [libc] [compiler-rt] [lld] [clang] [lldb] Fix a bug in Smith's algorithm used in complex div. (PR #78330)

2024-01-19 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/78330 >From 8f8917528e30d2ba67f669cfd1a893bc85c21121 Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Tue, 16 Jan 2024 11:24:03 -0800 Subject: [PATCH 1/5] Fixed a bug in Smith's algorithm and made sure last option i

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-19 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From fb05243d0c0c3702b1615239a9337df337ad0c7c Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 01/11] add warning and test --- clang/include/clang/Basic/Diagnostic

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-19 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From fb05243d0c0c3702b1615239a9337df337ad0c7c Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 01/12] add warning and test --- clang/include/clang/Basic/Diagnostic

[llvm] [clang-tools-extra] [clang] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-19 Thread Bhuminjay Soni via cfe-commits
11happy wrote: > I found some things that should be addressed. > > @PiotrZSL you had a comment about "improving readability and promoting the > use of standard library functions." in `ReleaseNotes.rst`, I just want to > mention that this sentence is also present in the header and check > docu

[clang] [clang-tools-extra] [llvm] [lld] [lld][AArch64][ELF][PAC] Support AUTH relocations and AUTH ELF marking (PR #72714)

2024-01-19 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: @MaskRay A kind reminder regarding the PR https://github.com/llvm/llvm-project/pull/72714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AST] Fix a crash on attaching doc comments (PR #78716)

2024-01-19 Thread via cfe-commits
https://github.com/chenshanzhi edited https://github.com/llvm/llvm-project/pull/78716 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [mlir] [llvm] [compiler-rt] [clang] [asan] Enable StackSafetyAnalysis by default (PR #77210)

2024-01-19 Thread Ulrich Weigand via cfe-commits
uweigand wrote: @MaskRay I've done a bit more analysis now, and what seems to be going on is that with stack safety analysis off, this check: ``` char array[len]; assert(!(reinterpret_cast(array) & 31L)); ``` succeeds because the VLA allocation gets instrumented, and therefore the VLA addre

[llvm] [clang] [docs] Add llvm and clang release notes for the global-var code model attribute (PR #78664)

2024-01-19 Thread via cfe-commits
https://github.com/heiher updated https://github.com/llvm/llvm-project/pull/78664 >From ccb95a2f40e94ab773dd8897dd287dba7a38 Mon Sep 17 00:00:00 2001 From: WANG Rui Date: Fri, 19 Jan 2024 11:13:39 +0800 Subject: [PATCH 1/3] [docs] Add llvm and clang release notes for the global-var code mo

[llvm] [clang] [docs] Add llvm and clang release notes for the global-var code model attribute (PR #78664)

2024-01-19 Thread via cfe-commits
@@ -1119,6 +1119,14 @@ Windows Support LoongArch Support ^ +- Added a code model attribute for the global variable. The following values heiher wrote: Thanks. https://github.com/llvm/llvm-project/pull/78664 ___

[clang] [Clang] Refactor diagnostics for SME builtins. (PR #78258)

2024-01-19 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm updated https://github.com/llvm/llvm-project/pull/78258 >From 545866d530ebeab04384ce85e61a7eb29d343167 Mon Sep 17 00:00:00 2001 From: Sander de Smalen Date: Mon, 15 Jan 2024 16:06:36 + Subject: [PATCH 1/2] [Clang] Refactor diagnostics for SME builtins. The

[clang] [Clang] Refactor diagnostics for SME builtins. (PR #78258)

2024-01-19 Thread Sander de Smalen via cfe-commits
@@ -1720,21 +1720,29 @@ void SVEEmitter::createBuiltinZAState(raw_ostream &OS) { for (auto *R : RV) createIntrinsic(R, Defs); - std::map> DefsZAState; - - uint64_t IsSharedZAFlag = getEnumValueForFlag("IsSharedZA"); + std::map> IntrinsicsPerState; for (auto &Def :

[clang] [Clang] Refactor diagnostics for SME builtins. (PR #78258)

2024-01-19 Thread Sander de Smalen via cfe-commits
@@ -3005,6 +3005,15 @@ enum ArmStreamingType { ArmStreamingOrSVE2p1 }; +enum ArmSMEState : unsigned { + ArmNoState = 0, + + ArmInZA = 0b01, + ArmOutZA = 0b10, + ArmInOutZA = 0b11, + ArmZAMask = 0b11, sdesmalen-arm wrote: I'm not really convinced that's

[clang] [Clang] Refactor diagnostics for SME builtins. (PR #78258)

2024-01-19 Thread Sander de Smalen via cfe-commits
@@ -342,331 +342,331 @@ let TargetGuard = "sme2" in { // let TargetGuard = "sme2" in { - def SVSMOPA : Inst<"svmopa_za32[_{d}]_m", "viPPdd", "s", MergeNone, "aarch64_sme_smopa_za32", [IsSharedZA, IsStreaming], [ImmCheck<0, ImmCheck0_3>]>; - def SVUSMOPA : Inst<"svmopa_za3

[clang] [Clang] Refactor diagnostics for SME builtins. (PR #78258)

2024-01-19 Thread Sander de Smalen via cfe-commits
@@ -342,331 +342,331 @@ let TargetGuard = "sme2" in { // let TargetGuard = "sme2" in { - def SVSMOPA : Inst<"svmopa_za32[_{d}]_m", "viPPdd", "s", MergeNone, "aarch64_sme_smopa_za32", [IsSharedZA, IsStreaming], [ImmCheck<0, ImmCheck0_3>]>; - def SVUSMOPA : Inst<"svmopa_za3

[clang] [Clang] Refactor diagnostics for SME builtins. (PR #78258)

2024-01-19 Thread Sander de Smalen via cfe-commits
@@ -136,10 +136,10 @@ defm SVWRITE_ZA128 : ZAWrite<"za128", "csilUcUsUiUlhbfd", "aarch64_sme_writeq", let TargetGuard = "sme" in { def SVZERO_MASK_ZA : SInst<"svzero_mask_za", "vi", "", MergeNone, "aarch64_sme_zero", - [IsOverloadNone, IsStreami

[clang] [Clang][Sema] Allow elaborated-type-specifiers that declare member class template explict specializations (PR #78720)

2024-01-19 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/78720 According to [[dcl.type.elab] p2](http://eel.is/c++draft/dcl.type.elab#2): > If an > [elaborated-type-specifier](http://eel.is/c++draft/dcl.type.elab#nt:elaborated-type-specifier) > is the sole constituent of

[clang] [Clang][Sema] Allow elaborated-type-specifiers that declare member class template explict specializations (PR #78720)

2024-01-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-modules Author: Krystian Stasiowski (sdkrystian) Changes According to [[dcl.type.elab] p2](http://eel.is/c++draft/dcl.type.elab#2): > If an [elaborated-type-specifier](http://eel.is/c++draft/dcl.type.elab#nt:elaborated-t

[clang] [Clang][Sema] Allow elaborated-type-specifiers that declare member class template explict specializations (PR #78720)

2024-01-19 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/78720 >From 99823bcb04c5c6a1ab33ea3e75829eae5a76de14 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 19 Jan 2024 08:37:21 -0500 Subject: [PATCH] [Clang][Sema] Allow elaborated-type-specifiers that decl

[clang] [clang-tools-extra] [compiler-rt] [PGO] Reland PGO's Counter Reset and File Dumping APIs #76471 (PR #78285)

2024-01-19 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Ok I think I have a good theory on why these tests are failing. Most likely the test machine does not have the latest `lld` during the test. If we build `lld` together with the project, these tests pass. https://github.com/llvm/llvm-project/pull/78285

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-19 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From fb05243d0c0c3702b1615239a9337df337ad0c7c Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 01/13] add warning and test --- clang/include/clang/Basic/Diagnostic

[clang-tools-extra] [clang] [llvm] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-19 Thread Julian Schmidt via cfe-commits
5chmidti wrote: > It currently handles this case: > > ``` > if (value1 < value2) > value = value2; > else > value = value1; > ``` When I add ```c++ if (value1 < value2) value3 = value2; else value3 = value1; ``` (just renamed `value` to `value3`) to the tests, the check does no

[clang-tools-extra] [clang] [llvm] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-19 Thread Bhuminjay Soni via cfe-commits
11happy wrote: > > It currently handles this case: > > ``` > > if (value1 < value2) > > value = value2; > > else > > value = value1; > > ``` > > When I add > > ```c++ > if (value1 < value2) > value3 = value2; > else > value3 = value1; > ``` > > (just renamed `value` to `value3`

[clang] [Clang] Refactor diagnostics for SME builtins. (PR #78258)

2024-01-19 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau approved this pull request. https://github.com/llvm/llvm-project/pull/78258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Refactor diagnostics for SME builtins. (PR #78258)

2024-01-19 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau edited https://github.com/llvm/llvm-project/pull/78258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Refactor diagnostics for SME builtins. (PR #78258)

2024-01-19 Thread Matthew Devereau via cfe-commits
@@ -136,10 +136,10 @@ defm SVWRITE_ZA128 : ZAWrite<"za128", "csilUcUsUiUlhbfd", "aarch64_sme_writeq", let TargetGuard = "sme" in { def SVZERO_MASK_ZA : SInst<"svzero_mask_za", "vi", "", MergeNone, "aarch64_sme_zero", - [IsOverloadNone, IsStreami

[clang] [Clang][Sema] Diagnose use of template keyword after declarative nested-name-specifiers (PR #78595)

2024-01-19 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/78595 >From c07119d8e85e4bd9849e8d0b5dc8edb5384d9b91 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 17 Jan 2024 10:13:29 -0500 Subject: [PATCH] [Clang][Sema] Diagnose use of template keyword after de

[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-01-19 Thread Sander de Smalen via cfe-commits
@@ -814,6 +821,42 @@ Address AArch64ABIInfo::EmitMSVAArg(CodeGenFunction &CGF, Address VAListAddr, /*allowHigherAlign*/ false); } +void AArch64TargetCodeGenInfo::checkFunctionCallABI( +CodeGenModule &CGM, SourceLocation CallLoc, const FunctionDec

[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-01-19 Thread Sander de Smalen via cfe-commits
@@ -814,6 +821,42 @@ Address AArch64ABIInfo::EmitMSVAArg(CodeGenFunction &CGF, Address VAListAddr, /*allowHigherAlign*/ false); } +void AArch64TargetCodeGenInfo::checkFunctionCallABI( +CodeGenModule &CGM, SourceLocation CallLoc, const FunctionDec

[llvm] [clang] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-01-19 Thread Sander de Smalen via cfe-commits
sdesmalen-arm wrote: It seems wrong to move the header files to llvm/include/llvm/Support, but to leave the implementation in llvm/lib/AArch64 (which ends up in a different library). If you move the corresponding .cpp file to llvm/lib/Support then you don't n

[llvm] [clang] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-01-19 Thread Sander de Smalen via cfe-commits
sdesmalen-arm wrote: > > Separately, it's probably worth ensuring that the LLVM inlining passes > > don't actually perform illegal inlining for functions marked always_inline; > > looking at the code, it looks like we might end up skipping the relevant > > checks. > > The `TargetTransformInfo

[clang] [Clang][Sema] Diagnose use of template keyword after declarative nested-name-specifiers (PR #78595)

2024-01-19 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/78595 >From f72b5e65817e9c25ec0fcabbf0a6bf684066a046 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 17 Jan 2024 10:13:29 -0500 Subject: [PATCH] [Clang][Sema] Diagnose use of template keyword after de

[clang-tools-extra] [llvm] [compiler-rt] [clang] Make clang report invalid target versions for all environment types. (PR #78655)

2024-01-19 Thread Paul T Robinson via cfe-commits
@@ -1,7 +1,7 @@ // RUN: %clang -x c -ffixed-point -S -emit-llvm -o - %s | FileCheck %s -// RUN: %clang -x c -ffixed-point -S -emit-llvm -o - --target=x86_64-scei-ps4-ubuntu-fast %s | FileCheck %s pogo59 wrote: Thanks for tagging me. These are definitely invalid

[clang] [Clang][Sema] Diagnose use of template keyword after declarative nested-name-specifiers (PR #78595)

2024-01-19 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/78595 >From f72b5e65817e9c25ec0fcabbf0a6bf684066a046 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 17 Jan 2024 10:13:29 -0500 Subject: [PATCH 1/2] [Clang][Sema] Diagnose use of template keyword after

<    1   2   3   4   5   6   >