[clang] [clang] Generate nuw GEPs for struct member accesses (PR #99538)

2024-07-25 Thread John McCall via cfe-commits
rjmccall wrote: `CGBuilder` is just aiming to provide an `Address` overload of LLVM's `CreateStructGEP`. It seems wrong for two overloads to have subtly different behavior. Is there a reason why LLVM's `CreateStructGEP` doesn't add `nuw` itself? https://github.com/llvm/llvm-project/pull/9953

[clang] 7304936 - [clang][Interp] Add preliminary __builtin_constant_p implementation

2024-07-25 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-07-25T18:51:36+02:00 New Revision: 7304936479a7eb61adc9edcaf6ce56e4792590ad URL: https://github.com/llvm/llvm-project/commit/7304936479a7eb61adc9edcaf6ce56e4792590ad DIFF: https://github.com/llvm/llvm-project/commit/7304936479a7eb61adc9edcaf6ce56e4792590ad.diff LO

[clang] [llvm] [NVPTX] Support __usAtomicCAS builtin (PR #99646)

2024-07-25 Thread via cfe-commits
https://github.com/DenisGZM updated https://github.com/llvm/llvm-project/pull/99646 >From 0786e5bf48a5b638b99a666c282a5191e4a3c956 Mon Sep 17 00:00:00 2001 From: Denis Gerasimov Date: Fri, 19 Jul 2024 15:47:57 +0300 Subject: [PATCH 1/5] [NVPTX] Support __usAtomicCAS builtin --- clang/include/

[clang] [clang][FMV][AArch64] Improve streaming mode compatibility. (PR #100181)

2024-07-25 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/100181 >From 6799eb869ed1f87eb65dae84b11e3dd3907b2157 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Tue, 23 Jul 2024 19:24:41 +0100 Subject: [PATCH 1/5] [clang][FMV][AArch64] Improve streaming mode compa

[clang] [InstallAPI] Pick up input headers by directory traversal (PR #94508)

2024-07-25 Thread Mike Rice via cfe-commits
@@ -0,0 +1,300 @@ +//===- DirectoryScanner.cpp ---===// +// +// 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-Identifier: Ap

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-25 Thread via cfe-commits
@@ -3058,6 +3058,133 @@ void Sema::NoteAllFoundTemplates(TemplateName Name) { } } +static QualType commonTypeImpl(Sema &S, TemplateName BaseTemplate, + SourceLocation TemplateLoc, + ArrayRef Ts) { + auto lookUpComm

[clang] Fix lifetimebound for field access (PR #100197)

2024-07-25 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: Looks like cherry-pick failed and this needs manual back porting. https://github.com/llvm/llvm-project/pull/100197 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-25 Thread via cfe-commits
@@ -3140,6 +3267,30 @@ checkBuiltinTemplateIdType(Sema &SemaRef, BuiltinTemplateDecl *BTD, int64_t N = Index.getExtValue(); return Ts.getPackAsArray()[N].getAsType(); } + + case BTK__common_type: { +assert(Converted.size() == 4); +if (Converted[0].isDependen

[clang] [NVPTX] Correctly forward the PTX feature to the nvlink wrapper (PR #100607)

2024-07-25 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/100607 Summary: This is necessary for LTO when the user specifies it or has a CUDA version that supports a sufficiently high version. Previously it would default. >From 1156979b150f9ae778cf28adb7adcb812c1ceffb Mon Sep

[clang] [NVPTX] Correctly forward the PTX feature to the nvlink wrapper (PR #100607)

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

[clang] [NVPTX] Correctly forward the PTX feature to the nvlink wrapper (PR #100607)

2024-07-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes Summary: This is necessary for LTO when the user specifies it or has a CUDA version that supports a sufficiently high version. Previously it would default. Fixes https://github.com/llvm/llvm-project/issues/10

[clang] [AArch64] Implement FP8 floating-point mode helper intrinsics (PR #100608)

2024-07-25 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov created https://github.com/llvm/llvm-project/pull/100608 None >From bd2814249f922206e8648d58d2850f89afad4fd8 Mon Sep 17 00:00:00 2001 From: Momchil Velikov Date: Thu, 25 Jul 2024 18:25:40 +0100 Subject: [PATCH] [AArch64] Implement FP8 floating-point mode help

[clang] [AArch64] Implement FP8 floating-point mode helper intrinsics (PR #100608)

2024-07-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Momchil Velikov (momchil-velikov) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/100608.diff 2 Files Affected: - (added) clang/test/CodeGen/aarch64-fpm-helpers.c (+162) - (modified) clang/utils/TableGen/NeonEmitter.c

[clang] [clang] Add -Wimplicit-fallthrough to -Wextra (PR #97926)

2024-07-25 Thread Max Coplan via cfe-commits
vegerot wrote: I'm pretty sure I enabled the warning correctly. @AaronBallman are we good to land? https://github.com/llvm/llvm-project/pull/97926 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [NVPTX] Correctly forward the PTX feature to the nvlink wrapper (PR #100607)

2024-07-25 Thread Artem Belevich via cfe-commits
Artem-B wrote: The patch seems to change only the test file. Should there be more changes in the patch? https://github.com/llvm/llvm-project/pull/100607 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [clang] Implement `__is_virtual_base_of()` intrinsic (PR #100393)

2024-07-25 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @PeterChou1 I see you had landed `clang-doc` patches recently. Can you help? CI is repeatedly failing on the following `clang-doc` test: ``` _bk;t=1721926993260 TEST 'Clang Tools :: clang-doc/basic-project.test' FAILED _bk;t=172192699326

[clang] 319d29d - [Sema] Fix a warning

2024-07-25 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2024-07-25T10:53:03-07:00 New Revision: 319d29d21ea9f04cd8530c77b558796bf5db0197 URL: https://github.com/llvm/llvm-project/commit/319d29d21ea9f04cd8530c77b558796bf5db0197 DIFF: https://github.com/llvm/llvm-project/commit/319d29d21ea9f04cd8530c77b558796bf5db0197.diff L

[clang] [NVPTX] Correctly forward the PTX feature to the nvlink wrapper (PR #100607)

2024-07-25 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > The patch seems to change only the test file. Should there be more changes in > the patch? Whoops, don't know where it went. https://github.com/llvm/llvm-project/pull/100607 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [NVPTX] Correctly forward the PTX feature to the nvlink wrapper (PR #100607)

2024-07-25 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/100607 >From 0cc36f8aa42c1b673b1d239bf1518990582c5479 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 25 Jul 2024 12:31:09 -0500 Subject: [PATCH] [NVPTX] Correctly forward the PTX feature to the nvlink wrapper

[clang] [clang] Add -Wimplicit-fallthrough to -Wextra (PR #97926)

2024-07-25 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I'm not seeing any compile time impact from dropping the `DefaultIgnore`s on > warn_unannotated_fallthrough/warn_unannotated_fallthrough_per_function. So > either it's free or I'm still doing something wrong. > (http://llvm-compile-time-tracker.com/compare.php?from=6d12b3

[clang] [clang] Add -Wimplicit-fallthrough to -Wextra (PR #97926)

2024-07-25 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I'm pretty sure I enabled the warning correctly. @AaronBallman are we good to > land? Not quite -- it looks like this change is causing libc++ test failures that were caught by precommit CI: ``` # | /var/lib/buildkite-agent/builds/linux-56-59b8f5d88-jltnz-1/llvm-project/

[clang] [Clang] Fix potential null pointer dereferences in Sema::AddInitializerToDecl (PR #94368)

2024-07-25 Thread Mike Rice via cfe-commits
@@ -13681,12 +13681,13 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) { } Init = Result.getAs(); +assert(Init && "Init must not be null"); + IsParenListInit = !InitSeq.steps().empty() && InitSeq.step_beg

[clang] [NVPTX] Correctly forward the PTX feature to the nvlink wrapper (PR #100607)

2024-07-25 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > The patch seems to change only the test file. Should there be more changes in > the patch? I think I somehow accidentally merged it with another patch and then lost it when I made a new branch.. https://github.com/llvm/llvm-project/pull/100607

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-25 Thread Christopher Di Bella via cfe-commits
cjdb wrote: I spent a lot of time trying to implement this myself, but I always struggled to capture detecting user specialisations of `common_type`. Which section of code handles that? https://github.com/llvm/llvm-project/pull/99473 ___ cfe-commits

[clang] [NVPTX] Correctly forward the PTX feature to the nvlink wrapper (PR #100607)

2024-07-25 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. https://github.com/llvm/llvm-project/pull/100607 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Introduce ffp-model=aggressive (PR #100453)

2024-07-25 Thread Andy Kaylor via cfe-commits
andykaylor wrote: > It seems a bit confusing to me to create a situation where `-ffast-math` is > equivalent to `-ffp-model=aggressive`, not `-ffp-model=fast`. I can understand that, but the problem I'm trying to fix is that the naming of fast-math options we inherited from gcc is counter-intu

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-25 Thread Christopher Di Bella via cfe-commits
https://github.com/cjdb requested changes to this pull request. https://github.com/llvm/llvm-project/pull/99473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-25 Thread Christopher Di Bella via cfe-commits
@@ -3058,6 +3058,133 @@ void Sema::NoteAllFoundTemplates(TemplateName Name) { } } +static QualType commonTypeImpl(Sema &S, TemplateName BaseTemplate, + SourceLocation TemplateLoc, + ArrayRef Ts) { + auto lookUpComm

[clang] [Driver] Introduce ffp-model=aggressive (PR #100453)

2024-07-25 Thread Andy Kaylor via cfe-commits
andykaylor wrote: FWIW, here is a comparison of clang to the two other non-LLVM-based compilers I'm aware of that implement an option equivalent to `-ffp-model=fast` https://godbolt.org/z/anjs78bj1 https://github.com/llvm/llvm-project/pull/100453 ___

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-25 Thread Nikolas Klauser via cfe-commits
@@ -3058,6 +3058,133 @@ void Sema::NoteAllFoundTemplates(TemplateName Name) { } } +static QualType commonTypeImpl(Sema &S, TemplateName BaseTemplate, + SourceLocation TemplateLoc, + ArrayRef Ts) { + auto lookUpComm

[clang] [InstallAPI] Fix early return for scanning sub-directories (PR #100636)

2024-07-25 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/100636 None >From f96d9b79d7efb744182a5016295e6dd305564968 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Thu, 25 Jul 2024 12:15:45 -0700 Subject: [PATCH] [InstallAPI] Fix early return for scanning sub director

[clang] [InstallAPI] Fix early return for scanning sub-directories (PR #100636)

2024-07-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Cyndy Ishida (cyndyishida) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/100636.diff 2 Files Affected: - (modified) clang/lib/InstallAPI/DirectoryScanner.cpp (+2-1) - (added) clang/test/InstallAPI/directory-scanning

[clang] [clang] Allow 'convergent' to be a statement attribute (PR #100637)

2024-07-25 Thread via cfe-commits
https://github.com/darkbuck created https://github.com/llvm/llvm-project/pull/100637 - So that it could be used to mark a call or inline-asm as 'convergent' to prevent illegal code motion. >From d9de73264bf4d555e7e09a2c2687eae72c1fa19e Mon Sep 17 00:00:00 2001 From: Michael Liao Date: Thu,

[clang] [clang] Allow 'convergent' to be a statement attribute (PR #100637)

2024-07-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: None (darkbuck) Changes - So that it could be used to mark a call or inline-asm as 'convergent' to prevent illegal code motion. --- Full diff: https://github.com/llvm/llvm-project/pull/100637.diff 6 Files Affected: - (modifie

[clang] [InstallAPI] Pick up input headers by directory traversal (PR #94508)

2024-07-25 Thread Cyndy Ishida via cfe-commits
@@ -0,0 +1,300 @@ +//===- DirectoryScanner.cpp ---===// +// +// 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-Identifier: Ap

[clang] [clang] Allow 'convergent' to be a statement attribute (PR #100637)

2024-07-25 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 52b6b1eb976341956c9c75f6572c37d445fcb332 d9de73264bf4d555e7e09a2c2687eae72c1fa19e --e

[clang] [llvm] Build release binaries for multiple targets (PR #98431)

2024-07-25 Thread Tom Stellard via cfe-commits
@@ -0,0 +1,55 @@ +name: Setup Stage + +inputs: + previous-artifact: +description: >- + A unique descriptor for the artifact from the previous stage. This will + be used to construct the final artifact pattern, which is: + $RUNNER_OS-$RUNNER_ARCH-$PREVIOUS_ARTI

[clang] Remove FiniteMathOnly and use only NoHonorINFs and NoHonorNANs. (PR #97342)

2024-07-25 Thread Sven van Haastregt via cfe-commits
https://github.com/svenvh approved this pull request. https://github.com/llvm/llvm-project/pull/97342 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Build release binaries for multiple targets (PR #98431)

2024-07-25 Thread Tom Stellard via cfe-commits
https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/98431 >From 5417784c025128eaffc09981ee72c7cc2ba487b3 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 22 May 2024 15:30:53 -0700 Subject: [PATCH 1/4] Build release binaries for multiple targets This adds releas

[clang] [OpenMP] Defaultmap: fixes scalar issue, adds all variable category (PR #99315)

2024-07-25 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/99315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Allow 'convergent' to be a statement attribute (PR #100637)

2024-07-25 Thread via cfe-commits
darkbuck wrote: One motivation for this patch is to be able to mark individual inline asms with 'convergent.' So far, CUDA/HIP assumes all calls and inline-asms are convergent and marks all of them with 'convergent.' This guarantees correctness but loses possible optimizations for inline-asms

[clang] [clang] Allow 'convergent' to be a statement attribute (PR #100637)

2024-07-25 Thread via cfe-commits
https://github.com/darkbuck updated https://github.com/llvm/llvm-project/pull/100637 >From d9de73264bf4d555e7e09a2c2687eae72c1fa19e Mon Sep 17 00:00:00 2001 From: Michael Liao Date: Thu, 25 Jul 2024 15:19:15 -0400 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?U

[clang] [clang][Sema][NFC] remove unreachable return statement (PR #100642)

2024-07-25 Thread Mike Rice via cfe-commits
https://github.com/mikerice1969 created https://github.com/llvm/llvm-project/pull/100642 The switch now returns in every case so the end return is unreachable. >From 8804f18fcaf1a70bad10a8e66414f91556df23bd Mon Sep 17 00:00:00 2001 From: Mike Rice Date: Thu, 25 Jul 2024 11:35:11 -0700 Subject:

[clang] [clang][Sema][NFC] remove unreachable return statement (PR #100642)

2024-07-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-powerpc Author: Mike Rice (mikerice1969) Changes The switch now returns in every case so the end return is unreachable. --- Full diff: https://github.com/llvm/llvm-project/pull/100642.diff 1 Files Affected: - (modified) clang/lib/Sema/SemaPPC

[clang] [clang] Allow 'convergent' to be a statement attribute (PR #100637)

2024-07-25 Thread Richard Smith via cfe-commits
https://github.com/zygoloid commented: Seems logical and useful to me. This PR will need more tests: specifically, please make sure you have test coverage for the diagnostic, and for LLVM IR generation for both convergent calls and convergent inline asm. Please also update the documentation f

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_await_elidable]] (PR #99282)

2024-07-25 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/99282 >From 5aa5ba4d768c09663acdb394b9485bc2362a217a Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Tue, 4 Jun 2024 23:22:00 -0700 Subject: [PATCH] [Clang] Introduce [[clang::coro_await_elidable]] --- clang/

[clang] [HLSL] (DRAFT) Another way to implement #92071: [HLSL] Default linkage of HLSL function should be internal (PR #95331)

2024-07-25 Thread Greg Roth via cfe-commits
@@ -119,3 +119,16 @@ behavior between Clang and DXC. Some examples include: diagnostic notifying the user of the conversion rather than silently altering precision relative to the other overloads (as FXC does) or generating code that will fail validation (as DXC does). +

[clang] [HLSL] (DRAFT) Another way to implement #92071: [HLSL] Default linkage of HLSL function should be internal (PR #95331)

2024-07-25 Thread Greg Roth via cfe-commits
https://github.com/pow2clk edited https://github.com/llvm/llvm-project/pull/95331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] (DRAFT) Another way to implement #92071: [HLSL] Default linkage of HLSL function should be internal (PR #95331)

2024-07-25 Thread Greg Roth via cfe-commits
https://github.com/pow2clk commented: Linking functions as internal should mean that they won't be included in the final output if they don't have any calls. A test that verifies that behavior would be useful. Even if they are called, a test that verifies that they have the "internal" attribu

[clang] [HLSL] (DRAFT) Another way to implement #92071: [HLSL] Default linkage of HLSL function should be internal (PR #95331)

2024-07-25 Thread Greg Roth via cfe-commits
@@ -12363,6 +12363,11 @@ bool ASTContext::DeclMustBeEmitted(const Decl *D) { if (D->hasAttr() || D->hasAttr()) return true; + // HLSL entry functiona are required. pow2clk wrote: ```suggestion // HLSL entry functions are required. ``` typo https://g

[clang] [HLSL] (DRAFT) Another way to implement #92071: [HLSL] Default linkage of HLSL function should be internal (PR #95331)

2024-07-25 Thread Greg Roth via cfe-commits
@@ -158,7 +158,8 @@ def FunctionTmpl def HLSLEntry : SubsetSubjectisExternallyVisible() && !isa(S)}], + [{S->getDeclContext()->getRedeclContext()->isFileContext() && +S->getStorageClass() != SC_Static}], pow2clk wrote

[clang] [HLSL] (DRAFT) Another way to implement #92071: [HLSL] Default linkage of HLSL function should be internal (PR #95331)

2024-07-25 Thread Greg Roth via cfe-commits
@@ -119,3 +119,16 @@ behavior between Clang and DXC. Some examples include: diagnostic notifying the user of the conversion rather than silently altering precision relative to the other overloads (as FXC does) or generating code that will fail validation (as DXC does). +

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-25 Thread Christopher Di Bella via cfe-commits
@@ -3058,6 +3058,133 @@ void Sema::NoteAllFoundTemplates(TemplateName Name) { } } +static QualType commonTypeImpl(Sema &S, TemplateName BaseTemplate, + SourceLocation TemplateLoc, + ArrayRef Ts) { + auto lookUpComm

[clang] [llvm] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin, fmax and frexp. (PR #88978)

2024-07-25 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: @hubert-reinterpretcast Would really appreciate a review of this please. Thanks. https://github.com/llvm/llvm-project/pull/88978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-25 Thread Nikolas Klauser via cfe-commits
@@ -3058,6 +3058,133 @@ void Sema::NoteAllFoundTemplates(TemplateName Name) { } } +static QualType commonTypeImpl(Sema &S, TemplateName BaseTemplate, + SourceLocation TemplateLoc, + ArrayRef Ts) { + auto lookUpComm

[clang] [clang] Generate nuw GEPs for struct member accesses (PR #99538)

2024-07-25 Thread Hari Limaye via cfe-commits
hazzlim wrote: > `CGBuilder` is just aiming to provide an `Address` overload of LLVM's > `CreateStructGEP`. It seems wrong for two overloads to have subtly different > behavior. > > Is there a reason why LLVM's `CreateStructGEP` doesn't add `nuw` itself? Good point - I can see that it makes m

[clang] [clang][Sema] Add support for OpenBSD's syslog format attribute (PR #97366)

2024-07-25 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/97366 >From ef333bbd76f02928d2519e3091f16b0825caf4a2 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Mon, 1 Jul 2024 19:41:57 -0400 Subject: [PATCH] [clang][Sema] Add support for OpenBSD's format attribute syslog --- c

[clang] [clang] Allow 'convergent' to be a statement attribute (PR #100637)

2024-07-25 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Missing testcase for the generated IR. https://github.com/llvm/llvm-project/pull/100637 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Factor out NoOwnershipChangeVisitor (PR #94357)

2024-07-25 Thread Mike Rice via cfe-commits
=?utf-8?q?Kristóf?= Umann Message-ID: In-Reply-To: @@ -804,23 +751,21 @@ class NoOwnershipChangeVisitor final : public NoStateChangeFuncVisitor { return false; } + bool hasResourceStateChanged(ProgramStateRef CallEnterState, + ProgramSt

[clang] [Clang] Initializer list on RHS of assignment (PR #100548)

2024-07-25 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/100548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement `__is_virtual_base_of()` intrinsic (PR #100393)

2024-07-25 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/100393 >From 772b5d85dff73de9f6a01a266bd201cbe04923ab Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 24 Jul 2024 17:38:50 +0300 Subject: [PATCH 1/5] [clang] Impement `__is_virtual_base_of()` intrinsic --

[clang] [Clang] Fix confusing diagnositcs related to explicit this parameters (PR #100351)

2024-07-25 Thread Braden Helmer via cfe-commits
bradenhelmer wrote: I'll need the merge button clicked, thanks https://github.com/llvm/llvm-project/pull/100351 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-25 Thread Christopher Di Bella via cfe-commits
@@ -3058,6 +3058,133 @@ void Sema::NoteAllFoundTemplates(TemplateName Name) { } } +static QualType commonTypeImpl(Sema &S, TemplateName BaseTemplate, + SourceLocation TemplateLoc, + ArrayRef Ts) { + auto lookUpComm

[clang] [llvm] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin, fmax and frexp. (PR #88978)

2024-07-25 Thread Joshua Cranmer via cfe-commits
@@ -14674,6 +14676,31 @@ static bool TryEvaluateBuiltinNaN(const ASTContext &Context, return true; } +// Checks that the value x is in the range (-1;-0.5], [0.5; 1) +static bool isInFrexpResultRange(const llvm::APFloat &x) { + llvm::APFloat minusOne(x.getSemantics(), "-1.

[clang] [Clang] Suppress missing architecture error when doing LTO (PR #100652)

2024-07-25 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/100652 Summary: The `nvlink-wrapper` can do LTO now, which means we can still create some LLVM-IR without needing an architecture. In the case that we try to invoke `nvlink` internally, that will still fail. This patch

[clang] [Clang] Suppress missing architecture error when doing LTO (PR #100652)

2024-07-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Joseph Huber (jhuber6) Changes Summary: The `nvlink-wrapper` can do LTO now, which means we can still create some LLVM-IR without needing an architecture. In the case that we try to invoke `nvlink` internal

[clang] [LinkerWrapper] Forward `-mllvm` and `--offload-opt` arguments to device (PR #100424)

2024-07-25 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/100424 >From da623e1f8259a42aee469dc99f05e8cd24caf511 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 24 Jul 2024 11:44:22 -0500 Subject: [PATCH 1/2] [LinkerWrapper] Forward `-mllvm` and `--offload-opt` argumen

[clang] [LinkerWrapper] Forward `-mllvm` and `--offload-opt` arguments to device (PR #100424)

2024-07-25 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 888ae9066da9c9758c03e839be6cefb3246a9b1c 78667b2fd0d24e2089af55ca757be8a4bf0b063f --e

[clang] [Clang] Initializer list on RHS of assignment (PR #100548)

2024-07-25 Thread Shafik Yaghmour via cfe-commits
@@ -14578,21 +14578,51 @@ ExprResult Sema::CreateBuiltinBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr) { if (getLangOpts().CPlusPlus11 && isa(RHSExpr)) { -// The sy

[clang] [lldb] [HLSL] Implement intangible AST type (PR #97362)

2024-07-25 Thread Chris B via cfe-commits
@@ -8001,6 +8001,12 @@ NamedDecl *Sema::ActOnVariableDeclarator( } } + if (getLangOpts().HLSL) { +if (R->isHLSLSpecificType() && !NewVD->isImplicit()) { + Diag(D.getBeginLoc(), diag::err_hlsl_intangible_type_cannot_be_declared); llvm-beanz wrot

[clang] [Fuchsia] Apply armv8m flags for runtimes (PR #100656)

2024-07-25 Thread via cfe-commits
https://github.com/PiJoules created https://github.com/llvm/llvm-project/pull/100656 These are needed for cortex-m33. Ideally in the future we'd have separate multilibs for different ABI configs and we wouldn't need to explicitly set cortex-m33 manually. The driver should handle it. >From 8b8

[clang] [Fuchsia] Apply armv8m flags for runtimes (PR #100656)

2024-07-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (PiJoules) Changes These are needed for cortex-m33. Ideally in the future we'd have separate multilibs for different ABI configs and we wouldn't need to explicitly set cortex-m33 manually. The driver should handle it. --- Full diff:

[clang] 5b4e5f8 - [OpenMPIRBuilder][Clang][NFC] - Combine `emitOffloadingArrays` and `emitOffloadingArraysArgument` in OpenMPIRBuilder (#97088)

2024-07-25 Thread via cfe-commits
Author: Pranav Bhandarkar Date: 2024-07-25T16:28:11-05:00 New Revision: 5b4e5f8ac6c6f7e25f7c87a26f2d2eaa0ebba8e3 URL: https://github.com/llvm/llvm-project/commit/5b4e5f8ac6c6f7e25f7c87a26f2d2eaa0ebba8e3 DIFF: https://github.com/llvm/llvm-project/commit/5b4e5f8ac6c6f7e25f7c87a26f2d2eaa0ebba8e3.d

[clang] [llvm] [OpenMPIRBuilder][Clang][NFC] - Combine `emitOffloadingArrays` and `emitOffloadingArraysArgument` in OpenMPIRBuilder (PR #97088)

2024-07-25 Thread Pranav Bhandarkar via cfe-commits
https://github.com/bhandarkar-pranav closed https://github.com/llvm/llvm-project/pull/97088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [libcxx] [libunwind] [llvm] [openmp] [cmake] switch to CMake's native `check_{compiler,linker}_flag` (PR #96171)

2024-07-25 Thread Ryan Prichard via cfe-commits
rprichard wrote: I rebased the changes so I could review them, https://github.com/llvm/llvm-project/commit/640d2e631a4bc11e3afa030e30d05288ee954cb5. The compiler-rt/cmake/config-ix.cmake file is still removing `include(LLVMCheckCompilerLinkerFlag)`, but it needs to keep it now. https://githu

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-07-25 Thread Mike Rice via cfe-commits
@@ -290,3 +294,296 @@ void SemaHLSL::DiagnoseAttrStageMismatch( << A << HLSLShaderAttr::ConvertShaderTypeToStr(Stage) << (AllowedStages.size() != 1) << join(StageStrings, ", "); } + +namespace { + +/// This class implements HLSL availability diagnostics for default

[clang] [Fuchsia] Apply armv8m flags for runtimes (PR #100656)

2024-07-25 Thread via cfe-commits
https://github.com/zeroomega approved this pull request. https://github.com/llvm/llvm-project/pull/100656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 38f2f95 - [Fuchsia] Apply armv8m flags for runtimes (#100656)

2024-07-25 Thread via cfe-commits
Author: PiJoules Date: 2024-07-25T14:42:46-07:00 New Revision: 38f2f9527249894a6a77c22abe8f39d6369d7ced URL: https://github.com/llvm/llvm-project/commit/38f2f9527249894a6a77c22abe8f39d6369d7ced DIFF: https://github.com/llvm/llvm-project/commit/38f2f9527249894a6a77c22abe8f39d6369d7ced.diff LOG:

[clang] [Fuchsia] Apply armv8m flags for runtimes (PR #100656)

2024-07-25 Thread via cfe-commits
https://github.com/PiJoules closed https://github.com/llvm/llvm-project/pull/100656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Add metadata for load from reference (PR #98746)

2024-07-25 Thread Eli Friedman via cfe-commits
@@ -1,8 +1,8 @@ // RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -o - %s -O2 | FileCheck %s -// Make sure the call to b() doesn't get optimized out. +// Make sure the call to b() is eliminated. extern struct x {char& x,y;}y; int b(); int a() { if (!&y.x) b();

[clang] [Clang][CodeGen] Add metadata for load from reference (PR #98746)

2024-07-25 Thread Eli Friedman via cfe-commits
@@ -2799,9 +2799,30 @@ CodeGenFunction::EmitLoadOfReference(LValue RefLVal, llvm::LoadInst *Load = Builder.CreateLoad(RefLVal.getAddress(), RefLVal.isVolatile()); CGM.DecorateInstructionWithTBAA(Load, RefLVal.getTBAAInfo()); - return makeNaturalAddressForPointer(Load

[clang] 8dd5742 - Fix aarch64-ptrauth.c to avoid writing to cwd which might not be writeable

2024-07-25 Thread David Blaikie via cfe-commits
Author: David Blaikie Date: 2024-07-25T21:52:14Z New Revision: 8dd574236ccaa0a183278396cfec3068b832651a URL: https://github.com/llvm/llvm-project/commit/8dd574236ccaa0a183278396cfec3068b832651a DIFF: https://github.com/llvm/llvm-project/commit/8dd574236ccaa0a183278396cfec3068b832651a.diff LOG:

[clang] RFC: [cmake] Export CLANG_RESOURCE_DIR in ClangConfig (PR #97197)

2024-07-25 Thread Tulio Magno Quites Machado Filho via cfe-commits
tuliom wrote: > `clang::Driver` has this method which allows you to specify the starting path > for the clang installation to use for the resource lookup. > > ```c++ > /// Takes the path to a binary that's either in bin/ or lib/ and returns > /// the path to clang's resource directory. > static

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-25 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/99473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-25 Thread Richard Smith via cfe-commits
https://github.com/zygoloid commented: How much of a performance difference are you measuring with this change? https://github.com/llvm/llvm-project/pull/99473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-25 Thread Richard Smith via cfe-commits
@@ -3058,6 +3058,133 @@ void Sema::NoteAllFoundTemplates(TemplateName Name) { } } +static QualType commonTypeImpl(Sema &S, TemplateName BaseTemplate, + SourceLocation TemplateLoc, + ArrayRef Ts) { + auto lookUpComm

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-25 Thread Richard Smith via cfe-commits
@@ -6848,6 +6848,14 @@ CXXRecordMembersNamed(StringRef Name, Sema &S, QualType Ty) { return Results; } +QualType Sema::getTypeMember(QualType Type, StringRef Name) { + auto Results = CXXRecordMembersNamed(Name, *this, Type); + assert(Results.size() <= 1); + if (Results.e

[clang] [flang] [Flang][Driver] Introduce -fopenmp-targets offloading option (PR #100152)

2024-07-25 Thread Johannes Doerfert via cfe-commits
jdoerfert wrote: > One related question I have - does Flang compile for one offload model or can > it mix those (let's say compile sources with mixed OpenACC and OpenMP > pragmas)? If mixing is allowed then it may also make sense to add a way of > setting the target per programming model. But

[clang] [Clang] Remove `IDNS_Ordinary` flag in `IndirectFieldDecl::IdentifierNamespace` (PR #100525)

2024-07-25 Thread via cfe-commits
https://github.com/Sirraide commented: Looks reasonable, but I’d prefer it if someone more familiar w/ the C standard than me could take another look at this. CC @AaronBallman https://github.com/llvm/llvm-project/pull/100525 ___ cfe-commits mailing l

[clang] [compiler-rt] [libcxx] [libunwind] [llvm] [openmp] [cmake] switch to CMake's native `check_{compiler,linker}_flag` (PR #96171)

2024-07-25 Thread via cfe-commits
h-vetinari wrote: > I rebased the changes so I could review them, > https://github.com/llvm/llvm-project/commit/640d2e631a4bc11e3afa030e30d05288ee954cb5. The github UI should show all changes to main? Not sure why a rebase would be necessary...? > The compiler-rt/cmake/config-ix.cmake file is

[clang] [compiler-rt] [libcxx] [libunwind] [llvm] [openmp] [cmake] switch to CMake's native `check_{compiler,linker}_flag` (PR #96171)

2024-07-25 Thread via cfe-commits
h-vetinari wrote: If you're interested in everything but the first commit, the GH UI can do that too (there's a dropdown in the upper lefthand corner): https://github.com/llvm/llvm-project/pull/96171/files/1df587efeb71fb1929667f008d7e9b251863d9d8..a47554828053c039916b005f15446df14f594e50 https:

[clang] [compiler-rt] [libcxx] [libunwind] [llvm] [openmp] [cmake] switch to CMake's native `check_{compiler,linker}_flag` (PR #96171)

2024-07-25 Thread Ryan Prichard via cfe-commits
rprichard wrote: > The github UI should show all changes to main? Not sure why a rebase would be > necessary...? Sorry, you're right. (Not sure why I didn't notice that before.) The change looks good to me now. https://github.com/llvm/llvm-project/pull/96171 _

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-07-25 Thread Eli Friedman via cfe-commits
@@ -532,9 +533,298 @@ bool SystemZTargetCodeGenInfo::isVectorTypeBased(const Type *Ty, return false; } +//===--===// +// z/OS XPLINK ABI Implementation +//===

[clang] clang: Allow targets to set custom metadata on atomics (PR #96906)

2024-07-25 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/96906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4ed543d - [InstallAPI] Fix early return for scanning sub-directories (#100636)

2024-07-25 Thread via cfe-commits
Author: Cyndy Ishida Date: 2024-07-25T15:26:41-07:00 New Revision: 4ed543d414b6f39fb5302322eecb8abf33c76f89 URL: https://github.com/llvm/llvm-project/commit/4ed543d414b6f39fb5302322eecb8abf33c76f89 DIFF: https://github.com/llvm/llvm-project/commit/4ed543d414b6f39fb5302322eecb8abf33c76f89.diff

[clang] [InstallAPI] Fix early return for scanning sub-directories (PR #100636)

2024-07-25 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/100636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ARM64EC] Add support for hybrid_patchable attribute. (PR #99478)

2024-07-25 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM (Please cherry-pick to 19; I'd like to have this in 19. And maybe https://github.com/cjacek/llvm-project/commit/4febef20ab27ef4440e9dccf3cc65dd6be1f4d7c, if you wouldn't mind opening a pull request for that.) https://github.co

[clang] [llvm] [OpenMPIRBuilder][Clang][NFC] - Combine `emitOffloadingArrays` and `emitOffloadingArraysArgument` in OpenMPIRBuilder (PR #97088)

2024-07-25 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-5` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/2675 Here is

[clang] [Clang][objectsize] Generate object size calculation for sub-objects (PR #86858)

2024-07-25 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: As a matter of ensuring the behavior is predictable, I don't like IgnoreParenImpCasts(), and more generally looking through casts without checking the CastKind; it very easily leads to bugs because some casts have important semantics. Particularly lv

[clang] [clang] Allow 'convergent' to be a statement attribute (PR #100637)

2024-07-25 Thread via cfe-commits
https://github.com/darkbuck updated https://github.com/llvm/llvm-project/pull/100637 >From d9de73264bf4d555e7e09a2c2687eae72c1fa19e Mon Sep 17 00:00:00 2001 From: Michael Liao Date: Thu, 25 Jul 2024 15:19:15 -0400 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?U

<    1   2   3   4   >