[clang] [clang-format][Docs] Remove duplicated words in AlignCaseColons description (PR #77368)

2024-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yehezkel Bernat (YehezkelShB) Changes A few words got duplicated in the documentation of AlignCaseColons option for AlignConsecutiveShortCaseStatements Remove them to improve readability --- Full diff: https://github.com/llvm/llvm-projec

[clang] [clang-format][Docs] Remove duplicated words in AlignCaseColons description (PR #77368)

2024-01-08 Thread Yehezkel Bernat via cfe-commits
YehezkelShB wrote: @galenelias FYI https://github.com/llvm/llvm-project/pull/77368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [openmp] [clang-tools-extra] [clang] [compiler-rt] [llvm] [OpenMP][libomptarget] Enable automatic unified shared memory executi… (PR #75999)

2024-01-08 Thread via cfe-commits
https://github.com/carlobertolli closed https://github.com/llvm/llvm-project/pull/75999 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6684a09 - [Driver] Add the --gcc-triple option (#73214)

2024-01-08 Thread via cfe-commits
Author: Tom Stellard Date: 2024-01-08T12:20:17-08:00 New Revision: 6684a09ca84b44f320052a77cb01cb4216e6511b URL: https://github.com/llvm/llvm-project/commit/6684a09ca84b44f320052a77cb01cb4216e6511b DIFF: https://github.com/llvm/llvm-project/commit/6684a09ca84b44f320052a77cb01cb4216e6511b.diff

[clang] [Driver] Add the --gcc-triple option (PR #73214)

2024-01-08 Thread Tom Stellard via cfe-commits
https://github.com/tstellar closed https://github.com/llvm/llvm-project/pull/73214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Support -pthread in the frontend (PR #77360)

2024-01-08 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: > @banach-space, Is the intention for the `-pthread` option to be illegal in > flang? I'm not aware of such intentions, but if we are to add a flag to Flang, could we also have a meaningful test? https://github.com/llvm/llvm-project/pull/75739#issuecomment-1859268789 > At

[clang] [flang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-01-08 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: Thanks - could you also update the driver docs? https://github.com/llvm/llvm-project/pull/77365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFC] Fix out-of-bounds access (PR #77193)

2024-01-08 Thread Ben Vanik via cfe-commits
benvanik wrote: just hit this too and was about to submit the same fix - thanks for doing this! https://github.com/llvm/llvm-project/pull/77193 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[lld] [mlir] [lldb] [openmp] [clang] [flang] [compiler-rt] [libc] [libcxx] [polly] [llvm] [WebAssembly] Correctly consider signext/zext arg flags at function declaration (PR #77281)

2024-01-08 Thread Juneyoung Lee via cfe-commits
https://github.com/aqjune updated https://github.com/llvm/llvm-project/pull/77281 >From 1bbfe05bc50e1fbdb207f21a178b6fc7ab24e8cf Mon Sep 17 00:00:00 2001 From: Juneyoung Lee Date: Mon, 8 Jan 2024 02:01:41 -0600 Subject: [PATCH] [WebAssembly] Correctly consider signext/zext arg flags at functio

[clang-tools-extra] [clang] [llvm] [mlir] [mlir][spirv] Fix spirv dialect to support Specialization constants as GlobalVar initializer (PR #75660)

2024-01-08 Thread Dimple Prajapati via cfe-commits
drprajap wrote: > Thanks for the contribution! Sorry about the delay in reviews. I do have some > style-ish comments but given this has been a while I just went ahead fixed > them and will land this path directly. Thanks again! Thanks for the review and merging it. No worries about the delay,

[flang] [clang] [flang][Driver] Support -pthread in the frontend (PR #77360)

2024-01-08 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: @banach-space. Thanks for clarifying. I'll look into creating a test that fails without `-pthread`. https://github.com/llvm/llvm-project/pull/77360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang-tools-extra] [clang-tidy]unused using decls only check cpp files (PR #77335)

2024-01-08 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/77335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] New calling convention preserve_none (PR #76868)

2024-01-08 Thread via cfe-commits
@@ -1056,6 +1056,22 @@ def CC_Intel_OCL_BI : CallingConv<[ CCDelegateTo ]>; +def CC_X86_64_Preserve_None : CallingConv<[ + // We don't preserve general registers, so all of them can be used to pass + // arguments except + // - RBP frame pointer weiguoz

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Bill Wendling via cfe-commits
@@ -944,22 +951,259 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } +namespace { + +/// \p StructAccessBase returns the base \p Expr of a field access. It returns +/// either a \p DeclRefExpr, representing the base pointer to the struct,

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Bill Wendling via cfe-commits
@@ -1155,15 +1159,14 @@ const FieldDecl *CodeGenFunction::FindCountedByField(const FieldDecl *FD) { return nullptr; auto GetNonAnonStructOrUnion = [](const RecordDecl *RD) { -while (RD && !RD->getDeclName()) - if (const auto *R = dyn_cast(RD->getDeclContext()))

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Bill Wendling via cfe-commits
@@ -818,6 +819,189 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } +const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberField( +ASTContext &Ctx, const RecordDecl *R

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Bill Wendling via cfe-commits
@@ -818,6 +819,189 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } +const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberField( +ASTContext &Ctx, const RecordDecl *R

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Bill Wendling via cfe-commits
@@ -944,22 +951,259 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } +namespace { + +/// \p StructAccessBase returns the base \p Expr of a field access. It returns +/// either a \p DeclRefExpr, representing the base pointer to the struct,

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Bill Wendling via cfe-commits
@@ -944,22 +951,262 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } +namespace { + +/// \p StructAccessBase returns the base \p Expr of a field access. It returns +/// either a \p DeclRefExpr, representing the base pointer to the struct,

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Bill Wendling via cfe-commits
@@ -944,22 +951,259 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } +namespace { + +/// \p StructAccessBase returns the base \p Expr of a field access. It returns +/// either a \p DeclRefExpr, representing the base pointer to the struct,

[clang] [clang] Update cxx_dr_status.html (PR #77372)

2024-01-08 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/77372 This patch updates cxx_dr_status.html with the latest changes from CWG, while also changing status of tests written for unresolved issues. The latter part requires review from their author. >From 06c25af8522958

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #75841)

2024-01-08 Thread Louis Dionne via cfe-commits
ldionne wrote: @aeubanks @petrhosek Can you folks share what was the top level invocations you did to get those errors? I am having trouble understanding the problem just from the pasted errors. https://github.com/llvm/llvm-project/pull/75841 ___ cfe

[clang] [clang] Update cxx_dr_status.html (PR #77372)

2024-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This patch updates cxx_dr_status.html with the latest changes from CWG, while also changing status of tests written for unresolved issues. The latter part requires review from their author. --- Patch

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Bill Wendling via cfe-commits
@@ -818,6 +819,189 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } +const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberField( +ASTContext &Ctx, const RecordDecl *R

[libcxx] [llvm] [libunwind] [libc++] Allow running the test suite with optimizations (PR #68753)

2024-01-08 Thread Louis Dionne via cfe-commits
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/68753 >From 66c95807524dc8371c83e80d6f4ba58056f455af Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Tue, 10 Oct 2023 16:35:11 -0700 Subject: [PATCH] [libc++] Allow running the test suite with optimizations This pat

[clang] [Clang][NFC] Fix out-of-bounds access (PR #77193)

2024-01-08 Thread Quinn Dawkins via cfe-commits
qedawkins wrote: (kind ping) Any eta on landing this? It would be nice to have the fix downstream; do you need help from someone with merge access? https://github.com/llvm/llvm-project/pull/77193 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[llvm] [clang] [SPARC] Consume `tune-cpu` directive in the backend (PR #77195)

2024-01-08 Thread Sergei Barannikov via cfe-commits
@@ -5119,7 +5119,7 @@ def module_file_info : Flag<["-"], "module-file-info">, Flags<[]>, HelpText<"Provide information about a particular module file">; def mthumb : Flag<["-"], "mthumb">, Group; def mtune_EQ : Joined<["-"], "mtune=">, Group, - HelpText<"Only supported on A

[clang] [llvm] [SPARC] Support reserving arbitrary general purpose registers (PR #74927)

2024-01-08 Thread Sergei Barannikov via cfe-commits
@@ -1125,6 +1130,10 @@ Register SparcTargetLowering::getRegisterByName(const char* RegName, LLT VT, .Case("g4", SP::G4).Case("g5", SP::G5).Case("g6", SP::G6).Case("g7", SP::G7) .Default(0); + const SparcRegisterInfo *TRI = Subtarget->getRegisterInfo(); + if (!TRI->

[lldb] [libcxxabi] [libunwind] [flang] [lld] [clang] [compiler-rt] [libc] [libcxx] [mlir] [polly] [llvm] [clang-tools-extra] Make clang report invalid target versions. (PR #75373)

2024-01-08 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/75373 >From 74f256d8a77ee2ba8e0d5bbb6519aa2729cf94d5 Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Wed, 13 Dec 2023 20:07:45 + Subject: [PATCH 01/13] Make clang report garbage target versions. Clang always s

[llvm] [compiler-rt] [mlir] [libcxx] [clang] [lldb] [libunwind] [clang-tools-extra] [polly] [libc] [flang] [lld] [libcxxabi] Make clang report invalid target versions. (PR #75373)

2024-01-08 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/75373 >From 74f256d8a77ee2ba8e0d5bbb6519aa2729cf94d5 Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Wed, 13 Dec 2023 20:07:45 + Subject: [PATCH 01/14] Make clang report garbage target versions. Clang always s

[llvm] [libcxx] [libunwind] [libc++] Allow running the test suite with optimizations (PR #68753)

2024-01-08 Thread Louis Dionne via cfe-commits
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/68753 >From 66c95807524dc8371c83e80d6f4ba58056f455af Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Tue, 10 Oct 2023 16:35:11 -0700 Subject: [PATCH 1/2] [libc++] Allow running the test suite with optimizations This

[lldb] [libcxxabi] [libunwind] [flang] [lld] [clang] [compiler-rt] [libc] [libcxx] [mlir] [polly] [llvm] [clang-tools-extra] Make clang report invalid target versions. (PR #75373)

2024-01-08 Thread via cfe-commits
@@ -1430,6 +1430,18 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) { const ToolChain &TC = getToolChain( *UArgs, computeTargetTriple(*this, TargetTriple, *UArgs)); + if (TC.getTriple().isAndroid()) { +llvm::Triple Triple = TC.getTriple(); +unsigned

[clang-tools-extra] [mlir] [llvm] [clang] [mlir][python] Fix generation of python bindings for async dialect (PR #75960)

2024-01-08 Thread Abhishek Kulkarni via cfe-commits
https://github.com/adk9 updated https://github.com/llvm/llvm-project/pull/75960 >From a43ef7289cd7f5353fc4b365566011b93879e8f6 Mon Sep 17 00:00:00 2001 From: Abhishek Kulkarni Date: Tue, 19 Dec 2023 10:50:26 -0800 Subject: [PATCH] Fix generation of python bindings for async dialect --- .../mli

[clang] Set dllstorage on ObjectiveC ivar offsets (PR #77385)

2024-01-08 Thread Frederik Carlier via cfe-commits
https://github.com/qmfrederik created https://github.com/llvm/llvm-project/pull/77385 Mark instance variable offset symbols with `dllexport`/`dllimport` if they are not hidden and the interface declaration is marked with `dllexport`/`dllimport`, when using the GNUstep 2.x ABI. /cc @davidchisn

[clang] Set dllstorage on ObjectiveC ivar offsets (PR #77385)

2024-01-08 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it i

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Bill Wendling via cfe-commits
@@ -818,6 +819,189 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } +const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberField( +ASTContext &Ctx, const RecordDecl *R

[clang] Set dllstorage on ObjectiveC ivar offsets (PR #77385)

2024-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Frederik Carlier (qmfrederik) Changes Mark instance variable offset symbols with `dllexport`/`dllimport` if they are not hidden and the interface declaration is marked with `dllexport`/`dllimport`, when

[clang] [-Wunsafe-buffer-usage] Add a new warning for uses of std::span two-parameter constructors (PR #77148)

2024-01-08 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 updated https://github.com/llvm/llvm-project/pull/77148 >From 6ba957670ca593094b4545c35801585da2ee02a8 Mon Sep 17 00:00:00 2001 From: ziqingluo-90 Date: Fri, 5 Jan 2024 13:39:39 -0800 Subject: [PATCH 1/2] [-Wunsafe-buffer-usage] Add a new warning for use of two-

[llvm] [compiler-rt] [lldb] [mlir] [libc] [libcxx] [openmp] [clang] [flang] [lld] [polly] [WebAssembly] Correctly consider signext/zext arg flags at function declaration (PR #77281)

2024-01-08 Thread Derek Schuff via cfe-commits
@@ -0,0 +1,125 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc < %s -O0 | FileCheck %s dschuff wrote: Is there a test that covers this behavior for DAG ISel? Maybe it would make sense to add test expectations for bot

[llvm] [lld] [clang] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-08 Thread Micah Weston via cfe-commits
@@ -7574,30 +7573,38 @@ template void LLVMELFDumper::printBBAddrMaps() { continue; } for (const BBAddrMap &AM : *BBAddrMapOrErr) { - DictScope D(W, "Function"); - W.printHex("At", AM.Addr); + DictScope FD(W, "Function"); + if (AM.BBRanges.emp

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Kees Cook via cfe-commits
kees wrote: Possibly due to bug #72032 , I can get this tree to crash using the latest `array-bounds.c` test from https://github.com/kees/kernel-tools/tree/trunk/fortify Specifically: ``` struct anon_struct { unsigned long flags; long count; int array[] __counted_by(cou

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-01-08 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: the clang changes should be split into a followup patch https://github.com/llvm/llvm-project/pull/76868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Yeoul Na via cfe-commits
@@ -944,22 +951,259 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } +namespace { + +/// \p StructAccessBase returns the base \p Expr of a field access. It returns +/// either a \p DeclRefExpr, representing the base pointer to the struct,

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Yeoul Na via cfe-commits
@@ -818,6 +819,189 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } +const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberField( +ASTContext &Ctx, const RecordDecl *R

[clang] [Clang][NFC] Fix out-of-bounds access (PR #77193)

2024-01-08 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @qedawkins Ah, I should have clarified... I will need someone with write access to merge this :) https://github.com/llvm/llvm-project/pull/77193 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Yeoul Na via cfe-commits
@@ -818,6 +819,189 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } +const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberField( +ASTContext &Ctx, const RecordDecl *R

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Yeoul Na via cfe-commits
@@ -944,22 +951,262 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } +namespace { + +/// \p StructAccessBase returns the base \p Expr of a field access. It returns +/// either a \p DeclRefExpr, representing the base pointer to the struct,

[clang] f5145f4 - [Clang][NFC] Fix out-of-bounds access (#77193)

2024-01-08 Thread via cfe-commits
Author: Krystian Stasiowski Date: 2024-01-08T18:21:16-05:00 New Revision: f5145f4dc819d73ff8bebcfba3779533b150884e URL: https://github.com/llvm/llvm-project/commit/f5145f4dc819d73ff8bebcfba3779533b150884e DIFF: https://github.com/llvm/llvm-project/commit/f5145f4dc819d73ff8bebcfba3779533b150884e

[clang] [Clang][NFC] Fix out-of-bounds access (PR #77193)

2024-01-08 Thread Quinn Dawkins via cfe-commits
https://github.com/qedawkins closed https://github.com/llvm/llvm-project/pull/77193 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Bill Wendling via cfe-commits
bwendling wrote: @kees Should be fixed now. https://github.com/llvm/llvm-project/pull/76348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [lld] [clang] [llvm-driver] Fix usage of `InitLLVM` on Windows (PR #76306)

2024-01-08 Thread Fangrui Song via cfe-commits
MaskRay wrote: > InitLLVM which was part of the main() function of these tools `*_main` functions? https://github.com/llvm/llvm-project/pull/76306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[llvm] [lld] [clang] [llvm-driver] Fix usage of `InitLLVM` on Windows (PR #76306)

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

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Bill Wendling via cfe-commits
@@ -944,22 +951,259 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } +namespace { + +/// \p StructAccessBase returns the base \p Expr of a field access. It returns +/// either a \p DeclRefExpr, representing the base pointer to the struct,

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Bill Wendling via cfe-commits
@@ -818,6 +819,189 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } +const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberField( +ASTContext &Ctx, const RecordDecl *R

[lld] [openmp] [libcxx] [flang] [mlir] [libc] [lldb] [llvm] [clang] [polly] [compiler-rt] [WebAssembly] Correctly consider signext/zext arg flags at function declaration (PR #77281)

2024-01-08 Thread Juneyoung Lee via cfe-commits
https://github.com/aqjune updated https://github.com/llvm/llvm-project/pull/77281 >From 1bbfe05bc50e1fbdb207f21a178b6fc7ab24e8cf Mon Sep 17 00:00:00 2001 From: Juneyoung Lee Date: Mon, 8 Jan 2024 02:01:41 -0600 Subject: [PATCH 1/2] [WebAssembly] Correctly consider signext/zext arg flags at fun

[llvm] [lldb] [lld] [flang] [clang] [mlir] [libc] [openmp] [polly] [compiler-rt] [libcxx] [WebAssembly] Correctly consider signext/zext arg flags at function declaration (PR #77281)

2024-01-08 Thread Juneyoung Lee via cfe-commits
@@ -0,0 +1,125 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc < %s -O0 | FileCheck %s aqjune wrote: I added the -fast-isel=false case to check the case when the regular DAG ISel path is taken. https://github.com/ll

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Yeoul Na via cfe-commits
@@ -944,22 +951,259 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } +namespace { + +/// \p StructAccessBase returns the base \p Expr of a field access. It returns +/// either a \p DeclRefExpr, representing the base pointer to the struct,

[clang] [libcxx] [lld] [llvm] [compiler-rt] [flang] [libcxxabi] [openmp] [polly] [clang-tools-extra] [lldb] [libunwind] [mlir] [libc] Make clang report invalid target versions. (PR #75373)

2024-01-08 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/75373 >From 74f256d8a77ee2ba8e0d5bbb6519aa2729cf94d5 Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Wed, 13 Dec 2023 20:07:45 + Subject: [PATCH 01/14] Make clang report garbage target versions. Clang always s

[mlir] [polly] [clang-tools-extra] [llvm] [libcxx] [flang] [libunwind] [openmp] [lldb] [compiler-rt] [libcxxabi] [lld] [libc] [clang] Make clang report invalid target versions. (PR #75373)

2024-01-08 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/75373 >From 74f256d8a77ee2ba8e0d5bbb6519aa2729cf94d5 Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Wed, 13 Dec 2023 20:07:45 + Subject: [PATCH 01/15] Make clang report garbage target versions. Clang always s

[clang-tools-extra] a0ae525 - [clang-tidy]unused using decls only check cpp files (#77335)

2024-01-08 Thread via cfe-commits
Author: Congcong Cai Date: 2024-01-09T08:01:57+08:00 New Revision: a0ae5258065a856d5f8d9f8dcb12e9d8394f789f URL: https://github.com/llvm/llvm-project/commit/a0ae5258065a856d5f8d9f8dcb12e9d8394f789f DIFF: https://github.com/llvm/llvm-project/commit/a0ae5258065a856d5f8d9f8dcb12e9d8394f789f.diff

[clang-tools-extra] [clang-tidy]unused using decls only check cpp files (PR #77335)

2024-01-08 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/77335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-08 Thread Yeoul Na via cfe-commits
@@ -944,22 +951,259 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } +namespace { + +/// \p StructAccessBase returns the base \p Expr of a field access. It returns +/// either a \p DeclRefExpr, representing the base pointer to the struct,

[llvm] [clang-tools-extra] [PGO] Sampled instrumentation in PGO to speed up instrumentation binary (PR #69535)

2024-01-08 Thread via cfe-commits
https://github.com/xur-llvm updated https://github.com/llvm/llvm-project/pull/69535 >From 62728756fd56e3427376268c4178765950a27636 Mon Sep 17 00:00:00 2001 From: Rong Xu Date: Wed, 18 Oct 2023 15:13:15 -0700 Subject: [PATCH] [PGO] Sampled instrumentation in PGO to speed up instrumentation bina

[llvm] [clang] [SPARC] Consume `tune-cpu` directive in the backend (PR #77195)

2024-01-08 Thread via cfe-commits
@@ -5119,7 +5119,7 @@ def module_file_info : Flag<["-"], "module-file-info">, Flags<[]>, HelpText<"Provide information about a particular module file">; def mthumb : Flag<["-"], "mthumb">, Group; def mtune_EQ : Joined<["-"], "mtune=">, Group, - HelpText<"Only supported on A

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-01-08 Thread Erich Keane via cfe-commits
@@ -2868,6 +2868,11 @@ def M68kRTD: DeclOrTypeAttr { let Documentation = [M68kRTDDocs]; } +def PreserveNone : DeclOrTypeAttr { + let Spellings = [Clang<"preserve_none">]; erichkeane wrote: This should have a subjectlist set, since this is on functions, it

[llvm] [clang] New calling convention preserve_none (PR #76868)

2024-01-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/76868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-01-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: CFE changes aren't bad, just a few comments on how the attribute is defined in attr.td https://github.com/llvm/llvm-project/pull/76868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[flang] [libunwind] [libcxxabi] [openmp] [compiler-rt] [clang-tools-extra] [libcxx] [polly] [llvm] [lldb] [libc] [lld] [mlir] [clang] Make clang report invalid target versions. (PR #75373)

2024-01-08 Thread via cfe-commits
https://github.com/pirama-arumuga-nainar approved this pull request. Please also wait for @MaskRay's LGTM before merging. https://github.com/llvm/llvm-project/pull/75373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[lld] [libcxxabi] [openmp] [flang] [clang-tools-extra] [mlir] [libc] [libcxx] [llvm] [clang] [lldb] [libunwind] [polly] [compiler-rt] Make clang report invalid target versions. (PR #75373)

2024-01-08 Thread Fangrui Song via cfe-commits
@@ -786,4 +786,7 @@ def warn_android_unversioned_fallback : Warning< " directories will not be used in Clang 19. Provide a versioned directory" " for the target version or lower instead.">, InGroup>; + +def err_android_version_invalid : Error< + "Version %0 in triple %1

[clang] [clang] Better bitfield access units (PR #65742)

2024-01-08 Thread John McCall via cfe-commits
@@ -376,33 +377,41 @@ void CGRecordLowering::lowerUnion(bool isNoUniqueAddress) { } void CGRecordLowering::accumulateFields() { - for (RecordDecl::field_iterator Field = D->field_begin(), - FieldEnd = D->field_end(); -Field != FieldEnd;)

[clang] [clang] Better bitfield access units (PR #65742)

2024-01-08 Thread John McCall via cfe-commits
@@ -442,79 +455,235 @@ CGRecordLowering::accumulateBitFields(RecordDecl::field_iterator Field, return; } - // Check if OffsetInRecord (the size in bits of the current run) is better - // as a single field run. When OffsetInRecord has legal integer width, and - // its

[clang] [clang] Better bitfield access units (PR #65742)

2024-01-08 Thread John McCall via cfe-commits
@@ -442,79 +455,235 @@ CGRecordLowering::accumulateBitFields(RecordDecl::field_iterator Field, return; } - // Check if OffsetInRecord (the size in bits of the current run) is better - // as a single field run. When OffsetInRecord has legal integer width, and - // its

[clang] [clang] Better bitfield access units (PR #65742)

2024-01-08 Thread John McCall via cfe-commits
@@ -442,79 +455,235 @@ CGRecordLowering::accumulateBitFields(RecordDecl::field_iterator Field, return; } - // Check if OffsetInRecord (the size in bits of the current run) is better - // as a single field run. When OffsetInRecord has legal integer width, and - // its

[clang] [clang] Better bitfield access units (PR #65742)

2024-01-08 Thread John McCall via cfe-commits
@@ -415,12 +424,16 @@ CGRecordLowering::accumulateBitFields(RecordDecl::field_iterator Field, uint64_t StartBitOffset, Tail = 0; if (isDiscreteBitFieldABI()) { for (; Field != FieldEnd; ++Field) { - uint64_t BitOffset = getFieldBitOffset(*Field); + if (!Field

[clang] [clang] Better bitfield access units (PR #65742)

2024-01-08 Thread John McCall via cfe-commits
@@ -442,79 +455,235 @@ CGRecordLowering::accumulateBitFields(RecordDecl::field_iterator Field, return; } - // Check if OffsetInRecord (the size in bits of the current run) is better - // as a single field run. When OffsetInRecord has legal integer width, and - // its

[lld] [libcxxabi] [openmp] [flang] [clang-tools-extra] [mlir] [libc] [libcxx] [llvm] [clang] [lldb] [libunwind] [polly] [compiler-rt] Make clang report invalid target versions. (PR #75373)

2024-01-08 Thread Fangrui Song via cfe-commits
@@ -786,4 +786,7 @@ def warn_android_unversioned_fallback : Warning< " directories will not be used in Clang 19. Provide a versioned directory" " for the target version or lower instead.">, InGroup>; + +def err_android_version_invalid : Error< MaskRay wro

[lld] [libcxxabi] [openmp] [flang] [clang-tools-extra] [mlir] [libc] [libcxx] [llvm] [clang] [lldb] [libunwind] [polly] [compiler-rt] Make clang report invalid target versions. (PR #75373)

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

[mlir] [polly] [clang] [libunwind] [flang] [lld] [lldb] [compiler-rt] [clang-tools-extra] [libcxxabi] [libcxx] [openmp] [libc] [llvm] Make clang report invalid target versions. (PR #75373)

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

[mlir] [polly] [clang] [libunwind] [flang] [lld] [lldb] [compiler-rt] [clang-tools-extra] [libcxxabi] [libcxx] [openmp] [libc] [llvm] Make clang report invalid target versions. (PR #75373)

2024-01-08 Thread Jessica Clarke via cfe-commits
@@ -786,4 +786,7 @@ def warn_android_unversioned_fallback : Warning< " directories will not be used in Clang 19. Provide a versioned directory" " for the target version or lower instead.">, InGroup>; + +def err_android_version_invalid : Error< + "Version %0 in triple %1

[lld] [libcxxabi] [flang] [clang-tools-extra] [libc] [libcxx] [lldb] [llvm] [clang] [compiler-rt] [RISC-V][LLD] Add Support for RISC-V TLSDESC Relocations (PR #66916)

2024-01-08 Thread Fangrui Song via cfe-commits
MaskRay wrote: The base branch can be edited if you click "Edit" near the title, which will help reveal the lld side changes... https://github.com/llvm/llvm-project/pull/66916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[llvm] [clang] [SPARC] Consume `tune-cpu` directive in the backend (PR #77195)

2024-01-08 Thread via cfe-commits
https://github.com/koachan updated https://github.com/llvm/llvm-project/pull/77195 >From 119bf3db5799f3db2c7fd151f336c6d688a0eb96 Mon Sep 17 00:00:00 2001 From: Koakuma Date: Sat, 6 Jan 2024 19:46:56 +0700 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF-8?q?i

[lld] [libcxxabi] [flang] [clang-tools-extra] [libc] [libcxx] [lldb] [llvm] [clang] [compiler-rt] [RISCV] Support Global Dynamic TLSDESC in the RISC-V backend (PR #66915)

2024-01-08 Thread Fangrui Song via cfe-commits
@@ -3,8 +3,8 @@ # Out of range immediates ## simm12 -flh ft1, -2049(a0) # CHECK: :[[@LINE]]:10: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo modifier or an integer in the range [-2048, 2047] -fsh ft2, 2048(a1) # CHECK: :[[@LINE]]:10: error: operand must be a s

[lld] [libcxxabi] [flang] [clang-tools-extra] [libc] [libcxx] [lldb] [llvm] [clang] [compiler-rt] [RISCV] Support Global Dynamic TLSDESC in the RISC-V backend (PR #66915)

2024-01-08 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,44 @@ +# RUN: llvm-mc -filetype=obj -triple riscv32 < %s --defsym RV32=1 | llvm-objdump -d -M no-aliases - | FileCheck %s --check-prefixes=INST,RV32 +# RUN: llvm-mc -filetype=obj -triple riscv64 < %s | llvm-objdump -d -M no-aliases - | FileCheck %s --check-prefixes=I

[lld] [libcxxabi] [openmp] [flang] [clang-tools-extra] [mlir] [libc] [libcxx] [llvm] [clang] [lldb] [libunwind] [polly] [compiler-rt] Make clang report invalid target versions. (PR #75373)

2024-01-08 Thread Fangrui Song via cfe-commits
@@ -786,4 +786,7 @@ def warn_android_unversioned_fallback : Warning< " directories will not be used in Clang 19. Provide a versioned directory" " for the target version or lower instead.">, InGroup>; + +def err_android_version_invalid : Error< + "Version %0 in triple %1

[clang] [clang] pop explicit to keep context stack balance (PR #77312)

2024-01-08 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/77312 >From e31bf72dfadd4f4b9a316917cc0919fdef203498 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Mon, 8 Jan 2024 22:15:09 +0800 Subject: [PATCH] [clang] pop explicit to keep context stack balance --- clang/lib/Parse/

[clang] [ARM] arm_acle.h add Coprocessor Instrinsics (PR #75440)

2024-01-08 Thread via cfe-commits
hstk30-hw wrote: > There are some typos in the commit message and in the PR title. @vhscampos Check again. Fixed the typos. https://github.com/llvm/llvm-project/pull/75440 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[mlir] [libcxx] [openmp] [polly] [compiler-rt] [lld] [llvm] [clang-tools-extra] [libc] [clang] [flang] [CostModel][X86] Fix fpext conversion cost for 16 elements (PR #76278)

2024-01-08 Thread via cfe-commits
https://github.com/HaohaiWen closed https://github.com/llvm/llvm-project/pull/76278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] pop explicit to keep context stack balance (PR #77312)

2024-01-08 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/77312 >From f5813ab00fb26148b79f8a419436abf14ad9ee34 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Mon, 8 Jan 2024 22:15:09 +0800 Subject: [PATCH] [clang] pop explicit to keep context stack balance --- clang/lib/Parse/

[lldb] [libunwind] [libcxx] [compiler-rt] [lld] [llvm] [clang-tools-extra] [libc] [clang] [flang] [libc++][test] try to directly create socket file in /tmp when filepath is too long (PR #77058)

2024-01-08 Thread Wu Yingcong via cfe-commits
yingcong-wu wrote: Great, thank you. I don't have commit access, could you please help land this patch for me? https://github.com/llvm/llvm-project/pull/77058 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] c54a8ac - [Sema] Use StringRef::ltrim (NFC)

2024-01-08 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2024-01-08T17:12:26-08:00 New Revision: c54a8ac35ab0fe3b7d204dc9867bf05fcb1775cd URL: https://github.com/llvm/llvm-project/commit/c54a8ac35ab0fe3b7d204dc9867bf05fcb1775cd DIFF: https://github.com/llvm/llvm-project/commit/c54a8ac35ab0fe3b7d204dc9867bf05fcb1775cd.diff L

[clang] Objective C: use C++ exceptions on MinGW+GNUstep (PR #77255)

2024-01-08 Thread Saleem Abdulrasool via cfe-commits
@@ -819,10 +819,19 @@ class CGObjCGNUstep : public CGObjCGNU { SlotLookupSuperFn.init(&CGM, "objc_slot_lookup_super", SlotTy, PtrToObjCSuperTy, SelectorTy); // If we're in ObjC++ mode, then we want to make - if (usesSEHExceptions) {

[clang] Objective C: use C++ exceptions on MinGW+GNUstep (PR #77255)

2024-01-08 Thread Saleem Abdulrasool via cfe-commits
@@ -3993,7 +4009,9 @@ void CGObjCGNU::EmitThrowStmt(CodeGenFunction &CGF, ExceptionAsObject = CGF.ObjCEHValueStack.back(); isRethrow = true; } - if (isRethrow && usesSEHExceptions) { + if (isRethrow && + (usesSEHExceptions || (CGM.getTarget().getTriple().isOSCy

[clang] Objective C: use C++ exceptions on MinGW+GNUstep (PR #77255)

2024-01-08 Thread Saleem Abdulrasool via cfe-commits
@@ -210,7 +212,10 @@ static const EHPersonality &getObjCXXPersonality(const TargetInfo &Target, return getObjCPersonality(Target, L); case ObjCRuntime::GNUstep: -return EHPersonality::GNU_ObjCXX; +if (Target.getTriple().isOSCygMing()) + return EHPersonality

[compiler-rt] [libcxx] [mlir] [clang] [clang-tools-extra] [lld] [libcxxabi] [lldb] [libc] [openmp] [llvm] [msan] Unwind stack before fatal reports (PR #77168)

2024-01-08 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/77168 >From a127373cf1ac1676ce17ce8dca909d0c3bce9d18 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Mon, 8 Jan 2024 11:45:37 -0800 Subject: [PATCH 1/2] [NFC][msan] Switch allocator interface to use BufferedStackT

[compiler-rt] [libcxx] [mlir] [clang] [clang-tools-extra] [lld] [libcxxabi] [lldb] [libc] [openmp] [llvm] [msan] Unwind stack before fatal reports (PR #77168)

2024-01-08 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/77168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPARC] Consume `tune-cpu` directive in the backend (PR #77195)

2024-01-08 Thread Sergei Barannikov via cfe-commits
@@ -5119,7 +5119,7 @@ def module_file_info : Flag<["-"], "module-file-info">, Flags<[]>, HelpText<"Provide information about a particular module file">; def mthumb : Flag<["-"], "mthumb">, Group; def mtune_EQ : Joined<["-"], "mtune=">, Group, - HelpText<"Only supported on A

[clang] [Format] Fix isStartOfName to recognize attributes (PR #76804)

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

[clang] [Format] Fix isStartOfName to recognize attributes (PR #76804)

2024-01-08 Thread Owen Pan via cfe-commits
owenca wrote: > > can you also add a test to clang/unittests/Format/TokenAnnotatorTest.cpp > > that ensures trailing attribute-like macros receive `StartOfName` > > annotation to make sure we don't regress the signal in the future? > > ok, that opened a whole can of worms. > > ``` > Tokens =

[clang] [Format] Fix isStartOfName to recognize attributes (PR #76804)

2024-01-08 Thread Owen Pan via cfe-commits
@@ -2209,7 +2209,8 @@ class AnnotatingParser { (!NextNonComment && !Line.InMacroBody) || (NextNonComment && (NextNonComment->isPointerOrReference() || - NextNonComment->isOneOf(tok::identifier, tok::string_literal { + (Line.InPragm

[clang] [Format] Fix isStartOfName to recognize attributes (PR #76804)

2024-01-08 Thread Owen Pan via cfe-commits
@@ -8498,9 +8498,6 @@ TEST_F(FormatTest, BreaksFunctionDeclarationsWithTrailingTokens) { "__attribute__((unused));"); Style = getGoogleStyle(); - ASSERT_THAT(Style.AttributeMacros, owenca wrote: Please also delete line 10: ``` #include

<    1   2   3   4   5   >