[clang] [clang] Preserve found-decl when constructing VarTemplateIds (PR #82265)

2024-02-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: kadir çetinkaya (kadircet) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/82265.diff 3 Files Affected: - (modified) clang/include/clang/Sema/Sema.h (+1-1) - (modified) clang/lib/Sema/SemaTemplate.cpp (+8-10) - (modi

[clang] [llvm] [AMDGPU] Add an option to disable unsafe uses of atomic xor (PR #69229)

2024-02-19 Thread Pierre-Andre Saulais via cfe-commits
pasaulais wrote: Thanks for the comments @arsenm @yxsamliu @b-sumner. By approaching a similar solution, do you mean MMRAs (https://github.com/llvm/llvm-project/pull/78569) ? If so, should I rebase/adapt my patch to the MMRA PR? Or will this PR be redundant and needs closing? @yxsamliu These

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-02-19 Thread kadir çetinkaya via cfe-commits
@@ -490,6 +491,13 @@ bool eligibleForExtraction(const SelectionTree::Node *N) { BO->getRHS() == OuterImplicit.ASTNode.get()) return false; } + if (const auto *Decl = Parent->ASTNode.get()) { +if (!Decl->isInitCapture() && kadircet wrote: >

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-02-19 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks, lgtm! https://github.com/llvm/llvm-project/pull/69477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [llvm] [openmp] [libc] Rework the GPU build to be a regular target (PR #81921)

2024-02-19 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/81921 >From 8727a9631480deac9d9df386ed26dfcd35914a13 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Tue, 13 Feb 2024 21:08:02 -0600 Subject: [PATCH] [libc] Rework the GPU build to be a regular target Summary: This

[clang] [Driver] Remove dead -freroll-loops flag (PR #82254)

2024-02-19 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/82254 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add fix-its to `avoid-return-with-void-value` check (PR #81420)

2024-02-19 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny updated https://github.com/llvm/llvm-project/pull/81420 From 71a7da3cd7035452685ce926b49d8329fbd183fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Sun, 11 Feb 2024 17:04:12 +0100 Subject: [PATCH] [clang-tidy] Add fix-its to `avoid-return-wit

[clang-tools-extra] [clang-tidy] Add fix-its to `avoid-return-with-void-value` check (PR #81420)

2024-02-19 Thread Danny Mösch via cfe-commits
@@ -42,10 +43,28 @@ void AvoidReturnWithVoidValueCheck::check( const auto *VoidReturn = Result.Nodes.getNodeAs("void_return"); if (IgnoreMacros && VoidReturn->getBeginLoc().isMacroID()) return; - if (!StrictMode && !Result.Nodes.getNodeAs("compound_parent")) + const a

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

2024-02-19 Thread Krystian Stasiowski via cfe-commits
@@ -1792,23 +1807,11 @@ class ClassTemplateSpecializationDecl llvm::PointerUnion SpecializedTemplate; - /// Further info for explicit template specialization/instantiation. - struct ExplicitSpecializationInfo { -/// The type-as-written. -TypeSourceInfo *TypeAsW

[clang] [compiler-rt] [llvm] [clang-repl] [ORC] Add support for out-of-process execution on ELF (PR #79936)

2024-02-19 Thread via cfe-commits
jameshu15869 wrote: Hi @weliveindetail, thank you for the comments sorry about the extremely delayed response - school has been busy and I just started a new job recently, so I haven't had much time to focus on other things. I was originally thinking that a lot of the ORC runtime changes migh

[clang] [clang] [SemaCXX] Disallow deducing "this" on operator `new` and `delete` (PR #82251)

2024-02-19 Thread Rajveer Singh Bharadwaj via cfe-commits
https://github.com/Rajveer100 updated https://github.com/llvm/llvm-project/pull/82251 >From 8fd5e1bb55a778c778bc8829199318661e4d4573 Mon Sep 17 00:00:00 2001 From: Rajveer Date: Mon, 19 Feb 2024 19:29:48 +0530 Subject: [PATCH] [clang] [SemaCXX] Disallow deducing "this" on operator `new` and `d

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-02-19 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler closed https://github.com/llvm/llvm-project/pull/69477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] c9974ae - [clangd] Do not offer extraction to variable for decl init expression (#69477)

2024-02-19 Thread via cfe-commits
Author: Christian Kandeler Date: 2024-02-19T20:00:24+01:00 New Revision: c9974ae4a0601a9e9f5842114ecd899ab9142786 URL: https://github.com/llvm/llvm-project/commit/c9974ae4a0601a9e9f5842114ecd899ab9142786 DIFF: https://github.com/llvm/llvm-project/commit/c9974ae4a0601a9e9f5842114ecd899ab9142786.

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-19 Thread Jun Wang via cfe-commits
https://github.com/jwanggit86 updated https://github.com/llvm/llvm-project/pull/79035 >From 5c088a59bd36df40bae9a3a712f3994feded359d Mon Sep 17 00:00:00 2001 From: Jun Wang Date: Mon, 22 Jan 2024 12:43:27 -0600 Subject: [PATCH 1/7] [AMDGPU] Adding the amdgpu-num-work-groups function attribute

[clang] [clang][dataflow][NFC] Add a FIXME to handling of union initialization. (PR #82239)

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

[clang] [clang-tools-extra] [clangd] Use `SymbolName` to represent Objective-C selectors (PR #82061)

2024-02-19 Thread Alex Hoppen via cfe-commits
https://github.com/ahoppen updated https://github.com/llvm/llvm-project/pull/82061 >From be2388c8552ea7a4466046c4d2c9b041a5bf78f2 Mon Sep 17 00:00:00 2001 From: Alex Hoppen Date: Fri, 16 Feb 2024 14:50:25 -0800 Subject: [PATCH] [clangd] Use `SymbolName` to represent Objective-C selectors MIME-V

[clang] [libc] [llvm] [openmp] [libc] Rework the GPU build to be a regular target (PR #81921)

2024-02-19 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/81921 >From f3013086f60f2a78c12887cf1736455e8fb1911b Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Tue, 13 Feb 2024 21:08:02 -0600 Subject: [PATCH] [libc] Rework the GPU build to be a regular target Summary: This

[clang] [RISCV] Disable generation of asynchronous unwind tables for RISCV baremetal (PR #81727)

2024-02-19 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek approved this pull request. https://github.com/llvm/llvm-project/pull/81727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NVPTX] Allow passing arguments to the linker while standalone (PR #73030)

2024-02-19 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/73030 >From ee43e8f9ae90bcd70d46b17cfecb854711a4b1ce Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Tue, 21 Nov 2023 13:45:10 -0600 Subject: [PATCH] [Clang][NVPTX] Allow passing arguments to the linker while standa

[clang] [Clang][NVPTX] Allow passing arguments to the linker while standalone (PR #73030)

2024-02-19 Thread Joseph Huber via cfe-commits
jhuber6 wrote: Ping, once https://github.com/llvm/llvm-project/pull/81921 lands this patch won't cause any issues with the `libc` build like it does currently so I'd like to land this afterwards. https://github.com/llvm/llvm-project/pull/73030 ___ cf

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

2024-02-19 Thread via cfe-commits
AtariDreams wrote: Ping https://github.com/llvm/llvm-project/pull/81335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [polly] [clang-format] Correctly annotate block braces of empty ctors/dtors (PR #82097)

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

[clang] [alpha.webkit.UncountedCallArgsChecker] Allow ASSERT and atomic operations in a trivial function (PR #82063)

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

[clang] [alpha.webkit.UncountedCallArgsChecker] Allow ASSERT and atomic operations in a trivial function (PR #82063)

2024-02-19 Thread Artem Dergachev via cfe-commits
@@ -356,6 +364,14 @@ class TrivialFunctionAnalysisVisitor return TrivialFunctionAnalysis::isTrivialImpl(Callee, Cache); } + bool VisitCXXDefaultArgExpr(const CXXDefaultArgExpr *E) { haoNoQ wrote: In theory this may need to be cached because it may caus

[clang] [alpha.webkit.UncountedCallArgsChecker] Allow ASSERT and atomic operations in a trivial function (PR #82063)

2024-02-19 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ approved this pull request. LGTM thanks! https://github.com/llvm/llvm-project/pull/82063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.UncountedCallArgsChecker] Ignore calls to WTF's container methods (PR #82156)

2024-02-19 Thread Artem Dergachev via cfe-commits
@@ -25,6 +25,11 @@ using namespace ento; namespace { +bool stringEndsWith(const std::string &str, const std::string &suffix) { + auto index = str.rfind(suffix); + return index != std::string::npos && str.size() - suffix.size() == index; +} haoNoQ wrote: Co

[clang] 8de2300 - [clang-format] Correctly annotate braces of empty ctors/dtors (#82097)

2024-02-19 Thread via cfe-commits
Author: Owen Pan Date: 2024-02-19T12:41:22-08:00 New Revision: 8de230093f585b64fcd642b46e6560131e95b394 URL: https://github.com/llvm/llvm-project/commit/8de230093f585b64fcd642b46e6560131e95b394 DIFF: https://github.com/llvm/llvm-project/commit/8de230093f585b64fcd642b46e6560131e95b394.diff LOG:

[clang] [polly] [clang-format] Correctly annotate block braces of empty ctors/dtors (PR #82097)

2024-02-19 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/82097 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #79236)

2024-02-19 Thread Jun Wang via cfe-commits
jwanggit86 wrote: > Did you try to move this to SIInsertWaitCnt, as suggested? > Did you try to move this to SIInsertWaitCnt, as suggested? Pls see my reply on Feb 15, which is copy-pasted below. Regarding the question about SIInsertWaitcnt, initially the code was indeed put there (see PR h

[clang] [alpha.webkit.UncountedCallArgsChecker] Ignore calls to WTF's container methods (PR #82156)

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

[clang] [Clang][Sema] Convert warning for extraneous template parameter lists to an extension warning (PR #82277)

2024-02-19 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/82277 We currently accept the following explicit specialization with a warning for the extraneous template parameter list: ```cpp template void f(); template<> template<> void f(); // warning: extraneous template p

[clang] [Clang][Sema] Convert warning for extraneous template parameter lists to an extension warning (PR #82277)

2024-02-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Krystian Stasiowski (sdkrystian) Changes We currently accept the following explicit specialization with a warning for the extraneous template parameter list: ```cpp template void f(); template<> template<> void f(); // wa

[clang] [Clang][Sema] Convert warning for extraneous template parameter lists to an extension warning (PR #82277)

2024-02-19 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian edited https://github.com/llvm/llvm-project/pull/82277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [codegen] Emit missing cleanups when an expression contains a branch (PR #80698)

2024-02-19 Thread Utkarsh Saxena via cfe-commits
@@ -592,10 +590,14 @@ void AggExprEmitter::EmitArrayInit(Address DestPtr, llvm::ArrayType *AType, // observed to be unnecessary. if (endOfInit.isValid()) Builder.CreateStore(element, endOfInit); } - -LValue elementLV = CGF.MakeAddrLValue( -Address(e

[clang] [clang-tools-extra] [codegen] Emit missing cleanups when an expression contains a branch (PR #80698)

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

[clang] [clang-tools-extra] [codegen] Emit missing cleanups when an expression contains a branch (PR #80698)

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

[clang] [clang-tools-extra] [codegen] Emit missing cleanups when an expression contains a branch (PR #80698)

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

[clang] [clang-format] Fix RemoveSemicolon for empty ctors/dtors (PR #82278)

2024-02-19 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/82278 Fixes #79833. >From 4bcf6dba8b97096801be550c4a8d1626ed57e475 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 19 Feb 2024 13:11:29 -0800 Subject: [PATCH] [clang-format] Fix RemoveSemicolon for empty ctors/dtors

[clang] [clang-format] Fix RemoveSemicolon for empty ctors/dtors (PR #82278)

2024-02-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #79833. --- Full diff: https://github.com/llvm/llvm-project/pull/82278.diff 2 Files Affected: - (modified) clang/lib/Format/Format.cpp (+16-7) - (modified) clang/unittests/Format/FormatTest.cpp (+

[clang] [clang-format] Fix RemoveSemicolon for empty functions (PR #82278)

2024-02-19 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/82278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fixes to immediate-escalating functions (PR #82281)

2024-02-19 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/82281 * Consider that immediate escalating function can appear at global scope, fixing a crash * Lambda conversion to function pointer was sometimes not performed in an immediate function context when it should be.

[clang] [Clang] Fixes to immediate-escalating functions (PR #82281)

2024-02-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes * Consider that immediate escalating function can appear at global scope, fixing a crash * Lambda conversion to function pointer was sometimes not performed in an immediate function context when it should be.

[clang] [clang] Define SwiftInfo for RISCVTargetCodeGenInfo (PR #82152)

2024-02-19 Thread Jon Roelofs via cfe-commits
jroelofs wrote: > Can this be tested? I don't know what the affects are. Might be as simple as adding another `RUN:` line to `clang/test/CodeGenCXX/arm-swiftcall.{c,cpp}` with a riscv triple. https://github.com/llvm/llvm-project/pull/82152 ___ cfe-co

[clang] [clang] Define SwiftInfo for RISCVTargetCodeGenInfo (PR #82152)

2024-02-19 Thread Alex Bradbury via cfe-commits
asb wrote: Yes, please add a trivial test if at all possible. https://github.com/llvm/llvm-project/pull/82152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #79236)

2024-02-19 Thread Jun Wang via cfe-commits
@@ -355,6 +356,18 @@ class SICacheControl { MachineBasicBlock::iterator &MI) const { return false; } + +public: + // The following is for supporting precise memory mode. When the option + // amdgpu-precise-memory is enabled, an s_waitc

[clang] Turn 'counted_by' into a type attribute and parse it into 'CountAttributedType' (PR #78000)

2024-02-19 Thread Yeoul Na via cfe-commits
rapidsna wrote: @AaronBallman @erichkeane gentle reminder. Does my reasoning [above](https://github.com/llvm/llvm-project/pull/78000#issuecomment-1932496432) to make a new sugar type make sense? https://github.com/llvm/llvm-project/pull/78000 ___ cfe

[clang] [llvm] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #79236)

2024-02-19 Thread Jun Wang via cfe-commits
@@ -167,6 +167,10 @@ def FeatureCuMode : SubtargetFeature<"cumode", "Enable CU wavefront execution mode" >; +def FeaturePreciseMemory jwanggit86 wrote: The function `hasFlag()` actually appears to be pretty expensive, and it's going to be called every time

[clang] [clang-format] Fix AllowShortLambdasOnASingleLine interfering with lambda brace wrapping. (PR #81848)

2024-02-19 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/81848 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 22fc2cb - [clang-format] Fix AllowShortLambdasOnASingleLine interfering with lambda brace wrapping. (#81848)

2024-02-19 Thread via cfe-commits
Author: rmarker Date: 2024-02-19T14:32:06-08:00 New Revision: 22fc2cb15d9e9bfb84145c6891fb748e8e52757e URL: https://github.com/llvm/llvm-project/commit/22fc2cb15d9e9bfb84145c6891fb748e8e52757e DIFF: https://github.com/llvm/llvm-project/commit/22fc2cb15d9e9bfb84145c6891fb748e8e52757e.diff LOG:

[clang] [docs] [C++20] [Modules] Ideas for transitioning to modules (PR #80687)

2024-02-19 Thread David Blaikie via cfe-commits
https://github.com/dwblaikie approved this pull request. Seems ok https://github.com/llvm/llvm-project/pull/80687 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.UncountedCallArgsChecker] Allow ASSERT and atomic operations in a trivial function (PR #82063)

2024-02-19 Thread Ryosuke Niwa via cfe-commits
@@ -356,6 +364,14 @@ class TrivialFunctionAnalysisVisitor return TrivialFunctionAnalysis::isTrivialImpl(Callee, Cache); } + bool VisitCXXDefaultArgExpr(const CXXDefaultArgExpr *E) { rniwa wrote: Yeah, I'm adding more general caching mechanism for `Stmt

[clang] [Analyzer] Support RefAllowingPartiallyDestroyed and RefPtrAllowingPartiallyDestroyed (PR #82209)

2024-02-19 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82209 >From 5e365d2a873aafc17d4b03eb7fee10029ff2bea1 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sun, 18 Feb 2024 21:47:48 -0800 Subject: [PATCH] [Analyzer] Support RefAllowingPartiallyDestroyed and RefPtrAllowingP

[clang] [clang] [SemaCXX] Disallow deducing "this" on operator `new` and `delete` (PR #82251)

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

[clang] [clang] [SemaCXX] Disallow deducing "this" on operator `new` and `delete` (PR #82251)

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

[clang] [clang] [SemaCXX] Disallow deducing "this" on operator `new` and `delete` (PR #82251)

2024-02-19 Thread via cfe-commits
@@ -254,6 +254,8 @@ Bug Fixes to C++ Support Fixes (`#68490 `_) - Fix a crash when trying to call a varargs function that also has an explicit object parameter. Fixes (`#80971 ICE when explicit object parameter be a functi

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

2024-02-19 Thread John McCall via cfe-commits
https://github.com/rjmccall commented: Thanks, the breadth of tests looks good. Please improve the actual testing, though — CHECK lines are testing the IR output file at a whole, so now that there are multiple tests in this file, we really need to make these tests more specific. - First, ple

[clang] [libc] [llvm] [openmp] [libc] Rework the GPU build to be a regular target (PR #81921)

2024-02-19 Thread Jon Chesterfield via cfe-commits
@@ -50,31 +50,9 @@ function(collect_object_file_deps target result) endif() endfunction(collect_object_file_deps) -# A rule to build a library from a collection of entrypoint objects. -# Usage: -# add_entrypoint_library( -# DEPENDS -# ) -# -# NOTE: If one want

[clang] [libc] [llvm] [openmp] [libc] Rework the GPU build to be a regular target (PR #81921)

2024-02-19 Thread Joseph Huber via cfe-commits
@@ -50,31 +50,9 @@ function(collect_object_file_deps target result) endif() endfunction(collect_object_file_deps) -# A rule to build a library from a collection of entrypoint objects. -# Usage: -# add_entrypoint_library( -# DEPENDS -# ) -# -# NOTE: If one want

[clang] [analyzer] Improve handling of unsigned values in ArrayBoundCheckerV2 (PR #81034)

2024-02-19 Thread via cfe-commits
NagyDonat wrote: The main effect of this commit is that it eliminates ~300-400 ArrayBoundV2 reports. I didn't review each of them, but I checked dozens of them and those were all "Out of bound access to memory after the end of the region" false positives that tried to access something at index

[clang] [libc] [llvm] [openmp] [libc] Rework the GPU build to be a regular target (PR #81921)

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

[clang] [libc] [llvm] [openmp] [libc] Rework the GPU build to be a regular target (PR #81921)

2024-02-19 Thread Jon Chesterfield via cfe-commits
JonChesterfield wrote: One large patch may be necessary - is it also necessary to interleave reordering files with changing the contents? It makes the GUI diff tool we're using here essentially useless. If the moving code between files and factoring into functions was a separate commit we'd ha

[clang] [RISCV] Disable generation of asynchronous unwind tables for RISCV baremetal (PR #81727)

2024-02-19 Thread Fangrui Song via cfe-commits
@@ -421,3 +421,11 @@ // MIPSN32R6EL: "-target-cpu" "mips64r6" // MIPSN32R6EL: "-target-abi" "n32" // MIPSN32R6EL: "-mfloat-abi" "hard" + +// RUN: %clang --target=riscv32-unknown-elf --gcc-toolchain="" -### %s 2>&1 | FileCheck %s -check-prefix=NOUWTABLE MaskRay

[clang] [RISCV] Disable generation of asynchronous unwind tables for RISCV baremetal (PR #81727)

2024-02-19 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/81727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Disable generation of asynchronous unwind tables for RISCV baremetal (PR #81727)

2024-02-19 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/81727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c3b87a8 - [alpha.webkit.UncountedCallArgsChecker] Allow ASSERT and atomic operations in a trivial function (#82063)

2024-02-19 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2024-02-19T16:11:49-08:00 New Revision: c3b87a8810535b95ed1abd7c1ebd330131f68890 URL: https://github.com/llvm/llvm-project/commit/c3b87a8810535b95ed1abd7c1ebd330131f68890 DIFF: https://github.com/llvm/llvm-project/commit/c3b87a8810535b95ed1abd7c1ebd330131f68890.diff

[clang] [alpha.webkit.UncountedCallArgsChecker] Allow ASSERT and atomic operations in a trivial function (PR #82063)

2024-02-19 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/82063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.UncountedCallArgsChecker] Allow a variable declaration in a trivial function. (PR #82291)

2024-02-19 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/82291 None >From b0519e342b2e145827d6d9de490f32d1dd9c5fe6 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sat, 17 Feb 2024 18:12:16 -0800 Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Allow a variable decla

[clang] [alpha.webkit.UncountedCallArgsChecker] Allow a variable declaration in a trivial function. (PR #82291)

2024-02-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/82291.diff 2 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp (+5-2) - (modified) clan

[clang] [alpha.webkit.UncountedCallArgsChecker] Ignore calls to WTF's container methods (PR #82156)

2024-02-19 Thread Ryosuke Niwa via cfe-commits
@@ -25,6 +25,11 @@ using namespace ento; namespace { +bool stringEndsWith(const std::string &str, const std::string &suffix) { + auto index = str.rfind(suffix); + return index != std::string::npos && str.size() - suffix.size() == index; +} rniwa wrote: Oh,

[clang] Turn 'counted_by' into a type attribute and parse it into 'CountAttributedType' (PR #78000)

2024-02-19 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna updated https://github.com/llvm/llvm-project/pull/78000 >From c39871ed2ec642ab00360f2c3a18fba7c915f82d Mon Sep 17 00:00:00 2001 From: Yeoul Na Date: Mon, 18 Dec 2023 10:58:16 +0900 Subject: [PATCH 1/3] [BoundsSafety] Introduce CountAttributedType CountAttributedType

[clang] Turn 'counted_by' into a type attribute and parse it into 'CountAttributedType' (PR #78000)

2024-02-19 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna updated https://github.com/llvm/llvm-project/pull/78000 >From c39871ed2ec642ab00360f2c3a18fba7c915f82d Mon Sep 17 00:00:00 2001 From: Yeoul Na Date: Mon, 18 Dec 2023 10:58:16 +0900 Subject: [PATCH 1/4] [BoundsSafety] Introduce CountAttributedType CountAttributedType

[clang] [InstallAPI] Set InstallAPI as a standalone tool instead of CC1 action (PR #82293)

2024-02-19 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/82293 Installapi has important distinctions when compared to the clang driver, so much that, it doesn't make much sense to try to integrate into it. This patch partially reverts the CC1 action & driver support to

[clang] [InstallAPI] Set InstallAPI as a standalone tool instead of CC1 action (PR #82293)

2024-02-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Cyndy Ishida (cyndyishida) Changes Installapi has important distinctions when compared to the clang driver, so much that, it doesn't make much sense to try to integrate into it. This patch partially reverts the CC1 action & driver

[clang] [InstallAPI] Set InstallAPI as a standalone tool instead of CC1 action (PR #82293)

2024-02-19 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 030d07574f0252c21ed28ae258a5af0e577ea37b a98cd84ae140c4e78c12e61d2a40049b070c7bcf --

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2024-02-19 Thread Felix via cfe-commits
@@ -145,9 +164,94 @@ namespace { .addImm(0); if (IsAIX) { - // The variable offset and region handle are copied in r4 and r3. The - // copies are followed by GETtlsADDR32AIX/GETtlsADDR64AIX

[clang] [InstallAPI] Set InstallAPI as a standalone tool instead of CC1 action (PR #82293)

2024-02-19 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/82293 >From 7f6b664424f58782e8fcd085b252efa8e9415baa Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 19 Feb 2024 17:00:08 -0800 Subject: [PATCH] [InstallAPI] Set InstallAPI as a standalone tool instead of C

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2024-02-19 Thread Felix via cfe-commits
@@ -145,9 +164,94 @@ namespace { .addImm(0); if (IsAIX) { - // The variable offset and region handle are copied in r4 and r3. The - // copies are followed by GETtlsADDR32AIX/GETtlsADDR64AIX

[clang] Turn 'counted_by' into a type attribute and parse it into 'CountAttributedType' (PR #78000)

2024-02-19 Thread Yeoul Na via cfe-commits
@@ -8463,133 +8463,115 @@ static void handleZeroCallUsedRegsAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(ZeroCallUsedRegsAttr::Create(S.Context, Kind, AL)); } -static void handleCountedByAttr(Sema &S, Decl *D, const ParsedAttr &AL) { - if (!AL.isArgIdent(0)) {

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2024-02-19 Thread Felix via cfe-commits
orcguru wrote: > I believe some of the test cases also require updates as a result of #80162. Sure. Updated! https://github.com/llvm/llvm-project/pull/66316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [InstallAPI] Set InstallAPI as a standalone tool instead of CC1 action (PR #82293)

2024-02-19 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/82293 >From 7f6b664424f58782e8fcd085b252efa8e9415baa Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 19 Feb 2024 17:00:08 -0800 Subject: [PATCH 1/2] [InstallAPI] Set InstallAPI as a standalone tool instead

[clang] [clang-format] Limit how much work guessLanguage() can do (PR #78925)

2024-02-19 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > > Can we write a unit test for this? > > I'm open to trying but there are a few open questions in my mind: > > * Is it fine if the failure mode of a testcase is triggering an OOM? > > * Triggering the problematic codepath requires a combination of a large > fil

[clang] [clang-tools-extra] [codegen] Emit missing cleanups when an expression contains a branch (PR #80698)

2024-02-19 Thread Eli Friedman via cfe-commits
@@ -592,10 +590,14 @@ void AggExprEmitter::EmitArrayInit(Address DestPtr, llvm::ArrayType *AType, // observed to be unnecessary. if (endOfInit.isValid()) Builder.CreateStore(element, endOfInit); } - -LValue elementLV = CGF.MakeAddrLValue( -Address(e

[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

2024-02-19 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese created https://github.com/llvm/llvm-project/pull/82294 It turns out it's not that uncommon for real code to pass a different set of VFSs while building a PCH than while using the PCH. This can cause problems as seen in `test/ClangScanDeps/optimize-vfs-pch.m`. If y

[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

2024-02-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-adt Author: Michael Spencer (Bigcheese) Changes It turns out it's not that uncommon for real code to pass a different set of VFSs while building a PCH than while using the PCH. This can cause problems as seen in `test/ClangScanDeps/optimize-vfs-pc

[clang] [llvm] [mlir] Rename `ThreadPool::getThreadCount()` to `getMaxConcurrency()` (NFC) (PR #82296)

2024-02-19 Thread Mehdi Amini via cfe-commits
https://github.com/joker-eph created https://github.com/llvm/llvm-project/pull/82296 This is addressing a long-time TODO to rename this misleading API. The old one is preserved for now but marked deprecated. >From d381cf98345ff6a817958519a5aa456fbfdea1d2 Mon Sep 17 00:00:00 2001 From: Mehdi Am

[clang] [llvm] [mlir] Rename `ThreadPool::getThreadCount()` to `getMaxConcurrency()` (NFC) (PR #82296)

2024-02-19 Thread Mehdi Amini via cfe-commits
https://github.com/joker-eph updated https://github.com/llvm/llvm-project/pull/82296 >From 8c236920e5eb5703a64cd89a45f2cc89607b96fd Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Mon, 19 Feb 2024 17:34:33 -0800 Subject: [PATCH] Rename `ThreadPool::getThreadCount()` to `getMaxConcurrency()` (

[clang] [llvm] [mlir] Rename `ThreadPool::getThreadCount()` to `getMaxConcurrency()` (NFC) (PR #82296)

2024-02-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mehdi Amini (joker-eph) Changes This is addressing a long-time TODO to rename this misleading API. The old one is preserved for now but marked deprecated. --- Full diff: https://github.com/llvm/llvm-project/pull/82296.diff 9 Files Affec

[clang] [llvm] [mlir] Rename `ThreadPool::getThreadCount()` to `getMaxConcurrency()` (NFC) (PR #82296)

2024-02-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mlir Author: Mehdi Amini (joker-eph) Changes This is addressing a long-time TODO to rename this misleading API. The old one is preserved for now but marked deprecated. --- Full diff: https://github.com/llvm/llvm-project/pull/82296.diff 9 Files Affect

[clang] [llvm] [mlir] Rename `ThreadPool::getThreadCount()` to `getMaxConcurrency()` (NFC) (PR #82296)

2024-02-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mlir-execution-engine @llvm/pr-subscribers-mlir-core Author: Mehdi Amini (joker-eph) Changes This is addressing a long-time TODO to rename this misleading API. The old one is preserved for now but marked deprecated. --- Full diff: https://github.com/ll

[clang] [flang] [RFC][flang][runtime] Add FortranFloat128Math wrapper library. (PR #81971)

2024-02-19 Thread Slava Zakharin via cfe-commits
@@ -657,10 +657,61 @@ static llvm::cl::opt "instead of libm complex operations"), llvm::cl::init(false)); +/// Return a string containing the given Fortran intrinsic name +/// with the type of its arguments specified in

[clang] [llvm] [mlir] Rename `ThreadPool::getThreadCount()` to `getMaxConcurrency()` (NFC) (PR #82296)

2024-02-19 Thread Alexandre Ganea via cfe-commits
https://github.com/aganea approved this pull request. Lg, thanks! https://github.com/llvm/llvm-project/pull/82296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] Rename `ThreadPool::getThreadCount()` to `getMaxConcurrency()` (NFC) (PR #82296)

2024-02-19 Thread Mehdi Amini via cfe-commits
https://github.com/joker-eph closed https://github.com/llvm/llvm-project/pull/82296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ScanDeps] Canonicalize -D and -U flags (PR #82298)

2024-02-19 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese created https://github.com/llvm/llvm-project/pull/82298 Canonicalize `-D` and `-U` flags by sorting them and only keeping the last instance of a given name. This optimization will only fire if all `-D` and `-U` flags start with a simple identifier that we can guar

[clang] [clang][ScanDeps] Canonicalize -D and -U flags (PR #82298)

2024-02-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Michael Spencer (Bigcheese) Changes Canonicalize `-D` and `-U` flags by sorting them and only keeping the last instance of a given name. This optimization will only fire if all `-D` and `-U` flags start with a simple identifier that we c

[clang] [clang][ScanDeps] Canonicalize -D and -U flags (PR #82298)

2024-02-19 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 61ae7e498253d72422cef853798fc2bee1c731cf c89bcfd061066433c90b854ebb0bc369268797ee --

[clang] [InstallAPI] Set InstallAPI as a standalone tool instead of CC1 action (PR #82293)

2024-02-19 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/82293 >From bddd3cc6f0989309599ebc68ce510706b32feba6 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 19 Feb 2024 17:00:08 -0800 Subject: [PATCH] [InstallAPI] Set InstallAPI as a standalone tool instead of C

[clang] [Driver] Unify InstalledDir and Dir (PR #80527)

2024-02-19 Thread Fangrui Song via cfe-commits
MaskRay wrote: > From my point of view, I think this sounds fine - it looks like you've looked > through this and thought deeper about it than I have at least. I'm not deep > enough into this to comfortably press approved on this for now though, so > hopefully someone else can chime in as well

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

2024-02-19 Thread Wang Pengcheng via cfe-commits
https://github.com/wangpc-pp edited https://github.com/llvm/llvm-project/pull/76357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2024-02-19 Thread Felix via cfe-commits
@@ -145,9 +164,94 @@ namespace { .addImm(0); if (IsAIX) { - // The variable offset and region handle are copied in r4 and r3. The - // copies are followed by GETtlsADDR32AIX/GETtlsADDR64AIX

[clang] [clang][ScanDeps] Canonicalize -D and -U flags (PR #82298)

2024-02-19 Thread Jan Svoboda via cfe-commits
@@ -179,6 +179,73 @@ static void sanitizeDiagOpts(DiagnosticOptions &DiagOpts) { DiagOpts.IgnoreWarnings = true; } +// Clang implements -D and -U by splatting text into a predefines buffer. This +// allows constructs such as `-DFඞ=3 "-D F\u{0D9E} 4 3 2”` to be accepted and +

<    1   2   3   >