[clang] [clang][Sema] Skip the RequiresExprBodyDecls for lambda dependencies (PR #83997)

2024-03-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/83997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Skip the RequiresExprBodyDecls for lambda dependencies (PR #83997)

2024-03-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/83997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-03-05 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang deleted https://github.com/llvm/llvm-project/pull/83136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-05 Thread Shao-Ce SUN via cfe-commits
sunshaoce wrote: By the way, is there any plan to support `CFLUSH.I.L1` in the future? https://github.com/llvm/llvm-project/pull/83896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-05 Thread Nemanja Ivanovic via cfe-commits
@@ -141,23 +149,30 @@ PPC_LNX_CPU("power10",47) #define AIX_BUILTIN_PPC_TRUE 1 #define AIX_BUILTIN_PPC_FALSE 0 #define USE_SYS_CONF 2 + #define SYS_CALL 3 // Supported COMPARE_OP values. #define COMP_EQ 0 + #define COMP_GT 1 + #define COMP_GE 2 + #define COMP

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-05 Thread Nemanja Ivanovic via cfe-commits
@@ -16570,32 +16570,72 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, #include "llvm/TargetParser/PPCTargetParser.def" auto GenAIXPPCBuiltinCpuExpr = [&](unsigned SupportMethod, unsigned FieldIdx, nemanjai wrote: This is now a very large

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-05 Thread Nemanja Ivanovic via cfe-commits
@@ -0,0 +1,171 @@ +// RUN: echo "int main() { return __builtin_cpu_supports(\"4xxmac\");}" > %t.c nemanjai wrote: This is an interesting way of testing, where we create each test on the fly. I am not against it if it works on all platforms (including Windows). H

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-05 Thread Nemanja Ivanovic via cfe-commits
@@ -141,23 +149,30 @@ PPC_LNX_CPU("power10",47) #define AIX_BUILTIN_PPC_TRUE 1 #define AIX_BUILTIN_PPC_FALSE 0 #define USE_SYS_CONF 2 + #define SYS_CALL 3 // Supported COMPARE_OP values. #define COMP_EQ 0 + #define COMP_GT 1 + #define COMP_GE 2 + #define COMP

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-05 Thread Nemanja Ivanovic via cfe-commits
@@ -364,7 +364,14 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public TargetInfo { // have Glibc since it is Glibc that provides the HWCAP[2] in the auxv. static constexpr int MINIMUM_AIX_OS_MAJOR = 7; static constexpr int MINIMUM_AIX_OS_MINOR = 2; - bool supportsCp

[clang] [alpha.webkit.UncountedLocalVarsChecker] Allow uncounted object references within trivial statements (PR #82229)

2024-03-05 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82229 >From 234e301ab2721ddb2f4b43589785015a7d0aa304 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Mon, 19 Feb 2024 01:07:13 -0800 Subject: [PATCH 1/7] [alpha.webkit.UncountedLocalVarsChecker] Allow uncounted object

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-05 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: > By the way, is there any plan to support `CFLUSH.I.L1` in the future? Flushing the instruction cache doesn't make sense given it can never be dirty. Invalidating/discarding does, but that's just what fence.i is doing? https://github.com/llvm/llvm-project/pull/83896

[clang] [alpha.webkit.UncountedLocalVarsChecker] Allow uncounted object references within trivial statements (PR #82229)

2024-03-05 Thread Ryosuke Niwa via cfe-commits
@@ -474,4 +504,22 @@ bool TrivialFunctionAnalysis::isTrivialImpl( return Result; } +bool TrivialFunctionAnalysis::isTrivialImpl( +const Stmt *S, TrivialFunctionAnalysis::CacheTy &Cache) { + // If the statement isn't in the cache, conservatively assume that + // it's no

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-05 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder created https://github.com/llvm/llvm-project/pull/84127 On Apple platforms, some of the stddef.h types are also declared in system headers. In particular NULL has a conflicting declaration in . When that's in a different module from <__stddef_null.h>, rede

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang Author: Ian Anderson (ian-twilightcoder) Changes On Apple platforms, some of the stddef.h types are also declared in system headers. In particular NULL has a conflicting declaration in . When t

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-05 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: We should consider this for LLVM 18, it's a regression from https://reviews.llvm.org/D159064 https://github.com/llvm/llvm-project/pull/84127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-05 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff bf631c63d01057321c070520a56a150ede32e47d 0cc4b77fce06730f6a6a8b242384036018ebfe79 --

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-05 Thread Craig Topper via cfe-commits
topperc wrote: > > By the way, is there any plan to support `CFLUSH.I.L1` in the future? > > Flushing the instruction cache doesn't make sense given it can never be > dirty. Invalidating/discarding does, but that's just what fence.i is doing? A cflush.i.l1 did appear in some SiFive manual at s

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-05 Thread Ian Anderson via cfe-commits
@@ -7,7 +7,7 @@ *===---=== */ -#if !defined(NULL) || !__has_feature(modules) +#if !defined(NULL) || !__building_module(_Builtin_stddef) ian-twilightcoder wrote: ``` #if !defined(NULL) || !_

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-05 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/84127 >From e34ccad2b82b75c050d12bbb987529c320c0df9d Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Tue, 5 Mar 2024 22:56:36 -0800 Subject: [PATCH] [clang][modules] giving the __stddef_ headers their own

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-05 Thread Owen Pan via cfe-commits
@@ -71,8 +71,21 @@ bool FormatToken::isSimpleTypeSpecifier() const { } } -bool FormatToken::isTypeOrIdentifier() const { - return isSimpleTypeSpecifier() || Tok.isOneOf(tok::kw_auto, tok::identifier); +// Sorted common C++ non-keyword types. +static SmallVector CppNonKeywor

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-05 Thread Owen Pan via cfe-commits
@@ -268,20 +268,24 @@ const FormatToken *LeftRightQualifierAlignmentFixer::analyzeRight( if (isPossibleMacro(TypeToken)) return Tok; + const bool IsCpp = Style.isCpp(); + // The case `const long long int volatile` -> `long long int const volatile` // The case `lo

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-05 Thread Owen Pan via cfe-commits
@@ -620,6 +620,23 @@ TEST_F(TokenAnnotatorTest, UnderstandsCasts) { ASSERT_EQ(Tokens.size(), 8u) << Tokens; EXPECT_TOKEN(Tokens[3], tok::r_paren, TT_Unknown); EXPECT_TOKEN(Tokens[4], tok::amp, TT_BinaryOperator); + + Tokens = annotate("#define FOO(bar) foo((uint64_t)&bar

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-05 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/83709 >From 91d6e4c6e0ae2e1d79edf496df22978a4e1f3e1a Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 2 Mar 2024 22:08:29 -0800 Subject: [PATCH 1/6] [clang-format] Handle common C++ non-keyword types as such Fixes #

[clang] [CUDA] Correctly set CUDA default architecture (PR #84017)

2024-03-05 Thread Jonas Hahnfeld via cfe-commits
@@ -2,56 +2,56 @@ // REQUIRES: nvptx-registered-target // REQUIRES: zlib -// RUN: not %clang -### --target=x86_64-linux-gnu -c %s -g -gz 2>&1 \ +// RUN: %clang -### --target=x86_64-linux-gnu --offload-arch=sm_52 -nogpulib -nogpuinc -c %s -g -gz 2>&1 \ // RUN: | FileCheck %s

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-05 Thread via cfe-commits
@@ -268,20 +268,24 @@ const FormatToken *LeftRightQualifierAlignmentFixer::analyzeRight( if (isPossibleMacro(TypeToken)) return Tok; + const bool IsCpp = Style.isCpp(); + // The case `const long long int volatile` -> `long long int const volatile` // The case `lo

[clang] d3df2a8 - [C++20] [Modules] Handle transitive import in the module properly

2024-03-05 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-03-06T15:46:55+08:00 New Revision: d3df2a834cf6febb44c699d109b9e7f622194837 URL: https://github.com/llvm/llvm-project/commit/d3df2a834cf6febb44c699d109b9e7f622194837 DIFF: https://github.com/llvm/llvm-project/commit/d3df2a834cf6febb44c699d109b9e7f622194837.diff LO

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-05 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder edited https://github.com/llvm/llvm-project/pull/84127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-05 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder edited https://github.com/llvm/llvm-project/pull/84127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-05 Thread via cfe-commits
https://github.com/alirezamoshtaghi updated https://github.com/llvm/llvm-project/pull/83369 >From 3d6afe011221ac239bb668b375ed3f6c356fc47d Mon Sep 17 00:00:00 2001 From: alirezamoshtaghi Date: Wed, 28 Feb 2024 13:55:11 -0800 Subject: [PATCH 1/3] [CLANGD] Do not crash on designator initializatio

[clang] [clang][NFC] Trim license header comments to 81 characters (PR #82919)

2024-03-05 Thread Balazs Benics via cfe-commits
steakhal wrote: I did some grepping. Inside the `clang` project: `^/+=(.*)/(.*)...$`: 297 files `^/+=([^\n/]*)\.(h|cpp)([^\n/]*)...$`: 1766 files This suggests to me that indeed, absolute paths are the used way fewer times. https://github.com/llvm/llvm-project/pull/82919 ___

[clang] [X86_64] fix empty structure vaarg in c++ (PR #77907)

2024-03-05 Thread Eli Friedman via cfe-commits
@@ -3014,6 +3014,16 @@ Address X86_64ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, ABIArgInfo AI = classifyArgumentType(Ty, 0, neededInt, neededSSE, /*isNamedArg*/false); + // Empty records are ignored for parameter pas

[clang] [X86_64] fix empty structure vaarg in c++ (PR #77907)

2024-03-05 Thread Longsheng Mou via cfe-commits
@@ -3014,6 +3014,16 @@ Address X86_64ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, ABIArgInfo AI = classifyArgumentType(Ty, 0, neededInt, neededSSE, /*isNamedArg*/false); + // Empty records are ignored for parameter pas

[clang] [analyzer][NFC] Make CheckerDocumentation checker in-sync with actual checker callbacks (PR #83973)

2024-03-05 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/83973 In PR #83677 I was surprised to see that outdated checker callback signatures are a problem. It turns out, we need the `registerChecker...` function to invoke the `Mgr.registerChecker<>()` which would instantia

[clang] [analyzer][NFC] Make CheckerDocumentation checker in-sync with actual checker callbacks (PR #83973)

2024-03-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes In PR #83677 I was surprised to see that outdated checker callback signatures are a problem. It turns out, we need the `registerChecker...` function to invoke the `Mgr.registerChecker<>()

[clang] NFC: format clang/lib/Sema/Sema.cpp (PR #83974)

2024-03-05 Thread Takuto Ikuta via cfe-commits
https://github.com/atetubou created https://github.com/llvm/llvm-project/pull/83974 This is to avoid modifying unrelated code when auto format is on in our editor. >From 8d660f8a15b04285a4218a22944aef902d645b27 Mon Sep 17 00:00:00 2001 From: Takuto Ikuta Date: Tue, 5 Mar 2024 17:34:15 +0900 Su

[clang] NFC: format clang/lib/Sema/Sema.cpp (PR #83974)

2024-03-05 Thread Takuto Ikuta via cfe-commits
https://github.com/atetubou ready_for_review https://github.com/llvm/llvm-project/pull/83974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] NFC: format clang/lib/Sema/Sema.cpp (PR #83974)

2024-03-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Takuto Ikuta (atetubou) Changes This is to avoid modifying unrelated code when auto format is on in our editor. --- Patch is 25.91 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/83974.diff 1

[clang] [clang][NFC] Format clang/lib/Sema/Sema.cpp (PR #83974)

2024-03-05 Thread Takuto Ikuta via cfe-commits
https://github.com/atetubou edited https://github.com/llvm/llvm-project/pull/83974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [lld] [lldb] [llvm] [mlir] Rename llvm::ThreadPool -> llvm::DefaultThreadPool (NFC) (PR #83702)

2024-03-05 Thread Mehdi Amini via cfe-commits
https://github.com/joker-eph updated https://github.com/llvm/llvm-project/pull/83702 >From 41e5c286c29a4fea65f6116f6844b44a3847f9db Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Mon, 4 Mar 2024 23:21:04 -0800 Subject: [PATCH] Rename llvm::ThreadPool -> llvm::DefaultThreadPool (NFC) The base

[clang] [clang][NFC] Format clang/lib/Sema/Sema.cpp (PR #83974)

2024-03-05 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: I remember we have policies that we don't like patches which purely formats codes. It makes backporting and cherry-picking harder. But I can't find the wording now. CC: @AaronBallman @Endilll https://github.com/llvm/llvm-project/pull/83974 __

[clang] [clang][nullability] Don't discard expression state before end of full-expression. (PR #82611)

2024-03-05 Thread via cfe-commits
martinboehme wrote: > I'm a little concerned with the complexity and cost required to support this > optimization. With this added cost, do you know if the analysis still faster > (and less SAT timeouts?) than if we just did the simple thing of not dropping > state? Yes, significantly faster

[clang] [clang][NFC] Format clang/lib/Sema/Sema.cpp (PR #83974)

2024-03-05 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Oh, I found it here: https://llvm.org/docs/CodingStandards.html#introduction > Our long term goal is for the entire codebase to follow the convention, but > we explicitly do not want patches that do large-scale reformatting of > existing code. https://github.com/llvm/llvm-pr

[clang] [clang-tools-extra] [lld] [lldb] [llvm] [mlir] Rename llvm::ThreadPool -> llvm::DefaultThreadPool (NFC) (PR #83702)

2024-03-05 Thread Mehdi Amini via cfe-commits
https://github.com/joker-eph updated https://github.com/llvm/llvm-project/pull/83702 >From f961f22a3643673c1f3a040715dcfa2887ee1dca Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Mon, 4 Mar 2024 23:21:04 -0800 Subject: [PATCH] Rename llvm::ThreadPool -> llvm::DefaultThreadPool (NFC) The base

[clang] [clang][NFC] Regroup declarations in `Sema` (PR #82217)

2024-03-05 Thread via cfe-commits
cor3ntin wrote: Please run clang-format as a separate PR (before this one) - this will help folks deal with merge conflicts. Thanks https://github.com/llvm/llvm-project/pull/82217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [C++20] [Modules] Introduce reduced BMI (PR #75894)

2024-03-05 Thread Iain Sandoe via cfe-commits
iains wrote: * I do not want to block progress, so let's move forward with this patch for now. * It seems to me (as we found with GMF decl elision) that the process is quite a bit more complex than simply omitting a decl. We need to elide other decls that are then unused (e.g. decls local t

[clang] [clang][NFC] Format clang/lib/Sema/Sema.cpp (PR #83974)

2024-03-05 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Bulk formatting of Clang is still under discussion in https://discourse.llvm.org/t/rfc-clang-format-all-the-things/76614. At least I don't see a consensus called there one way or another. Our [developer policy](https://llvm.org/docs/DeveloperPolicy.html) states the following: >

[clang] [C++20] [Modules] Introduce reduced BMI (PR #75894)

2024-03-05 Thread Iain Sandoe via cfe-commits
@@ -830,6 +843,19 @@ class PCHGenerator : public SemaConsumer { bool hasEmittedPCH() const { return Buffer->IsComplete; } }; +class ReducedBMIGenerator : public PCHGenerator { +public: + ReducedBMIGenerator(const Preprocessor &PP, InMemoryModuleCache &ModuleCache, +

[clang] [Clang] Fix looking for immediate calls in default arguments. (PR #80690)

2024-03-05 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/80690 >From 690a251c4d8df2099b213ba63e9836c2752b5ac1 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 5 Feb 2024 15:42:21 +0100 Subject: [PATCH 1/2] [Clang] Fix looking for immediate calls in default argument

[clang] [Clang] Fix looking for immediate calls in default arguments. (PR #80690)

2024-03-05 Thread via cfe-commits
cor3ntin wrote: > Does this fix #67134 as well? I don't think so, no https://github.com/llvm/llvm-project/pull/80690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d773c00 - [Clang] Fix looking for immediate calls in default arguments. (#80690)

2024-03-05 Thread via cfe-commits
Author: cor3ntin Date: 2024-03-05T10:04:45+01:00 New Revision: d773c00e52f1acd68267c6f2f5bfa269b73810a0 URL: https://github.com/llvm/llvm-project/commit/d773c00e52f1acd68267c6f2f5bfa269b73810a0 DIFF: https://github.com/llvm/llvm-project/commit/d773c00e52f1acd68267c6f2f5bfa269b73810a0.diff LOG:

[clang] [Clang] Fix looking for immediate calls in default arguments. (PR #80690)

2024-03-05 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/80690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Support RISC-V Profiles in -march option (PR #76357)

2024-03-05 Thread Wang Pengcheng via cfe-commits
https://github.com/wangpc-pp updated https://github.com/llvm/llvm-project/pull/76357 >From bd9b759d853d8196ae893a90442a3c3e7e5fa74d Mon Sep 17 00:00:00 2001 From: wangpc Date: Mon, 25 Dec 2023 18:52:36 +0800 Subject: [PATCH] [RFC][RISCV] Support RISC-V Profiles in -march option This PR impleme

[clang] [clang][NFC] Format clang/lib/Sema/Sema.cpp (PR #83974)

2024-03-05 Thread Takuto Ikuta via cfe-commits
atetubou wrote: Thank you for references both. Actually, I'd like to have PR like https://github.com/llvm/llvm-project/pull/83961. Is it acceptable to merge this kind of PR in that case then? https://github.com/llvm/llvm-project/pull/83974 ___ cfe-co

[clang] 690bf64 - [clang] Support `__is_trivially_copyable(int()&)==false` (#81298)

2024-03-05 Thread via cfe-commits
Author: Amirreza Ashouri Date: 2024-03-05T10:07:00+01:00 New Revision: 690bf64f077a281d434537b0907c9fc170123dcc URL: https://github.com/llvm/llvm-project/commit/690bf64f077a281d434537b0907c9fc170123dcc DIFF: https://github.com/llvm/llvm-project/commit/690bf64f077a281d434537b0907c9fc170123dcc.di

[clang] [clang] Support `__is_trivially_copyable(int()&)==false` (PR #81298)

2024-03-05 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/81298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [lld] [lldb] [llvm] [mlir] Rename llvm::ThreadPool -> llvm::DefaultThreadPool (NFC) (PR #83702)

2024-03-05 Thread Mehdi Amini via cfe-commits
joker-eph wrote: I did the first part of the renaming @dwblaikie : looks good? https://github.com/llvm/llvm-project/pull/83702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Support RISC-V Profiles in -march option (PR #76357)

2024-03-05 Thread Wang Pengcheng via cfe-commits
https://github.com/wangpc-pp updated https://github.com/llvm/llvm-project/pull/76357 >From a54f47f8055e898b6452183663863f6df01e98e1 Mon Sep 17 00:00:00 2001 From: wangpc Date: Mon, 25 Dec 2023 18:52:36 +0800 Subject: [PATCH] [RFC][RISCV] Support RISC-V Profiles in -march option This PR impleme

[clang] [llvm] [openmp] [libomptarget] Build plugins-nextgen for SystemZ (PR #83978)

2024-03-05 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand created https://github.com/llvm/llvm-project/pull/83978 The plugin was not getting built as the build_generic_elf64 macro assumes the LLVM triple processor name matches the CMake processor name, which is unfortunately not the case for SystemZ. Fix this by providing

[clang] [clang][NFC] Format clang/lib/Sema/Sema.cpp (PR #83974)

2024-03-05 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Thank you for references both. > > Actually, I'd like to have PR like #83961. Is it acceptable to merge this > kind of PR in that case then? I don't feel the patches are related. I think you can only format the changed lines. https://github.com/llvm/llvm-project/pull/8397

[clang] [llvm] [openmp] [libomptarget] Build plugins-nextgen for SystemZ (PR #83978)

2024-03-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-openmp Author: Ulrich Weigand (uweigand) Changes The plugin was not getting built as the build_generic_elf64 macro assumes the LLVM triple processor name matches the CMake processor name, which is unfortunately not the case for SystemZ. Fix this

[clang] [llvm] [openmp] [libomptarget] Build plugins-nextgen for SystemZ (PR #83978)

2024-03-05 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff ff66e9b7e2fad71d1c65e884d6f94fb6ea5bdc21 0ab19aae09cfdc1c0213ce1365d8a47a32d6ec9c --

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-05 Thread Owen Pan via cfe-commits
owenca wrote: > > It does fix the example given. > > #83400 has 6 real-world examples. This patch fixes none of them. It also has > a reduced testcase, which this patch does fix. But fixing the reduced > testcase without fixing the real-world examples is not fixing the bug. You took what I sa

[clang] [clang][analyzer] Improve documentation of StreamChecker (NFC). (PR #83858)

2024-03-05 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/83858 From bb81a944b78315471df8866bf21b317e8c50166c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Mon, 4 Mar 2024 09:48:41 +0100 Subject: [PATCH 1/2] [clang][analyzer] Improve documentation

[clang] [analyzer][NFC] Remove dead code (PR #83968)

2024-03-05 Thread via cfe-commits
https://github.com/NagyDonat approved this pull request. https://github.com/llvm/llvm-project/pull/83968 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Refactor `clang/test/SemaCXX/type-traits.cpp` to use modern `static_assert` (PR #77584)

2024-03-05 Thread Amirreza Ashouri via cfe-commits
@@ -214,56 +212,56 @@ struct HasVirtBase : virtual ACompleteType {}; void is_pod() { - { int arr[T(__is_pod(int))]; } - { int arr[T(__is_pod(Enum))]; } - { int arr[T(__is_pod(POD))]; } - { int arr[T(__is_pod(Int))]; } - { int arr[T(__is_pod(IntAr))]; } - { int arr[T(__is

[clang] [analyzer][NFC] Remove dead code (PR #83968)

2024-03-05 Thread via cfe-commits
https://github.com/NagyDonat closed https://github.com/llvm/llvm-project/pull/83968 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 88414c8 - [analyzer][NFC] Remove dead code (#83968)

2024-03-05 Thread via cfe-commits
Author: Balazs Benics Date: 2024-03-05T10:30:28+01:00 New Revision: 88414c8862c58fa4e708a092acb87bd0687121ce URL: https://github.com/llvm/llvm-project/commit/88414c8862c58fa4e708a092acb87bd0687121ce DIFF: https://github.com/llvm/llvm-project/commit/88414c8862c58fa4e708a092acb87bd0687121ce.diff

[clang] [clang][NFC] Refactor `clang/test/SemaCXX/type-traits.cpp` to use modern `static_assert` (PR #77584)

2024-03-05 Thread Amirreza Ashouri via cfe-commits
@@ -2875,10 +2875,10 @@ struct __attribute__((packed)) PackedNoPadding2 { int j; short i; }; -static_assert(has_unique_object_representations::value, "Packed structs have no padding"); -static_assert(has_unique_object_representations::value, "Packed structs have no paddin

[clang] [clang][analyzer] Bring cplusplus.ArrayDelete out of alpha (PR #83985)

2024-03-05 Thread via cfe-commits
https://github.com/Discookie created https://github.com/llvm/llvm-project/pull/83985 The checker finds a type of undefined behavior, where if the type of a pointer to an object-array is different from the objects' underlying type, calling delete[] is undefined, as the size of the two objects m

[clang] [clang][analyzer] Bring cplusplus.ArrayDelete out of alpha (PR #83985)

2024-03-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Discookie (Discookie) Changes The checker finds a type of undefined behavior, where if the type of a pointer to an object-array is different from the objects' underlying type, calling delete[] is undefined, as the size of the two objects

[clang-tools-extra] [clangd] Remove calls to getFileLoc() in declToSym() (PR #83532)

2024-03-05 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. https://github.com/llvm/llvm-project/pull/83532 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Bring cplusplus.ArrayDelete out of alpha (PR #83985)

2024-03-05 Thread via cfe-commits
https://github.com/Discookie edited https://github.com/llvm/llvm-project/pull/83985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Introduce reduced BMI (PR #75894)

2024-03-05 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > * I do not want to block progress, so let's move forward with this patch for > now. Yeah. Great to see we have some progress finally. I think this is really important since I see more and more peope complaninig the performance for modules. I feel this series patch is key t

[clang] [C++20] [Modules] Introduce reduced BMI (PR #75894)

2024-03-05 Thread Chuanqi Xu via cfe-commits
@@ -830,6 +843,19 @@ class PCHGenerator : public SemaConsumer { bool hasEmittedPCH() const { return Buffer->IsComplete; } }; +class ReducedBMIGenerator : public PCHGenerator { +public: + ReducedBMIGenerator(const Preprocessor &PP, InMemoryModuleCache &ModuleCache, +

[clang] [clang-tools-extra] [flang] [lld] [llvm] [flang][clang] Add Visibility specific help text for options (PR #81869)

2024-03-05 Thread David Spickett via cfe-commits
DavidSpickett wrote: @banach-space Your thoughts as the Flang driver owner? https://github.com/llvm/llvm-project/pull/81869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Sequence C++20 Parenthesized List Init (PR #83476)

2024-03-05 Thread via cfe-commits
cor3ntin wrote: @vapdrs Do you need us to merge that for you? Thanks https://github.com/llvm/llvm-project/pull/83476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [clang] Enable sized deallocation by default in C++14 onwards (PR #83774)

2024-03-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/83774 >From 26245679b0f40b510e628aaed091739e9931c29c Mon Sep 17 00:00:00 2001 From: wangpc Date: Fri, 14 Jul 2023 10:38:14 +0800 Subject: [PATCH 1/3] [clang] Enable sized deallocation by default in C++14 onwards Sinc

[clang-tools-extra] [clang-tidy] fix false negative in cppcoreguidelines-missing-std-forward (PR #83987)

2024-03-05 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/83987 Try to fix https://github.com/llvm/llvm-project/issues/83845 When `std::forward` is invoked in a function, make sure it uses correct parameter by checking if the bounded `var` equals the parameter. >From 67e7001d

[clang-tools-extra] [clang-tidy] fix false negative in cppcoreguidelines-missing-std-forward (PR #83987)

2024-03-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Qizhi Hu (jcsxky) Changes Try to fix https://github.com/llvm/llvm-project/issues/83845 When `std::forward` is invoked in a function, make sure it uses correct parameter by checking if the bounded `var` equals the parameter. --

[clang] [clang][NFC] Format clang/lib/Sema/Sema.cpp (PR #83974)

2024-03-05 Thread Takuto Ikuta via cfe-commits
https://github.com/atetubou closed https://github.com/llvm/llvm-project/pull/83974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Format clang/lib/Sema/Sema.cpp (PR #83974)

2024-03-05 Thread Takuto Ikuta via cfe-commits
atetubou wrote: Oh, I found https://code.visualstudio.com/docs/getstarted/settings#:~:text=modificationsIfAvailable. So let me use that instead. Thank you for your comments. https://github.com/llvm/llvm-project/pull/83974 ___ cfe-commits mailing lis

[clang] [clang-tools-extra] [libcxx] [clang] Enable sized deallocation by default in C++14 onwards (PR #83774)

2024-03-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. I used a different approach for CWG292 test that avoids passing `-fsized-deallocation` in 98 and 11 modes, as this is not a conforming mode for them. Now changes to DR tests look good :) I hope you don't mind me pushing commits to your PR.

[clang] [clang][NFC] Refactor `clang/test/SemaCXX/type-traits.cpp` to use modern `static_assert` (PR #77584)

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

[clang] [llvm] [RISCV] Improve error message when the extension is not supported (PR #83989)

2024-03-05 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat created https://github.com/llvm/llvm-project/pull/83989 If the "march" has some extension with version that is not supported, it returns the error message like: "error: invalid arch name 'some_arch', unsupported version number 2.0 for extension 'some_arch'", which is n

[clang] [llvm] [RISCV] Improve error message when the extension is not supported (PR #83989)

2024-03-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-support Author: Brandon Wu (4vtomat) Changes If the "march" has some extension with version that is not supported, it returns the error message like: "error: invalid arch name 'some_arch', unsupported version number 2.0 for extension 'some_arch'", w

[clang] [llvm] [RISCV] Improve error message when the extension is not supported (PR #83989)

2024-03-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Brandon Wu (4vtomat) Changes If the "march" has some extension with version that is not supported, it returns the error message like: "error: invalid arch name 'some_arch', unsupported version number 2.0 for extension 'some_arch'",

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-05 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs updated https://github.com/llvm/llvm-project/pull/83279 From 68200ecf3267d1b3940fa73c25c50ee706932a98 Mon Sep 17 00:00:00 2001 From: Botond Istvan Horvath Date: Wed, 28 Feb 2024 13:09:15 +0100 Subject: [PATCH 1/8] Bugfix for choosing the more specialized overload Ther

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-05 Thread Haojian Wu via cfe-commits
hokein wrote: @cor3ntin, @erichkeane, thanks for all review comments. I'm not sure you have reviewed the whole patch. My feeling is that the core part (`DeclareImplicitDeductionGuidesForTypeAlias`) may not have received sufficient reviews. It would be great if you can take a closer look at thi

[clang-tools-extra] [clangd] Make all calls to format::getStyle() go through getFormatStyleForFile() (PR #82948)

2024-03-05 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. +1, this looks like an improvement. https://github.com/llvm/llvm-project/pull/82948 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-03-05 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > Please let me know your thoughts. @AaronBallman , implemented in https://github.com/llvm/llvm-project/pull/73099/commits/dff61e0f49d0ba0d868f4e9668f75718b031e1e3 . I was mostly referring to the original page https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3018.htm when im

[clang] [FMV] Allow target version definitions in any order. (PR #83887)

2024-03-05 Thread Pavel Iliin via cfe-commits
https://github.com/ilinpv edited https://github.com/llvm/llvm-project/pull/83887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV] Allow target version definitions in any order. (PR #83887)

2024-03-05 Thread Pavel Iliin via cfe-commits
https://github.com/ilinpv requested changes to this pull request. https://github.com/llvm/llvm-project/pull/83887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV] Allow target version definitions in any order. (PR #83887)

2024-03-05 Thread Pavel Iliin via cfe-commits
@@ -11429,6 +11429,16 @@ static bool CheckTargetCausesMultiVersioning(Sema &S, FunctionDecl *OldFD, bool &Redeclaration, NamedDecl *&OldDecl,

[clang] [FMV] Allow target version definitions in any order. (PR #83887)

2024-03-05 Thread Pavel Iliin via cfe-commits
@@ -11455,9 +11465,8 @@ static bool CheckTargetCausesMultiVersioning(Sema &S, FunctionDecl *OldFD, } // If this is 'default', permit the forward declaration. - if (!OldFD->isMultiVersion() && - ((NewTA && NewTA->isDefaultVersion() && !OldTA) || - (NewTVA && Ne

[clang] [clang] Refactor Builtins.def to be a tablegen file (PR #68324)

2024-03-05 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Not right now. I think the first thing to do is moving all the builtins to tablegen before we can make better use of it, which is going to take a while. https://github.com/llvm/llvm-project/pull/68324 ___ cfe-commits mailing list cf

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-05 Thread via cfe-commits
mydeveloperday wrote: > > But looking for a parenthesized single identifier addresses all of the > > examples in the issue. > > I don't think it would work, but you are welcome to submit a patch to prove > me wrong. 🙂 +1 for this, it will be the 95%/5% rule, you might think all cases of

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-05 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. https://github.com/llvm/llvm-project/pull/83709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-05 Thread via cfe-commits
@@ -71,8 +71,21 @@ bool FormatToken::isSimpleTypeSpecifier() const { } } -bool FormatToken::isTypeOrIdentifier() const { - return isSimpleTypeSpecifier() || Tok.isOneOf(tok::kw_auto, tok::identifier); +// Sorted common C++ non-keyword types. +static SmallVector CppNonKeywor

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-05 Thread via cfe-commits
@@ -620,6 +620,23 @@ TEST_F(TokenAnnotatorTest, UnderstandsCasts) { ASSERT_EQ(Tokens.size(), 8u) << Tokens; EXPECT_TOKEN(Tokens[3], tok::r_paren, TT_Unknown); EXPECT_TOKEN(Tokens[4], tok::amp, TT_BinaryOperator); + + Tokens = annotate("#define FOO(bar) foo((uint64_t)&bar

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-05 Thread via cfe-commits
@@ -268,20 +268,24 @@ const FormatToken *LeftRightQualifierAlignmentFixer::analyzeRight( if (isPossibleMacro(TypeToken)) return Tok; + const bool IsCpp = Style.isCpp(); + // The case `const long long int volatile` -> `long long int const volatile` // The case `lo

<    1   2   3   4   5   6   >