[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes with test fixes (PR #122157)

2025-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-directx @llvm/pr-subscribers-hlsl Author: None (joaosaffran) Changes - Adding the changes from PRs: - #116331 - #121852 - Fixes test `tools/dxil-dis/debug-info.ll` - Address some missed comments in the previous PR --- Patch is 29.51 KiB,

[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes with test fixes (PR #122157)

2025-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-spir-v Author: None (joaosaffran) Changes - Adding the changes from PRs: - #116331 - #121852 - Fixes test `tools/dxil-dis/debug-info.ll` - Address some missed comments in the previous PR --- Patch is 29.51 KiB, truncated to 20.00 KiB bel

[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes with test fixes (PR #122157)

2025-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: None (joaosaffran) Changes - Adding the changes from PRs: - #116331 - #121852 - Fixes test `tools/dxil-dis/debug-info.ll` - Address some missed comments in the previous PR --- Patch is 29.51 KiB, truncated to 20.00 KiB below, ful

[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes with test fixes (PR #122157)

2025-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: None (joaosaffran) Changes - Adding the changes from PRs: - #116331 - #121852 - Fixes test `tools/dxil-dis/debug-info.ll` - Address some missed comments in the previous PR --- Patch is 29.51 KiB, truncated to 20.00 KiB belo

[clang] [OpenMP] Allow GPUs to be targeted directly via `-fopenmp`. (PR #122149)

2025-01-08 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > I think that is a misuse of OpenMP semantics. We can't expect to have regular > OpenMP code working in the same way as OpenMP offloading code when targeting > a GPU meanwhile the code is not wrapped into `target` region or declare > target. I understand to have variants and de

[clang] [llvm] [FMV][AArch64] Simplify version selection according to ACLE. (PR #121921)

2025-01-08 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea closed https://github.com/llvm/llvm-project/pull/121921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] Destroying delete and deleted destructors (PR #118800)

2025-01-08 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/118800 >From 34d3d3000bc6096bbc9eb35ce85b6ceca50b91ca Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 5 Dec 2024 08:31:24 -0500 Subject: [PATCH 1/7] [C++20] Destroying delete and deleted destructors When

[clang] [Driver][UEFI] Enable Microsoft extensions (PR #121875)

2025-01-08 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-debian-cpp20` running on `clang-debian-cpp20` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/108/builds/7886 Here is the r

[clang] [Driver][UEFI] Enable Microsoft extensions (PR #121875)

2025-01-08 Thread via cfe-commits
Prabhuk wrote: > > @RossComputerGuy FYI > > Already have seen this, I'm not sure I understand what the flag does exactly. > I've got LLVM libc PR subscriptions so I'll see any future PR's. This flag enables support for PECOFF specific pragmas. https://github.com/llvm/llvm-project/pull/121875

[clang] [SYCL] Basic diagnostics for the sycl_kernel_entry_point attribute. (PR #120327)

2025-01-08 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann updated https://github.com/llvm/llvm-project/pull/120327 >From 6ed96d3bf22c5da5af995ea5ffe083baf91594bb Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Fri, 1 Nov 2024 16:03:24 -0700 Subject: [PATCH 01/10] [SYCL] Basic diagnostics for the sycl_kernel_entry_poi

[clang] [Clang] Add "extend lifetime" flags and release note (PR #110000)

2025-01-08 Thread Richard Smith via cfe-commits
https://github.com/zygoloid commented: New flag name LGTM. https://github.com/llvm/llvm-project/pull/11 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Allow packing fields into tail padding of record fields (PR #122197)

2025-01-08 Thread Reid Kleckner via cfe-commits
https://github.com/rnk created https://github.com/llvm/llvm-project/pull/122197 Don't use isPotentiallyOverlapping to control behavior that allows overwriting previous field data, because the `[[no_unique_address]]` attribute is not available in any debug info, DWARF or PDB. Instead, just trust

[clang] Allow packing fields into tail padding of record fields (PR #122197)

2025-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Reid Kleckner (rnk) Changes Don't use isPotentiallyOverlapping to control behavior that allows overwriting previous field data, because the `[[no_unique_address]]` attribute is not available in any debug info, DWARF or PDB. Instea

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2025-01-08 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > Is kinda wrong, it should be in the instantiation of that function... @erichkeane I don’t quite understand: the CWG issue itself requires us to check the constraint before substituting into the function during template argument deduction. So it shouldn’t live in a specializati

[clang] Allow packing fields into tail padding of record fields (PR #122197)

2025-01-08 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 e93181bf13b289823810d3b43bcc3c2df1eda70b 54eaf769c085d8efeab957a5f385bca59a3f1f32 --e

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Bill Wendling (bwendling) Changes Refactoring of how __builtin_dynamic_object_size() is calculated for flexible array members (in preparation for adding support for the 'counted_by' attribute on pointers in structs). The only functionali

[clang] Allow packing fields into tail padding of record fields (PR #122197)

2025-01-08 Thread David Blaikie via cfe-commits
@@ -803,10 +804,16 @@ bool ConstStructBuilder::Build(const InitListExpr *ILE, bool AllowOverwrite) { if (!AppendField(Field, Layout.getFieldOffset(FieldNo), EltInit, AllowOverwrite)) return false; - // After emitting a non-empty field

[clang] [Headers][X86] amxintrin.h - fix attributes according to Intel SDM (PR #122204)

2025-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Evgenii Kudriashov (e-kud) Changes `tileloadd`, `tileloaddt1` and `tilestored` are part of `amx-tile` feature. The problem is observed if `__tile_loadd` intrinsic is invoked, `_tile_loadd_internal` requiring `amx-int8` is inlined in

[clang] [compiler-rt] [Clang] Adjust pointer-overflow sanitizer for N3322 (PR #120719)

2025-01-08 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/120719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Clang] Adjust pointer-overflow sanitizer for N3322 (PR #120719)

2025-01-08 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > @vitalybuka Should I also be dropping checks like > > https://github.com/llvm/llvm-project/blob/5f0db7c11264fa235d73730b2b93a31407dfbef3/compiler-rt/lib/ubsan/ubsan_handlers.cpp#L817-L818 > > from the ubsan runtime? (Not sure whether the runtime is supposed to also be > com

[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

2025-01-08 Thread Vitaly Buka via cfe-commits
@@ -137,6 +137,10 @@ llvm::AllocaInst *CodeGenFunction::CreateTempAlloca(llvm::Type *Ty, Alloca = new llvm::AllocaInst(Ty, CGM.getDataLayout().getAllocaAddrSpace(), ArraySize, Name, AllocaInsertPt->getIterator()); + if (Alloca->getName

[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

2025-01-08 Thread Vitaly Buka via cfe-commits
@@ -3430,13 +3430,25 @@ void FunctionStackPoisoner::processStaticAllocas() { SmallVector SVD; SVD.reserve(AllocaVec.size()); for (AllocaInst *AI : AllocaVec) { -ASanStackVariableDescription D = {AI->getName().data(), - ASan.getAllo

[clang] [Headers][X86] amxintrin.h - fix attributes according to Intel SDM (PR #122204)

2025-01-08 Thread Evgenii Kudriashov via cfe-commits
https://github.com/e-kud created https://github.com/llvm/llvm-project/pull/122204 `tileloadd`, `tileloaddt1` and `tilestored` are part of `amx-tile` feature. The problem is observed if `__tile_loadd` intrinsic is invoked, `_tile_loadd_internal` requiring `amx-int8` is inlined into `__tile_load

[clang] [flang] [lld] [Flang] Remove FortranDecimal library (PR #121997)

2025-01-08 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur updated https://github.com/llvm/llvm-project/pull/121997 >From a08aa48fb4955f9d16c6172580505c100076b5d4 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Tue, 7 Jan 2025 17:05:39 +0100 Subject: [PATCH 1/3] Join FortranDecimal into FortranCommon --- clang/lib/Dri

[clang] [flang] [lld] [Flang] Don't use FortranDecimal for runtime (PR #121997)

2025-01-08 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/121997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Add SPIR-V version of getPointer. (PR #121963)

2025-01-08 Thread Justin Bogner via cfe-commits
@@ -104,6 +104,8 @@ class CGHLSLRuntime { GENERATE_HLSL_INTRINSIC_FUNCTION(SClamp, sclamp) GENERATE_HLSL_INTRINSIC_FUNCTION(UClamp, uclamp) + GENERATE_HLSL_INTRINSIC_FUNCTION(CreateResourceGetPointer, bogner wrote: Why "CreateResourceGetPointer"? Shouldn

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-01-08 Thread Nhat Nguyen via cfe-commits
https://github.com/changkhothuychung updated https://github.com/llvm/llvm-project/pull/120920 error: too big or took too long to generate ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [HLSL] Make fast math the default for HLSL (PR #119820)

2025-01-08 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. https://github.com/llvm/llvm-project/pull/119820 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-01-08 Thread Nhat Nguyen via cfe-commits
https://github.com/changkhothuychung updated https://github.com/llvm/llvm-project/pull/120920 error: too big or took too long to generate ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] 24a92f5 - DependencyScanningTool.h: Use more robust `std::function` (fixup for #120699)

2025-01-08 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2025-01-09T15:52:21+09:00 New Revision: 24a92f509a4e9ebaf5ae431409520d30055ea6fc URL: https://github.com/llvm/llvm-project/commit/24a92f509a4e9ebaf5ae431409520d30055ea6fc DIFF: https://github.com/llvm/llvm-project/commit/24a92f509a4e9ebaf5ae431409520d30055ea6fc.dif

[clang] Add an off-by-default warning to complain about MSVC bitfield padding (PR #117428)

2025-01-08 Thread via cfe-commits
@@ -19240,6 +19240,25 @@ void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, if (Record && FD->getType().isVolatileQualified()) Record->setHasVolatileMember(true); +auto IsNonDependentBitField = [](const FieldDecl *FD) { + return FD

[clang] -ftime-report: move codegen timers into FrontendTimerGroup (PR #122225)

2025-01-08 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/15 Currently, the default group "Miscellaneous Ungrouped Timers" contains "Code Generation Time" and "LLVM IR Generation Time". There is also a "Clang front-end time report". This patch moves the two codegen timers

[clang] -ftime-report: move codegen timers into FrontendTimerGroup (PR #122225)

2025-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Fangrui Song (MaskRay) Changes Currently, the default group "Miscellaneous Ungrouped Timers" contains "Code Generation Time" and "LLVM IR Generation Time". There is also a "Clang front-end time report". Th

[clang] -ftime-report: move codegen timers into FrontendTimerGroup (PR #122225)

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

[clang] -ftime-report: move codegen timers into FrontendTimerGroup (PR #122225)

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

[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

2025-01-08 Thread via cfe-commits
cor3ntin wrote: > This does mean that if the preferred and explicit types have different > storage requirements we may not warn in all possible cases, but that's a > scenario for which the warnings are much more complex and confusing If I understand the patch correctly, we always warn, but abo

[clang] 5fdcea2 - [clang] Simplify BackendConsumer. NFC

2025-01-08 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2025-01-08T20:48:59-08:00 New Revision: 5fdcea2d258befca3925d02d1b37f93174ac0153 URL: https://github.com/llvm/llvm-project/commit/5fdcea2d258befca3925d02d1b37f93174ac0153 DIFF: https://github.com/llvm/llvm-project/commit/5fdcea2d258befca3925d02d1b37f93174ac0153.diff

[clang] 9ba6e8d - [Clang][ASTMatcher] Extend `hasDependentName` to match DependentNameType name (#121975)

2025-01-08 Thread via cfe-commits
Author: Amr Hesham Date: 2025-01-09T01:18:10-05:00 New Revision: 9ba6e8dc91920b6db40ee76f4fb22c71e9b9cd97 URL: https://github.com/llvm/llvm-project/commit/9ba6e8dc91920b6db40ee76f4fb22c71e9b9cd97 DIFF: https://github.com/llvm/llvm-project/commit/9ba6e8dc91920b6db40ee76f4fb22c71e9b9cd97.diff LO

[clang] [Clang][ASTMatcher] Extend `hasDependentName` to match DependentNameType name (PR #121975)

2025-01-08 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/121975 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1a7e7ef - Format BackendUtil.h. NFC

2025-01-08 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2025-01-08T22:10:51-08:00 New Revision: 1a7e7ef2435763a4ba9171303340daacf7bbb0b6 URL: https://github.com/llvm/llvm-project/commit/1a7e7ef2435763a4ba9171303340daacf7bbb0b6 DIFF: https://github.com/llvm/llvm-project/commit/1a7e7ef2435763a4ba9171303340daacf7bbb0b6.diff

[clang] [Clang][ASTMatcher] Extend `hasDependentName` to match DependentNameType name (PR #121975)

2025-01-08 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks, LGTM! https://github.com/llvm/llvm-project/pull/121975 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage] Introduce the type `CounterPair` for RegionCounterMap. NFC. (PR #112724)

2025-01-08 Thread Jessica Paquette via cfe-commits
https://github.com/ornata approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/112724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TBAA] Don't emit pointer-tbaa for void pointers. (PR #122116)

2025-01-08 Thread Andrew Pinski via cfe-commits
pinskia wrote: Note GCC already treats `void*` as being compatiable with all other pointers and has since GCC 6 (when it started to disambiguates accesses to different pointers). I don't think it is documented though. Another example where clang/LLVM handles void pointers differently from GCC:

[clang] [TBAA] Don't emit pointer-tbaa for void pointers. (PR #122116)

2025-01-08 Thread Andrew Pinski via cfe-commits
pinskia wrote: Note GCC's testcase testsuite/gcc.dg/alias-14.c is testcase for this extension: "as an extension we consider void * universal. Writes to it should alias." https://github.com/llvm/llvm-project/pull/122116 ___ cfe-commits mailing list cfe

[clang] [libclang/python] Add python bindings for PrintingPolicy (PR #120494)

2025-01-08 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: The failure reminds me of #122063, which was merged just 2 hours ago. Do you mind merging the `main` into your PR and try again? https://github.com/llvm/llvm-project/pull/120494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] Allow packing fields into tail padding of record fields (PR #122197)

2025-01-08 Thread Pavel Labath via cfe-commits
labath wrote: I don't feel qualified to review this, but thank you for working on it. https://github.com/llvm/llvm-project/pull/122197 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f5cd181 - [Coverage] Introduce `getBranchCounterPair()`. NFC. (#112702)

2025-01-08 Thread via cfe-commits
Author: NAKAMURA Takumi Date: 2025-01-09T16:47:01+09:00 New Revision: f5cd181ffbb7cb61d582fe130d46580d5969d47a URL: https://github.com/llvm/llvm-project/commit/f5cd181ffbb7cb61d582fe130d46580d5969d47a DIFF: https://github.com/llvm/llvm-project/commit/f5cd181ffbb7cb61d582fe130d46580d5969d47a.dif

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-08 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni closed https://github.com/llvm/llvm-project/pull/112702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] -ftime-report: move IR generation timer into FrontendTimerGroup (PR #122225)

2025-01-08 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/15 >From 586f1fa8fb02431a962ca606fd546c2310427c80 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 8 Jan 2025 23:19:56 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

[clang] -ftime-report: move IR generation timer into FrontendTimerGroup (PR #122225)

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

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-08 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/112702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage] Introduce the type `CounterPair` for RegionCounterMap. NFC. (PR #112724)

2025-01-08 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/112724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage] Introduce the type `CounterPair` for RegionCounterMap. NFC. (PR #112724)

2025-01-08 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/112724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][NFC] Move packoffset validation to separate function and calculate offsets in bytes (PR #121989)

2025-01-08 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/121989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-08 Thread Fangrui Song via cfe-commits
@@ -2649,6 +2649,14 @@ def fsanitize_undefined_strip_path_components_EQ : Joined<["-"], "fsanitize-unde HelpText<"Strip (or keep only, if negative) a given number of path components " "when emitting check metadata.">, MarshallingInfoInt, "0", "int">; +def fno_

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-08 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/112702 >From fc697f04fd6c9f3c217ce04e3f1dd082c1f1a705 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Wed, 16 Oct 2024 23:16:53 +0900 Subject: [PATCH 01/12] [Coverage] Introduce `getBranchCounterPair()`. NFC. Thi

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-08 Thread Yeoul Na via cfe-commits
@@ -1060,238 +1061,331 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-08 Thread Yeoul Na via cfe-commits
@@ -1343,6 +1430,12 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E, unsigned Type, assert(Ptr->getType()->isPointerTy() && "Non-pointer passed to __builtin_object_size?"); + if (IsDynamic) rapidsna wrote: Why did this code block move to

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-08 Thread Yeoul Na via cfe-commits
@@ -1060,238 +1061,331 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-08 Thread Yeoul Na via cfe-commits
@@ -1060,238 +1061,331 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-08 Thread Yeoul Na via cfe-commits
@@ -1060,238 +1061,331 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-08 Thread Yeoul Na via cfe-commits
@@ -1060,238 +1061,331 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] 6dd1315 - [clang] Simplify BackendConsumer after #69371

2025-01-08 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2025-01-08T22:05:55-08:00 New Revision: 6dd1315cf0cfa87c2ace2e7263ba505c4b38df3d URL: https://github.com/llvm/llvm-project/commit/6dd1315cf0cfa87c2ace2e7263ba505c4b38df3d DIFF: https://github.com/llvm/llvm-project/commit/6dd1315cf0cfa87c2ace2e7263ba505c4b38df3d.diff

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2025-01-08 Thread via cfe-commits
cor3ntin wrote: @mizvekov can you investigate whether #107942 helps with this? Thanks https://github.com/llvm/llvm-project/pull/102857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-01-08 Thread Nhat Nguyen via cfe-commits
@@ -0,0 +1,637 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

[clang] [clang] Fix `gnu::init_priority` attribute handling for reserved values (PR #121577)

2025-01-08 Thread via cfe-commits
el-ev wrote: Ping. https://github.com/llvm/llvm-project/pull/121577 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5d03235 - [RISCV] Add -mcpu=sifive-p550. (#122164)

2025-01-08 Thread via cfe-commits
Author: Craig Topper Date: 2025-01-08T21:02:46-08:00 New Revision: 5d03235c73476dfa3d2dd48c76de106fd1aa2ac7 URL: https://github.com/llvm/llvm-project/commit/5d03235c73476dfa3d2dd48c76de106fd1aa2ac7 DIFF: https://github.com/llvm/llvm-project/commit/5d03235c73476dfa3d2dd48c76de106fd1aa2ac7.diff

[clang] [llvm] [RISCV] Add -mcpu=sifive-p550. (PR #122164)

2025-01-08 Thread Craig Topper via cfe-commits
https://github.com/topperc closed https://github.com/llvm/llvm-project/pull/122164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2025-01-08 Thread Max Winkler via cfe-commits
MaxEW707 wrote: @shafik @AaronBallman @zmodem I believe I addressed all the feedback. Let me know if I missed anything. Feel free to ping anyone else I may have missed above :). https://github.com/llvm/llvm-project/pull/99833 ___ cfe-commits mailin

[clang] [llvm] [HLSL] Implement elementwise firstbitlow builtin (PR #116858)

2025-01-08 Thread Ashley Coleman via cfe-commits
@@ -3178,98 +3178,74 @@ bool SPIRVInstructionSelector::selectFirstBitSet64Overflow( Register ResVReg, const SPIRVType *ResType, MachineInstr &I, Register SrcReg, unsigned BitSetOpcode, bool SwapPrimarySide) const { + // SPIR-V only allow vecs of size 2,3,4. Calling w

[clang] [Clang] __has_builtin should return false for aux triple builtins (PR #121839)

2025-01-08 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,12 @@ +// REQUIRES: spirv-registered-target +// REQUIRES: x86-registered-target + jhuber6 wrote: These shouldn't be necessary, we're just emitting IR. https://github.com/llvm/llvm-project/pull/121839 ___ cfe

[clang] [Clang] __has_builtin should return false for aux triple builtins (PR #121839)

2025-01-08 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,12 @@ +// REQUIRES: spirv-registered-target +// REQUIRES: x86-registered-target + +// RUN: %clang_cc1 -fopenmp -triple=spirv64 -fopenmp-is-target-device \ +// RUN: -aux-triple x86_64-linux-unknown -E %s | FileCheck -implicit-check-not=BAD %s jhuber6 wr

[clang] [llvm] [HLSL] Implement elementwise firstbitlow builtin (PR #116858)

2025-01-08 Thread Ashley Coleman via cfe-commits
@@ -3178,98 +3178,74 @@ bool SPIRVInstructionSelector::selectFirstBitSet64Overflow( Register ResVReg, const SPIRVType *ResType, MachineInstr &I, Register SrcReg, unsigned BitSetOpcode, bool SwapPrimarySide) const { + // SPIR-V only allow vecs of size 2,3,4. Calling w

[clang] [llvm] [FMV][AArch64] Simplify version selection according to ACLE. (PR #121921)

2025-01-08 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/121921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang] Implement CWG2369 "Ordering between constraints and substitution"" (PR #122130)

2025-01-08 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem approved this pull request. Please go ahead and merge. https://github.com/llvm/llvm-project/pull/122130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Propagate -ftime-report to offload lto (PR #122143)

2025-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: None (macurtis-amd) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/122143.diff 4 Files Affected: - (modified) clang/lib/Driver/ToolChains/Clang.cpp (+4) - (modified) clang/lib/Driver/ToolChains/CommonArgs.cpp

[clang] [Driver][SPIR-V] Use consistent tools to convert between text and binary form (PR #120266)

2025-01-08 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/120266 >From 998827f68bb2f9c1ca43f1132e109406db842880 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Tue, 17 Dec 2024 08:52:49 -0800 Subject: [PATCH 1/2] [Driver][SPIR-V] Use consistent tools to convert between te

[clang] [Driver][SPIR-V] Use consistent tools to convert between text and binary form (PR #120266)

2025-01-08 Thread Nick Sarnie via cfe-commits
sarnex wrote: I just reworked this to use `spirv-as`, please take a look :) https://github.com/llvm/llvm-project/pull/120266 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Propagate -ftime-report to offload lto (PR #122143)

2025-01-08 Thread via cfe-commits
https://github.com/macurtis-amd created https://github.com/llvm/llvm-project/pull/122143 None >From e774d184e18600f272813fdf7af05cff5f878374 Mon Sep 17 00:00:00 2001 From: Matthew Curtis Date: Wed, 8 Jan 2025 10:20:44 -0600 Subject: [PATCH] [clang] Propagate -ftime-report to offload lto ---

[clang] [clang][analyzer] Split NullDereferenceChecker into a modeling and checker part (PR #122139)

2025-01-08 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/122139 From 135839a993f1cad32d65d21c6aeaef6f074a1997 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Wed, 8 Jan 2025 17:22:10 +0100 Subject: [PATCH 1/2] [clang][analyzer] Split NullDereference

[clang-tools-extra] [clang-tidy][use-internal-linkage] fix false positive for consteval function (PR #122141)

2025-01-08 Thread Paweł Bylica via cfe-commits
@@ -0,0 +1,3 @@ +// RUN: %check_clang_tidy -std=c++20 %s misc-use-internal-linkage %t -- -- -I%S/Inputs/use-internal-linkage + +consteval void gh122096() {} chfast wrote: Can you also check `constexpr void func_constexpr()`? https://github.com/llvm/llvm-project

[clang] [Clang] __has_builtin should return false for aux triple builtins (PR #121839)

2025-01-08 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > > I am afraid this will break all existing CUDA/HIP programs since they > > expect to be able to parse the builtins for both host and device targets. > > In the spirit of single source, the compiler sees the entire code for all > > targets, including host target and all device

[clang] 3972ed5 - Revert "[Clang] Implement CWG2369 "Ordering between constraints and substitution"" (#122130)

2025-01-08 Thread via cfe-commits
Author: Younan Zhang Date: 2025-01-08T18:27:25+01:00 New Revision: 3972ed57088f6515b787d7d38dec03dc74e51827 URL: https://github.com/llvm/llvm-project/commit/3972ed57088f6515b787d7d38dec03dc74e51827 DIFF: https://github.com/llvm/llvm-project/commit/3972ed57088f6515b787d7d38dec03dc74e51827.diff

[clang] [Clang] __has_builtin should return false for aux triple builtins (PR #121839)

2025-01-08 Thread Joseph Huber via cfe-commits
@@ -1818,8 +1819,21 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { // usual allocation and deallocation functions. Required by libc++ return 201802; default: +// We may get here because of aux builtins which may not be +

[clang] [CUDA][HIP] Fix overriding of constexpr virtual function (PR #121986)

2025-01-08 Thread Yaxun Liu via cfe-commits
@@ -1595,8 +1606,21 @@ static bool IsOverloadOrOverrideImpl(Sema &SemaRef, FunctionDecl *New, // Allow overloading of functions with same signature and different CUDA // target attributes. -if (NewTarget != OldTarget) +if (NewTarget != OldTarg

[clang] [CUDA][HIP] Fix overriding of constexpr virtual function (PR #121986)

2025-01-08 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/121986 >From fa0df07b80b0f704f4e10fa1ec468fa6ed02291a Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Tue, 7 Jan 2025 13:52:09 -0500 Subject: [PATCH] [CUDA][HIP] Fix overriding of constexpr virtual function In

[clang] [llvm] [BasicAA] Do not decompose past casts with different index width (PR #119365)

2025-01-08 Thread Björn Pettersson via cfe-commits
bjope wrote: I'm investigating various regressions we've seen downstream after this patch. I reduced one test down to this IR (also see https://godbolt.org/z/E4caeWcYd): ``` target datalayout = "p:16:8-p1:32:8" define void @gazonk() { entry: %alloca = alloca i8, align 1 br label %loop loop

[clang] [Driver][SPIR-V] Use consistent tools to convert between text and binary form (PR #120266)

2025-01-08 Thread Nick Sarnie via cfe-commits
sarnex wrote: Thanks for the review, let me use `spirv-as` so we rely on the SPIR-V tools format. https://github.com/llvm/llvm-project/pull/120266 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [llvm] [BasicAA] Do not decompose past casts with different index width (PR #119365)

2025-01-08 Thread Nikita Popov via cfe-commits
nikic wrote: @bjope I believe the standard solution to that is to add your own AA pass, see e.g. AMDGPUAAResult and NVPTXAAResult which both do addrspace-based AA. https://github.com/llvm/llvm-project/pull/119365 ___ cfe-commits mailing list cfe-commi

[clang] [CUDA][HIP] Fix overriding of constexpr virtual function (PR #121986)

2025-01-08 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > This needs a release note added https://github.com/llvm/llvm-project/pull/121986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][ASTMatcher] Extend `hasDependentName` to match DependentNameType name (PR #121975)

2025-01-08 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/121975 >From 353f3ca4e997f658c65570e75749220e1abcad72 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 7 Jan 2025 19:13:26 +0100 Subject: [PATCH 1/2] [Clang][ASTMatcher] Extend `hasDependentName` matcher to

[clang] [Clang][ASTMatcher] Extend `hasDependentName` to match DependentNameType name (PR #121975)

2025-01-08 Thread Amr Hesham via cfe-commits
@@ -2251,6 +2251,14 @@ TEST_P(ASTMatchersTest, HasDependentName_DependentScopeDeclRefExpr) { EXPECT_TRUE(matches("template struct S { static T foo(); };" "template void x() { S::foo(); }", dependentScopeDeclRefExpr(hasDependentNa

[clang-tools-extra] [clang-tidy] Address false positives in misc-redundant-expression checker (PR #121960)

2025-01-08 Thread via cfe-commits
@@ -852,6 +877,58 @@ static bool areExprsMacroAndNonMacro(const Expr *&LhsExpr, return LhsLoc.isMacroID() != RhsLoc.isMacroID(); } + +static bool areExprsSameMacroOrLiteral(const BinaryOperator *BinOp, + const ASTContext *Context) { + +

[clang-tools-extra] [clang-tidy] Address false positives in misc-redundant-expression checker (PR #121960)

2025-01-08 Thread via cfe-commits
@@ -852,6 +877,58 @@ static bool areExprsMacroAndNonMacro(const Expr *&LhsExpr, return LhsLoc.isMacroID() != RhsLoc.isMacroID(); } + +static bool areExprsSameMacroOrLiteral(const BinaryOperator *BinOp, + const ASTContext *Context) { + +

[clang-tools-extra] [clang-tidy] Address false positives in misc-redundant-expression checker (PR #121960)

2025-01-08 Thread via cfe-commits
https://github.com/EugeneZelenko edited https://github.com/llvm/llvm-project/pull/121960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Address false positives in misc-redundant-expression checker (PR #121960)

2025-01-08 Thread via cfe-commits
@@ -852,6 +877,58 @@ static bool areExprsMacroAndNonMacro(const Expr *&LhsExpr, return LhsLoc.isMacroID() != RhsLoc.isMacroID(); } + +static bool areExprsSameMacroOrLiteral(const BinaryOperator *BinOp, + const ASTContext *Context) { + +

[clang-tools-extra] [clang-tidy] Address false positives in misc-redundant-expression checker (PR #121960)

2025-01-08 Thread via cfe-commits
https://github.com/EugeneZelenko commented: Please mention changes in Release Notes. https://github.com/llvm/llvm-project/pull/121960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Address false positives in misc-redundant-expression checker (PR #121960)

2025-01-08 Thread via cfe-commits
@@ -852,6 +877,58 @@ static bool areExprsMacroAndNonMacro(const Expr *&LhsExpr, return LhsLoc.isMacroID() != RhsLoc.isMacroID(); } + +static bool areExprsSameMacroOrLiteral(const BinaryOperator *BinOp, + const ASTContext *Context) { + +

[clang-tools-extra] [clang-tidy] Address false positives in misc-redundant-expression checker (PR #121960)

2025-01-08 Thread via cfe-commits
@@ -747,6 +747,31 @@ static bool areSidesBinaryConstExpressions(const BinaryOperator *&BinOp, const A return false; } +static bool +areSidesBinaryConstExpressionsOrDefines(const BinaryOperator *&BinOp, +const ASTContext *AstCtx) { +

[clang-tools-extra] [clang-tidy] Add QtEnabled option to modernize-use-integer-sign-comprison (PR #122127)

2025-01-08 Thread via cfe-commits
@@ -34,3 +34,7 @@ Options A string specifying which include-style is used, `llvm` or `google`. Default is `llvm`. + +.. option:: QtEnabled + Makes C++17 ``q20::cmp_*`` alternative available for Qt-based EugeneZelenko wrote: Please separate with newline.

<    1   2   3   4   5   6   >