[clang] [clang] Fix sorting module headers (PR #73146)

2023-11-23 Thread David Blaikie via cfe-commits
dwblaikie wrote: > OK. I modified this PR in order to only make the changes that fix #73145 . > Sorting will remain broken as it has been since 2021. I will provide another > PR after this one gets merged. Thanks, really appreciate your patience/understanding here - I know it's a bit of a

[clang] [clang] Fix sorting module headers (PR #73146)

2023-11-23 Thread David Blaikie via cfe-commits
https://github.com/dwblaikie approved this pull request. Sounds reasonable to me, thanks! https://github.com/llvm/llvm-project/pull/73146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Print static_assert values of arithmetic binary operators (PR #71671)

2023-11-23 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/71671 >From a4db205a672220282735af1c7fcee1b47b334dd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 8 Nov 2023 13:32:41 +0100 Subject:

[clang] d80e46d - [RISCV] Support target attribute for function

2023-11-23 Thread Piyou Chen via cfe-commits
Author: Piyou Chen Date: 2023-11-23T23:05:21-08:00 New Revision: d80e46da7d20645afd7b751a4e6cba9837addcb4 URL: https://github.com/llvm/llvm-project/commit/d80e46da7d20645afd7b751a4e6cba9837addcb4 DIFF: https://github.com/llvm/llvm-project/commit/d80e46da7d20645afd7b751a4e6cba9837addcb4.diff

[clang] [clang][ASTImporter] IdentifierInfo of Attribute should be set using 'ToASTContext' (PR #73290)

2023-11-23 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/73290 >From a29523ed19ccb36554ea7ad2597631da26d8baaa Mon Sep 17 00:00:00 2001 From: huqizhi Date: Fri, 24 Nov 2023 13:55:45 +0800 Subject: [PATCH] [clang][ASTImporter] IdentifierInfo of Attribute should be set using

[clang] [clang][ASTImporter] IdentifierInfo of Attribute should be set using 'ToASTContext' (PR #73290)

2023-11-23 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/73290 >From 52b972fd84877793fa8099cfb0b5d934c39e5925 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Fri, 24 Nov 2023 13:55:45 +0800 Subject: [PATCH] [clang][ASTImporter] IdentifierInfo of Attribute should be set using

[clang] [clang][ASTImporter] IdentifierInfo of Attribute should be set using 'ToASTContext' (PR #73290)

2023-11-23 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/73290 >From 150993c21943203d3fd116c3a0456eaea81008de Mon Sep 17 00:00:00 2001 From: huqizhi Date: Fri, 24 Nov 2023 13:55:45 +0800 Subject: [PATCH] [clang][ASTImporter] IdentifierInfo of Attribute should be set using

[clang] [clang-tools-extra] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-23 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: @@ -0,0 +1,109 @@ +//===--- RedundantInlineSpecifierCheck.cpp - clang-tidy===//

[clang] [clang-tools-extra] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-23 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: @@ -0,0 +1,109 @@ +//===--- RedundantInlineSpecifierCheck.cpp - clang-tidy===//

[clang] [clang-tools-extra] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-23 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: @@ -0,0 +1,109 @@ +//===--- RedundantInlineSpecifierCheck.cpp - clang-tidy===//

[clang] [clang-tools-extra] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-23 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: @@ -0,0 +1,109 @@ +//===--- RedundantInlineSpecifierCheck.cpp - clang-tidy===//

[clang] [clang-tools-extra] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-23 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: @@ -0,0 +1,110 @@ +// RUN: %check_clang_tidy %s readability-redundant-inline-specifier %t + +template

[clang-tools-extra] [clang] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-23 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: @@ -0,0 +1,109 @@ +//===--- RedundantInlineSpecifierCheck.cpp - clang-tidy===//

[clang] [clang-tools-extra] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-23 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: @@ -0,0 +1,109 @@ +//===--- RedundantInlineSpecifierCheck.cpp - clang-tidy===//

[clang] [clang][ASTImporter] IdentifierInfo of Attribute should be set using 'ToASTContext' (PR #73290)

2023-11-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Qizhi Hu (jcsxky) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/73290.diff 3 Files Affected: - (modified) clang/include/clang/Basic/AttributeCommonInfo.h (+1) - (modified) clang/lib/AST/ASTImporter.cpp (+5-2) -

[clang] [clang][ASTImporter] IdentifierInfo of Attribute should be set using 'ToASTContext' (PR #73290)

2023-11-23 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/73290 None >From cc883836b0c24368a7a438873cec2229776323da Mon Sep 17 00:00:00 2001 From: huqizhi Date: Fri, 24 Nov 2023 13:55:45 +0800 Subject: [PATCH] [clang][ASTImporter] IdentifierInfo of Attribute should be set

[clang] [clang][AST][ASTMerge] prevent AST nodes from being deallocated early (PR #73096)

2023-11-23 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/73096 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST][ASTMerge] prevent AST nodes from being deallocated early (PR #73096)

2023-11-23 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > You have found that reason for the crash is that references to > `IdentifierInfo` are remaining in `OnDiskChainedHashTableGenerator` and > previously deallocated by `ASTUnit` destruction? In this case why is the > `ASTUnit` (or something in it, probably `ASTContext`) the owner

[clang] [Driver] Support -mcmodel= for LoongArch (PR #72514)

2023-11-23 Thread Lu Weining via cfe-commits
https://github.com/SixWeining updated https://github.com/llvm/llvm-project/pull/72514 >From 8dd5bebcd4681e5e7849743aba0ce90c2959ee23 Mon Sep 17 00:00:00 2001 From: Weining Lu Date: Thu, 16 Nov 2023 21:57:03 +0800 Subject: [PATCH 1/2] [Driver] Support -mcmodel= for LoongArch 7e42545 rejects

[flang] [libcxx] [lld] [clang] [llvm] [compiler-rt] [libc] Fix ISel crash when lowering BUILD_VECTOR (PR #73186)

2023-11-23 Thread David Li via cfe-commits
@@ -7254,6 +7255,10 @@ static SDValue lowerBuildVectorAsBroadcast(BuildVectorSDNode *BVOp, EVT CVT = Ld.getValueType(); assert(!CVT.isVector() && "Must not broadcast a vector type"); +// 512 bit vpbroadcastw is only available with AVX512BW +if (ScalarSize ==

[clang] [Driver] Support -mcmodel= for LoongArch (PR #72514)

2023-11-23 Thread Lu Weining via cfe-commits
SixWeining wrote: > [gcc.gnu.org/onlinedocs/gcc/LoongArch-Options.html](https://gcc.gnu.org/onlinedocs/gcc/LoongArch-Options.html) > says > > ‘large (Not implemented yet)’ ‘extreme’ This mode does not limit the size of > the code segment and data segment. The -mcmodel=extreme option is >

[clang-tools-extra] [llvm] [RISCV][Zba] Optimize mul with SH*ADD (PR #68144)

2023-11-23 Thread Alexandr Lekomtsev via cfe-commits
https://github.com/vacma updated https://github.com/llvm/llvm-project/pull/68144 >From 64e5deade92206cd04f86e0665a482ea78d0f3bf Mon Sep 17 00:00:00 2001 From: Alexandr Date: Sun, 1 Oct 2023 19:57:01 +0300 Subject: [PATCH 1/3] [RISCV][Zba] Optimize mul with SH*ADD Optimized multiplication

[clang] [clang] Add missing LinkageSpec case to getCursorKindForDecl (PR #72401)

2023-11-23 Thread Shivam Gupta via cfe-commits
https://github.com/xgupta approved this pull request. It looks good to me, maybe we need a release note change as a formal practice. https://github.com/llvm/llvm-project/pull/72401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-23 Thread via cfe-commits
=?utf-8?q?F=C3=A9lix-Antoine?= Constantin, =?utf-8?q?F=C3=A9lix-Antoine?= Constantin, =?utf-8?q?F=C3=A9lix-Antoine?= Constantin, =?utf-8?q?F=C3=A9lix-Antoine?= Constantin Message-ID: In-Reply-To: @@ -0,0 +1,25 @@ +.. title:: clang-tidy - readability-redundant-inline-specifier +

[clang-tools-extra] [clang] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-23 Thread via cfe-commits
=?utf-8?q?F=C3=A9lix-Antoine?= Constantin, =?utf-8?q?F=C3=A9lix-Antoine?= Constantin, =?utf-8?q?F=C3=A9lix-Antoine?= Constantin, =?utf-8?q?F=C3=A9lix-Antoine?= Constantin Message-ID: In-Reply-To: https://github.com/EugeneZelenko requested changes to this pull request.

[clang] [clang-tools-extra] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-23 Thread via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: https://github.com/EugeneZelenko edited https://github.com/llvm/llvm-project/pull/73069

[llvm] [clang] [flang] [libc] [compiler-rt] [libcxx] [clang-tools-extra] [clang][cleanup] simplify ReachableCode scanFromBlock (PR #72257)

2023-11-23 Thread via cfe-commits
@@ -341,30 +341,27 @@ static unsigned scanFromBlock(const CFGBlock *Start, // This allows us to potentially uncover some "always unreachable" code // within the "sometimes unreachable" code. // Look at the successors and mark then reachable. -std::optional

[llvm] [clang] [flang] [libc] [compiler-rt] [libcxx] [clang-tools-extra] [clang][cleanup] simplify ReachableCode scanFromBlock (PR #72257)

2023-11-23 Thread via cfe-commits
https://github.com/thyecust updated https://github.com/llvm/llvm-project/pull/72257 >From 52b0204fec8394f9c2cfaeb3cc4f28e5d4c16170 Mon Sep 17 00:00:00 2001 From: thyecust Date: Tue, 14 Nov 2023 21:51:55 +0800 Subject: [PATCH 1/4] Update ReachableCode.cpp ---

[llvm] [clang] [flang] [libc] [compiler-rt] [libcxx] [clang-tools-extra] [clang][cleanup] simplify ReachableCode scanFromBlock (PR #72257)

2023-11-23 Thread via cfe-commits
https://github.com/thyecust updated https://github.com/llvm/llvm-project/pull/72257 >From 52b0204fec8394f9c2cfaeb3cc4f28e5d4c16170 Mon Sep 17 00:00:00 2001 From: thyecust Date: Tue, 14 Nov 2023 21:51:55 +0800 Subject: [PATCH 1/4] Update ReachableCode.cpp ---

[llvm] [clang] [flang] [libc] [compiler-rt] [libcxx] [clang-tools-extra] [clang][cleanup] simplify ReachableCode scanFromBlock (PR #72257)

2023-11-23 Thread via cfe-commits
@@ -341,30 +341,27 @@ static unsigned scanFromBlock(const CFGBlock *Start, // This allows us to potentially uncover some "always unreachable" code // within the "sometimes unreachable" code. // Look at the successors and mark then reachable. -std::optional

[compiler-rt] [flang] [llvm] [libc] [libcxx] [clang] [clang-tools-extra] [clang][cleanup] simplify ReachableCode scanFromBlock (PR #72257)

2023-11-23 Thread Gábor Horváth via cfe-commits
@@ -341,30 +341,27 @@ static unsigned scanFromBlock(const CFGBlock *Start, // This allows us to potentially uncover some "always unreachable" code // within the "sometimes unreachable" code. // Look at the successors and mark then reachable. -std::optional

[clang] [analyzer] Use AllocaRegion in MallocChecker (PR #72402)

2023-11-23 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: I think the original `alloca(0)` warning message might be clearer/easier to understand. While it might have platform or compiler dependent meaning, those behaviors are non-portable, so I think it is undesirable in most cases and people probably want to be notified about it.

[clang] [clang][analyzer] Support `fprintf` in the SecuritySyntaxChecker (PR #73247)

2023-11-23 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: This is unrelated to this particular patch, but it would be great if this checker would also give suggestions what other functions should be used instead. https://github.com/llvm/llvm-project/pull/73247 ___ cfe-commits mailing list

[clang] [clang][analyzer] Support `fprintf` in the SecuritySyntaxChecker (PR #73247)

2023-11-23 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/73247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Move `security.cert.env.InvalidPtr` out of `alpha` (PR #71912)

2023-11-23 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/71912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Switch to PostStmt callbacks in ArrayBoundV2 (PR #72107)

2023-11-23 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: Note that [idx] is perfectly valid code when `idx == number of elements`. And it is relatively common to do that when one is using STL algorithms on arrays: ``` auto it = std::find([0], [size], foo); ``` Of course, one could use the `begin/end` free functions, but those are

[llvm] [clang-tools-extra] [SimplifyCFG] Find the minimal table considering overflow in `switchToLookupTable` (PR #67885)

2023-11-23 Thread via cfe-commits
@@ -6519,17 +6518,55 @@ static bool SwitchToLookupTable(SwitchInst *SI, IRBuilder<> , SmallDenseMap ResultTypes; SmallVector PHIs; - for (SwitchInst::CaseIt E = SI->case_end(); CI != E; ++CI) { -ConstantInt *CaseVal = CI->getCaseValue(); -if

[clang] [clang-tools-extra] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-23 Thread Félix-Antoine Constantin via cfe-commits
@@ -0,0 +1,99 @@ +//===--- RedundantInlineSpecifierCheck.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. +//

[clang] [clang-tools-extra] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-23 Thread Félix-Antoine Constantin via cfe-commits
https://github.com/felix642 updated https://github.com/llvm/llvm-project/pull/73069 From 89281ccb5354e3d6349d10e6f9446194d2d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix-Antoine=20Constantin?= Date: Thu, 16 Nov 2023 22:03:15 -0500 Subject: [PATCH 1/5]

[clang] [analyzer] Switch to PostStmt callbacks in ArrayBoundV2 (PR #72107)

2023-11-23 Thread Gábor Horváth via cfe-commits
@@ -34,20 +34,37 @@ using llvm::formatv; namespace { enum OOB_Kind { OOB_Precedes, OOB_Exceeds, OOB_Taint }; -class ArrayBoundCheckerV2 : -public Checker { +struct Messages { + std::string Short, Full; +}; + +class ArrayBoundCheckerV2 : public Checker, +

[clang-tools-extra] [clang] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-23 Thread Félix-Antoine Constantin via cfe-commits
@@ -0,0 +1,99 @@ +//===--- RedundantInlineSpecifierCheck.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. +//

[clang-tools-extra] [clang] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-23 Thread Félix-Antoine Constantin via cfe-commits
https://github.com/felix642 updated https://github.com/llvm/llvm-project/pull/73069 From 89281ccb5354e3d6349d10e6f9446194d2d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix-Antoine=20Constantin?= Date: Thu, 16 Nov 2023 22:03:15 -0500 Subject: [PATCH 1/4]

[clang-tools-extra] [clang] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-23 Thread via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: 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

[clang-tools-extra] [clang] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-23 Thread Félix-Antoine Constantin via cfe-commits
https://github.com/felix642 updated https://github.com/llvm/llvm-project/pull/73069 From 89281ccb5354e3d6349d10e6f9446194d2d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix-Antoine=20Constantin?= Date: Thu, 16 Nov 2023 22:03:15 -0500 Subject: [PATCH 1/3]

[clang] [clang-tools-extra] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-23 Thread Félix-Antoine Constantin via cfe-commits
@@ -0,0 +1,99 @@ +//===--- RedundantInlineSpecifierCheck.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. +//

[lld] [clang] [libcxx] [llvm] [libc] [compiler-rt] [flang] Fix ISel crash when lowering BUILD_VECTOR (PR #73186)

2023-11-23 Thread David Li via cfe-commits
@@ -7254,6 +7255,10 @@ static SDValue lowerBuildVectorAsBroadcast(BuildVectorSDNode *BVOp, EVT CVT = Ld.getValueType(); assert(!CVT.isVector() && "Must not broadcast a vector type"); +// 512 bit vpbroadcastw is only available with AVX512BW +if (ScalarSize ==

[libcxxabi] [libunwind] [libcxx] [libunwind][libc++][libc++abi] Add cross-compilation flags to tests (PR #67201)

2023-11-23 Thread Louis Dionne via cfe-commits
ldionne wrote: Closing since it seems we don't want to pursue this anymore, since `@CMAKE_CXX_FLAGS_INIT@` are flags for the library build, not necessarily for the tests to use. https://github.com/llvm/llvm-project/pull/67201 ___ cfe-commits mailing

[libcxx] [libunwind] [libcxxabi] [libunwind][libc++][libc++abi] Add cross-compilation flags to tests (PR #67201)

2023-11-23 Thread Louis Dionne via cfe-commits
https://github.com/ldionne closed https://github.com/llvm/llvm-project/pull/67201 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-23 Thread via cfe-commits
@@ -0,0 +1,80 @@ +#ifndef PPC_FEATURE diggerlin wrote: we will support these feature in AIX OS soon. can we change `PPC_FEATURE` to `PPC_LINUX_FEATURE` and `PPC_CPU` to `PPC_LINUX_CPU` and when implement the __builtin_cpu_is and __builtin_cpu_supports in AIX

[clang] fix: C++ empty record with align lead to va_list out of sync (PR #72197)

2023-11-23 Thread John McCall via cfe-commits
@@ -307,7 +307,12 @@ AArch64ABIInfo::classifyArgumentType(QualType Ty, bool IsVariadic, // 0. if (IsEmpty && Size == 0) return ABIArgInfo::getIgnore(); -return ABIArgInfo::getDirect(llvm::Type::getInt8Ty(getVMContext())); +// An empty struct can have

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-23 Thread Andrzej Warzyński via cfe-commits
@@ -0,0 +1,8 @@ +#include + +int main(int argc, char * argv[]) { +// Irrelevant what to do in here. +// Test is supposed to fail at link time. +printf("Hello from C [%s]\n", __FUNCTION__); banach-space wrote: Note that if you remove this line and

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-23 Thread Andrzej Warzyński via cfe-commits
@@ -0,0 +1,13 @@ +! RUN: %clang -x c -o %t.c-part -c %s.c-part banach-space wrote: That's a shame - thanks for checking. One alternative would be to add LLVM IR instead of a C file, but LLVM IR is not stable. Though a plain function definition should be fairly

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-23 Thread Andrzej Warzyński via cfe-commits
@@ -0,0 +1,15 @@ +! UNSUPPORTED: system-windows + +! RUN: %clang -o %t.c-object -c %S/Inputs/main_dupes.c banach-space wrote: Check: * https://github.com/llvm/llvm-project/blob/main/flang/test/lit.site.cfg.py.in#L24, and *

[clang] [clang] Avoid memcopy for small structure with padding under -ftrivial-auto-var-init (PR #71677)

2023-11-23 Thread Florian Hahn via cfe-commits
fhahn wrote: @serge-sans-paille those test failures were also highlighted by the precommit checks, would be good to check those before landing https://github.com/llvm/llvm-project/pull/71677 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Avoid memcopy for small structure with padding under -ftrivial-auto-var-init (PR #71677)

2023-11-23 Thread Florian Hahn via cfe-commits
fhahn wrote: Reverted the change for now, as many build bots have been red due to the test failures https://github.com/llvm/llvm-project/pull/71677 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] 419a4e4 - Revert "[clang] Avoid memcopy for small structure with padding under -ftrivial-auto-var-init (#71677)"

2023-11-23 Thread Florian Hahn via cfe-commits
Author: Florian Hahn Date: 2023-11-23T20:18:55Z New Revision: 419a4e41fc36a91999da6cbe06d430cac07224f1 URL: https://github.com/llvm/llvm-project/commit/419a4e41fc36a91999da6cbe06d430cac07224f1 DIFF: https://github.com/llvm/llvm-project/commit/419a4e41fc36a91999da6cbe06d430cac07224f1.diff LOG:

[clang] [clang] Refactor TBAA Base Info construction (PR #70499)

2023-11-23 Thread Nathan Sidwell via cfe-commits
https://github.com/urnathan closed https://github.com/llvm/llvm-project/pull/70499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Avoid recalculating TBAA base type info (PR #73264)

2023-11-23 Thread Nathan Sidwell via cfe-commits
https://github.com/urnathan created https://github.com/llvm/llvm-project/pull/73264 I noticed that TBAA BaseTypeMetadataCache can legitimately store null values, but it also uses that to mean 'no entry'. Thus nullptr entries get continually recalculated. (AFAICT null entries can never become

[clang] [clang][NFC] Adjust TBAA Base Info API (PR #73263)

2023-11-23 Thread Nathan Sidwell via cfe-commits
https://github.com/urnathan created https://github.com/llvm/llvm-project/pull/73263 I noticed a couple of minor issues with CodeGenTBAA::getBaseTypeInfo. 1) isValidBaseType explicitly checks for a reference type to return false, but then also returns false for all non-record types. Just

[llvm] [clang-tools-extra] [PowerPC] Implement llvm.set.rounding intrinsic (PR #67302)

2023-11-23 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff edited https://github.com/llvm/llvm-project/pull/67302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [PowerPC] Implement llvm.set.rounding intrinsic (PR #67302)

2023-11-23 Thread Serge Pavlov via cfe-commits
@@ -8900,6 +8900,83 @@ SDValue PPCTargetLowering::LowerINT_TO_FP(SDValue Op, return FP; } +SDValue PPCTargetLowering::LowerSET_ROUNDING(SDValue Op, + SelectionDAG ) const { + SDLoc Dl(Op); + MachineFunction =

[clang-tools-extra] [llvm] [PowerPC] Implement llvm.set.rounding intrinsic (PR #67302)

2023-11-23 Thread Serge Pavlov via cfe-commits
@@ -8900,6 +8900,83 @@ SDValue PPCTargetLowering::LowerINT_TO_FP(SDValue Op, return FP; } +SDValue PPCTargetLowering::LowerSET_ROUNDING(SDValue Op, + SelectionDAG ) const { + SDLoc Dl(Op); + MachineFunction =

[clang-tools-extra] [llvm] [PowerPC] Implement llvm.set.rounding intrinsic (PR #67302)

2023-11-23 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff commented: The patch looks good but I am not familiar with PPC instructions enough. Could you please run the runtime tests from here: https://github.com/llvm/llvm-test-suite/tree/main/MultiSource/UnitTests/Float/rounding? You just need to build application from two

[clang-tools-extra] [llvm] [PowerPC] Implement llvm.set.rounding intrinsic (PR #67302)

2023-11-23 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff edited https://github.com/llvm/llvm-project/pull/67302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[ClangRepl] Type Directed Code Completion" (PR #73259)

2023-11-23 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev closed https://github.com/llvm/llvm-project/pull/73259 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9ebe6e2 - Revert "[ClangRepl] Type Directed Code Completion" (#73259)

2023-11-23 Thread via cfe-commits
Author: Fred Fu Date: 2023-11-23T21:07:51+02:00 New Revision: 9ebe6e28cdbe97f6c03209b87e91be6b55a8026a URL: https://github.com/llvm/llvm-project/commit/9ebe6e28cdbe97f6c03209b87e91be6b55a8026a DIFF: https://github.com/llvm/llvm-project/commit/9ebe6e28cdbe97f6c03209b87e91be6b55a8026a.diff LOG:

[clang] Revert "[ClangRepl] Type Directed Code Completion" (PR #73259)

2023-11-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Fred Fu (capfredf) Changes Reverts llvm/llvm-project#67349 --- Patch is 24.17 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/73259.diff 6 Files Affected: - (modified)

[clang] Revert "[ClangRepl] Type Directed Code Completion" (PR #73259)

2023-11-23 Thread Fred Fu via cfe-commits
capfredf wrote: @vgvassilev https://github.com/llvm/llvm-project/pull/73259 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Print static_assert values of arithmetic binary operators (PR #71671)

2023-11-23 Thread via cfe-commits
@@ -17219,10 +17219,10 @@ static bool UsefulToPrintExpr(const Expr *E) { if (const auto *UnaryOp = dyn_cast(E)) return UsefulToPrintExpr(UnaryOp->getSubExpr()); - // Ignore nested binary operators. This could be a FIXME for improvements - // to the diagnostics in the

[clang] Revert "[ClangRepl] Type Directed Code Completion" (PR #73259)

2023-11-23 Thread Fred Fu via cfe-commits
https://github.com/capfredf created https://github.com/llvm/llvm-project/pull/73259 Reverts llvm/llvm-project#67349 >From ad46f098f845c6a67cce0229dd402bd8cf31ac16 Mon Sep 17 00:00:00 2001 From: Fred Fu Date: Thu, 23 Nov 2023 14:06:49 -0500 Subject: [PATCH] Revert "[ClangRepl] Type Directed

[clang] [clang] Print static_assert values of arithmetic binary operators (PR #71671)

2023-11-23 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/71671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Print static_assert values of arithmetic binary operators (PR #71671)

2023-11-23 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM. I wonder if we should add an entry in the release notes? https://github.com/llvm/llvm-project/pull/71671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [ClangRepl] Type Directed Code Completion (PR #67349)

2023-11-23 Thread Fred Fu via cfe-commits
capfredf wrote: @vgvassilev there are some issues reported by sanitizers. Let's revert the patch. I will fix those issues and then re-land the patch https://github.com/llvm/llvm-project/pull/67349 ___ cfe-commits mailing list

[clang] [ClangRepl] Type Directed Code Completion (PR #67349)

2023-11-23 Thread Fred Fu via cfe-commits
capfredf wrote: @vgvassilev Thank you very much! https://github.com/llvm/llvm-project/pull/67349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [APINotes] Upstream Driver and Frontend options that enable API Notes (PR #73120)

2023-11-23 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan closed https://github.com/llvm/llvm-project/pull/73120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 07d799f - [APINotes] Upstream Driver and Frontend options that enable API Notes

2023-11-23 Thread via cfe-commits
Author: Egor Zhdan Date: 2023-11-23T18:52:27Z New Revision: 07d799f08fec4cb9ceb14a43cc134dee7f1621fc URL: https://github.com/llvm/llvm-project/commit/07d799f08fec4cb9ceb14a43cc134dee7f1621fc DIFF: https://github.com/llvm/llvm-project/commit/07d799f08fec4cb9ceb14a43cc134dee7f1621fc.diff LOG:

[clang] [Clang][AArch64] Add fix vector types to header into SVE (PR #73258)

2023-11-23 Thread via cfe-commits
https://github.com/CarolineConcatto edited https://github.com/llvm/llvm-project/pull/73258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Add fix vector types to header into SVE (PR #73258)

2023-11-23 Thread via cfe-commits
https://github.com/CarolineConcatto edited https://github.com/llvm/llvm-project/pull/73258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Print static_assert values of arithmetic binary operators (PR #71671)

2023-11-23 Thread Timm Baeder via cfe-commits
@@ -17219,10 +17219,10 @@ static bool UsefulToPrintExpr(const Expr *E) { if (const auto *UnaryOp = dyn_cast(E)) return UsefulToPrintExpr(UnaryOp->getSubExpr()); - // Ignore nested binary operators. This could be a FIXME for improvements - // to the diagnostics in the

[clang] [clang] Print static_assert values of arithmetic binary operators (PR #71671)

2023-11-23 Thread via cfe-commits
@@ -17219,10 +17219,10 @@ static bool UsefulToPrintExpr(const Expr *E) { if (const auto *UnaryOp = dyn_cast(E)) return UsefulToPrintExpr(UnaryOp->getSubExpr()); - // Ignore nested binary operators. This could be a FIXME for improvements - // to the diagnostics in the

[clang] [Clang][AArch64] Add fix vector types to header into SVE (PR #73258)

2023-11-23 Thread via cfe-commits
https://github.com/CarolineConcatto edited https://github.com/llvm/llvm-project/pull/73258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Header (PR #73258)

2023-11-23 Thread via cfe-commits
https://github.com/CarolineConcatto updated https://github.com/llvm/llvm-project/pull/73258 >From e0f245e8d6a395afac5de471b55358c7b730a170 Mon Sep 17 00:00:00 2001 From: Caroline Concatto Date: Wed, 22 Nov 2023 10:03:50 + Subject: [PATCH] [Clang][AArch64] Add fix vector types to header

[clang] [clang] Print static_assert values of arithmetic binary operators (PR #71671)

2023-11-23 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/71671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] Header (PR #73258)

2023-11-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang Author: None (CarolineConcatto) Changes --- Patch is 212.10 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/73258.diff 49 Files Affected: - (modified)

[clang] [clang][Interp] Implement dynamic memory allocation handling (PR #70306)

2023-11-23 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/70306 >From 29270191a209af2d8bcf270c84a87d6fa456fa0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 25 Oct 2023 08:33:30 +0200 Subject: [PATCH] [clang][Interp] Implement dynamic memory

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

2023-11-23 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,30 @@ +// RUN: %clang_cc1 -std=c++2c -verify %s + +namespace dr2798 { // dr2798: 17 drafting +#if __cpp_static_assert >= 202306 +struct string { +constexpr string() { +data_ = new char[6](); +__builtin_memcpy(data_, "Hello", 5); +data_[5] =

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

2023-11-23 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,30 @@ +// RUN: %clang_cc1 -std=c++2c -verify %s + +namespace dr2798 { // dr2798: 17 drafting +#if __cpp_static_assert >= 202306 +struct string { +constexpr string() { Endilll wrote: Is there a reason not to format this test with clang-format?

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

2023-11-23 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. DR testing part looks good, save for a couple of minor comments. https://github.com/llvm/llvm-project/pull/73234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

2023-11-23 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/73234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

2023-11-23 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/73234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

2023-11-23 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/73234 >From c274d62d03e1ab390284b26d6e23a23d099a98f6 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Thu, 23 Nov 2023 12:51:46 +0100 Subject: [PATCH 1/2] [Clang] Improve support for expression messages in

[clang] [ClangRepl] Type Directed Code Completion (PR #67349)

2023-11-23 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev closed https://github.com/llvm/llvm-project/pull/67349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 002d471 - [ClangRepl] Type Directed Code Completion (#67349)

2023-11-23 Thread via cfe-commits
Author: Fred Fu Date: 2023-11-23T19:56:35+02:00 New Revision: 002d471a4a3cd8b429e4ca7c84fd54a642e50e4c URL: https://github.com/llvm/llvm-project/commit/002d471a4a3cd8b429e4ca7c84fd54a642e50e4c DIFF: https://github.com/llvm/llvm-project/commit/002d471a4a3cd8b429e4ca7c84fd54a642e50e4c.diff LOG:

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-23 Thread Michael Klemm via cfe-commits
@@ -0,0 +1,15 @@ +! UNSUPPORTED: system-windows + +! RUN: %clang -o %t.c-object -c %S/Inputs/main_dupes.c mjklemm wrote: When I do this, the test goes to "unsupported" for me, as it seems that %cc is not set as a substitution in lit.cfg.py.

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-23 Thread Kiran Chandramohan via cfe-commits
@@ -122,6 +122,7 @@ # the build directory holding that tool. tools = [ ToolSubst("%flang", command=FindTool("flang-new"), unresolved="fatal"), +ToolSubst("%clang", command=FindTool("clang"), unresolved="fatal"), kiranchandramohan wrote: Remove this if

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-23 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,15 @@ +! UNSUPPORTED: system-windows + +! RUN: %clang -o %t.c-object -c %S/Inputs/main_dupes.c kiranchandramohan wrote: You can use %cc for the system-compiler and REQUIRE it to be present for this test. Reference:

[clang] [clang] Avoid memcopy for small structure with padding under -ftrivial-auto-var-init (PR #71677)

2023-11-23 Thread Youngsuk Kim via cfe-commits
JOE1994 wrote: FYI, the following `clang` tests seem to fail after revision [fe5c360](https://github.com/llvm/llvm-project/commit/fe5c360a9aae61db37886c0c795c409b5129905f) ``` Failed Tests (2): Clang :: CodeGen/aapcs-align.cpp Clang :: CodeGen/aapcs64-align.cpp ```

[clang] [flang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-23 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 e5cc3da6a9077548f613eee3aacc5e7b017c81f3 3b0090997023b1b6392bc23d386ace7c7cb796ce --

[clang] [APINotes] Upstream Driver and Frontend options that enable API Notes (PR #73120)

2023-11-23 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/73120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [APINotes] Upstream Driver and Frontend options that enable API Notes (PR #73120)

2023-11-23 Thread Egor Zhdan via cfe-commits
@@ -6720,6 +6720,17 @@ void Clang::ConstructJob(Compilation , const JobAction , Args.addOptOutFlag(CmdArgs, options::OPT_fassume_sane_operator_new, options::OPT_fno_assume_sane_operator_new); + if (Args.hasFlag(options::OPT_fapinotes,

  1   2   3   >