[clang] [CUDA] Fix a couple of driver tests that really weren't being run (PR #93960)

2024-05-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Paul T Robinson (pogo59) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/93960.diff 2 Files Affected: - (modified) clang/test/Driver/offloading-interoperability.c (+1-4) - (modified) clang/test/Driver/openmp-of

[clang] [CUDA] Fix a couple of driver tests that really weren't being run (PR #93960)

2024-05-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Paul T Robinson (pogo59) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/93960.diff 2 Files Affected: - (modified) clang/test/Driver/offloading-interoperability.c (+1-4) - (modified) clang/test/Driver/openmp-offload-g

[clang] [CUDA] Fix a couple of driver tests that really weren't being run (PR #93960)

2024-05-31 Thread Paul T Robinson via cfe-commits
pogo59 wrote: I found these because while I normally build with all targets, I don't usually bother running check-all. The other day I did, and these two tests failed. Driver tests normally should not need *-registered-target constraints, and these tests were looking at the host's CUDA install

[clang] [clang][analyzer] Improved PointerSubChecker (PR #93676)

2024-05-31 Thread Balázs Kéri via cfe-commits
@@ -0,0 +1,74 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.core.PointerSub -verify %s + +void f1(void) { + int x, y, z[10]; + int d = &y - &x; // expected-warning{{Subtraction of two pointers that do not point into the same array is undefined behavior}} + d = z - &y;

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-31 Thread Erich Keane via cfe-commits
erichkeane wrote: > > No worries, and I reverted it for you. When you have the fix ready, I'm > > happy to verify it on our builders before you reland. > > Can you also reopen this PR, please? For documentation/history reasons, it's > probably better to provide a fix within the scope of this P

[clang] [llvm] [EntryExitInstrumenter] Move passes out of clang into LLVM default pipelines (PR #92171)

2024-05-31 Thread Egor Pasko via cfe-commits
pasko wrote: > looks like `CodeGen/AMDGPU/llc-pipeline.ll` is failing Fixed. https://github.com/llvm/llvm-project/pull/92171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] require template arg list after template kw (PR #80801)

2024-05-31 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/80801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Push an evaluation context for type constraints (PR #93945)

2024-05-31 Thread Erich Keane via cfe-commits
@@ -5004,6 +5004,20 @@ static bool CheckDeducedPlaceholderConstraints(Sema &S, const AutoType &Type, return true; MultiLevelTemplateArgumentList MLTAL(Concept, CanonicalConverted, /*Final=*/false); + // Build up an EvaluationContex

[clang] [llvm] [clang][CodeGen] Global constructors/destructors are globals (PR #93914)

2024-05-31 Thread Matt Arsenault via cfe-commits
arsenm wrote: > Perhaps an alternative is to tweak LangRef wording to say that that these are > always emitted as unqualified ptrs, and that their ephemeral nature implies > that their AS is meaningless? I think this is the correct way to handle it. Also we'll need a few stripPointerCasts add

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
@@ -42,6 +42,8 @@ namespace clang { namespace clangd { + +class ModulesBuilder; kadircet wrote: we prefer to avoid forward declarations in clangd, can you rather depend on the header directly? https://github.com/llvm/llvm-project/pull/66462

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
@@ -149,9 +154,13 @@ struct PreambleBuildStats { /// If \p PreambleCallback is set, it will be run on top of the AST while /// building the preamble. /// If Stats is not non-null, build statistics will be exported there. +/// If \p RequiredModuleBuilder is not null, it will sca

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
@@ -222,6 +222,9 @@ class TUScheduler { /// Cache (large) preamble data in RAM rather than temporary files on disk. bool StorePreamblesInMemory = false; +/// Enable experimental support for modules. +bool ExperimentalModulesSupport = false; kad

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
@@ -208,15 +208,16 @@ ClangdServer::Options::operator TUScheduler::Options() const { Opts.UpdateDebounce = UpdateDebounce; Opts.ContextProvider = ContextProvider; Opts.PreambleThrottler = PreambleThrottler; + Opts.ExperimentalModulesSupport = ExperimentalModulesSupport;

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,115 @@ +//===- ModulesBuilder.h --*- 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-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
@@ -44,6 +44,8 @@ struct ParseOptions { bool ImportInsertions = false; }; +class ModulesBuilder; kadircet wrote: again instead of forward decl, can you include the header? https://github.com/llvm/llvm-project/pull/66462

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
kadircet wrote: again no need for any of these changes, we should just pass `Inputs` as-is to `buildPreamble`. https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,206 @@ +//===-- ProjectModules.h -*- 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-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
@@ -25,6 +25,8 @@ namespace clang { namespace clangd { +class ProjectModules; kadircet wrote: as others have also pointed out, this forward declaration is working around a cyclic dependency. can we restructure this a little by: - moving definition of Project

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,370 @@ +//===- ModulesBuilder.cpp *- 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-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,115 @@ +//===- ModulesBuilder.h --*- 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-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,370 @@ +//===- ModulesBuilder.cpp *- 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-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
@@ -192,8 +192,10 @@ TEST(PreamblePatchTest, PatchesPreambleIncludes) { TU.AdditionalFiles["b.h"] = ""; TU.AdditionalFiles["c.h"] = ""; auto PI = TU.inputs(FS); - auto BaselinePreamble = buildPreamble( - TU.Filename, *buildCompilerInvocation(PI, Diags), PI, true, nu

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,370 @@ +//===- ModulesBuilder.cpp *- 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-Identifier: Ap

[clang] [clang] Fix loss of `dllexport` for exported template specialization (PR #93302)

2024-05-31 Thread Andrew Ng via cfe-commits
nga888 wrote: > I think the "surprise" is that the latter call to `GetOrCreateLLVMFunction` > is using an earlier `FunctionDecl`. Because of that, I'm thinking maybe the > fix is to call `getMostRecentDecl` on it, something like: Thanks for your time and the update. Yes, this is what I also di

[clang] [llvm] [clang][CodeGen] Global constructors/destructors are globals (PR #93914)

2024-05-31 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > > Perhaps an alternative is to tweak LangRef wording to say that that these > > are always emitted as unqualified ptrs, and that their ephemeral nature > > implies that their AS is meaningless? > > I think this is the correct way to handle it. Also we'll need a few > stripPo

[clang] [clang][analyzer] Improved PointerSubChecker (PR #93676)

2024-05-31 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/93676 From a896030e71d09ebe7239d6fab343606918ee4c1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Wed, 29 May 2024 14:28:43 +0200 Subject: [PATCH 1/3] [clang][analyzer] Improved PointerSubCh

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Vlad Serebrennikov (Endilll) Changes This patch moves language- and target-specific functions out of `SemaDeclAttr.cpp`. As a consequence, `SemaAVR`, `SemaM68k`, `SemaMSP430`, `SemaOpenCL`, `SemaSwift` were created (but they are not

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This patch moves language- and target-specific functions out of `SemaDeclAttr.cpp`. As a consequence, `SemaAVR`, `SemaM68k`, `SemaMSP430`, `SemaOpenCL`, `SemaSwift` were created (but they are not the o

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: Vlad Serebrennikov (Endilll) Changes This patch moves language- and target-specific functions out of `SemaDeclAttr.cpp`. As a consequence, `SemaAVR`, `SemaM68k`, `SemaMSP430`, `SemaOpenCL`, `SemaSwift` were created (but they are

[clang] [clang][analyzer] Improved PointerSubChecker (PR #93676)

2024-05-31 Thread Balázs Kéri via cfe-commits
balazske wrote: With the current version I have the following observations: - There is a warning for `(&x + 1) - &x` and `(&x - 1) - &x`. Should this be fixed? - The code `(int *)((char *)(&a[4]) + sizeof(int)) - &a[4]` produces no warning but `(int *)((char *)(&a[4]) + 1) - &a[4]` produces wa

[clang] [clang] Catch missing format attributes (PR #70024)

2024-05-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/70024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-31 Thread Vikram Hegde via cfe-commits
@@ -5496,6 +5496,9 @@ const char* AMDGPUTargetLowering::getTargetNodeName(unsigned Opcode) const { NODE_NAME_CASE(LDS) NODE_NAME_CASE(FPTRUNC_ROUND_UPWARD) NODE_NAME_CASE(FPTRUNC_ROUND_DOWNWARD) + NODE_NAME_CASE(READLANE) + NODE_NAME_CASE(READFIRSTLANE) ---

[clang] [Clang][Sema] Push an evaluation context for type constraints (PR #93945)

2024-05-31 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/93945 >From 088c4199dd37172a57d965fe1b22f782084e127e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 31 May 2024 18:15:54 +0800 Subject: [PATCH 1/2] [Clang][Sema] Push an evaluation context for type constraints

[clang] [Clang][Sema] Push an evaluation context for type constraints (PR #93945)

2024-05-31 Thread Younan Zhang via cfe-commits
@@ -5004,6 +5004,20 @@ static bool CheckDeducedPlaceholderConstraints(Sema &S, const AutoType &Type, return true; MultiLevelTemplateArgumentList MLTAL(Concept, CanonicalConverted, /*Final=*/false); + // Build up an EvaluationContex

[clang] [clang] ``README.txt``: Replace the link to the old bug tracker with the new one. (PR #93878)

2024-05-31 Thread Kirill Podoprigora via cfe-commits
Eclips4 wrote: > LGTM! Do you need someone to land this on your behalf? Is this addressed to me 😄? I don't have the rights to merge this if that's what you're talking about https://github.com/llvm/llvm-project/pull/93878 ___ cfe-commits mailing list

[clang] 6163775 - [clang] ``README.txt``: Replace the link to the old bug tracker with the new one. (#93878)

2024-05-31 Thread via cfe-commits
Author: Kirill Podoprigora Date: 2024-05-31T10:43:42-04:00 New Revision: 6163775077236a0e602759912872a06162efd01b URL: https://github.com/llvm/llvm-project/commit/6163775077236a0e602759912872a06162efd01b DIFF: https://github.com/llvm/llvm-project/commit/6163775077236a0e602759912872a06162efd01b.

[clang] [clang] ``README.txt``: Replace the link to the old bug tracker with the new one. (PR #93878)

2024-05-31 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 closed https://github.com/llvm/llvm-project/pull/93878 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Catch missing format attributes (PR #70024)

2024-05-31 Thread Budimir Aranđelović via cfe-commits
https://github.com/budimirarandjelovicsyrmia updated https://github.com/llvm/llvm-project/pull/70024 From 33f9a9b3df756331625ea3cc081e7ee7443d03f5 Mon Sep 17 00:00:00 2001 From: budimirarandjelovicsyrmia Date: Fri, 5 Apr 2024 15:20:37 +0200 Subject: [PATCH] [clang] Catch missing format attribut

[clang] [clang] Catch missing format attributes (PR #70024)

2024-05-31 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,303 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,beforeCxx2b -Wmissing-format-attribute %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++2b -Wmissing-format-attribute %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++23 -Wmissing-format-attribute %s +

[clang] [clang] Catch missing format attributes (PR #70024)

2024-05-31 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,277 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s + +typedef unsigned short char16_t; +typedef unsigned int char32_t; +typedef __WCHAR_TYPE__ wchar_t; +typedef __SIZE_TYPE__ size_t; +typedef __builtin_va_list va_list; + +__attribute__((__for

[clang] [clang] Catch missing format attributes (PR #70024)

2024-05-31 Thread Aaron Ballman via cfe-commits
@@ -7131,6 +7138,114 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D, const ParsedAttr &AL) { checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr); } +// This function is called only if function call is not inside template body. +// TODO: Add call for function calls

[clang] [clang] Catch missing format attributes (PR #70024)

2024-05-31 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,277 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s + +typedef unsigned short char16_t; +typedef unsigned int char32_t; +typedef __WCHAR_TYPE__ wchar_t; +typedef __SIZE_TYPE__ size_t; +typedef __builtin_va_list va_list; + +__attribute__((__for

[clang] [clang] Catch missing format attributes (PR #70024)

2024-05-31 Thread Aaron Ballman via cfe-commits
@@ -501,6 +501,9 @@ Improvements to Clang's diagnostics - Clang emits a ``-Wparentheses`` warning for expressions with consecutive comparisons like ``x < y < z``. Fixes #GH20456. +- Clang now diagnoses missing format attributes for non-template functions and + class/struct

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I didn't take a close look at the individual .cpp files, I assume that is mostly just Copy & paste. I would like us to be a little more forward-decl aggressive in the headers however, and perhpas try to minimize what gets pushed up to Sema.h. https://

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Erich Keane via cfe-commits
@@ -32,6 +32,7 @@ #include "clang/Basic/Specifiers.h" #include "clang/Sema/DeclSpec.h" #include "clang/Sema/Ownership.h" +#include "clang/Sema/ParsedAttr.h" erichkeane wrote: Could this be a forward decl? https://github.com/llvm/llvm-project/pull/93966 __

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Erich Keane via cfe-commits
@@ -0,0 +1,57 @@ +//===- SemaSwift.h --- Swift language-specific routines ---*- 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-Identifier: Apa

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Erich Keane via cfe-commits
@@ -3825,6 +3843,115 @@ class Sema final : public SemaBase { void redelayDiagnostics(sema::DelayedDiagnosticPool &pool); + /// Diagnose mutually exclusive attributes when present on a given erichkeane wrote: Where did this section of stuff come from? At

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Erich Keane via cfe-commits
@@ -18,6 +18,7 @@ #include "clang/AST/Type.h" #include "clang/Basic/SourceLocation.h" #include "clang/Basic/TargetInfo.h" +#include "clang/Sema/ParsedAttr.h" erichkeane wrote: Same question here. https://github.com/llvm/llvm-project/pull/93966 ___

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Erich Keane via cfe-commits
@@ -14,9 +14,11 @@ #define LLVM_CLANG_SEMA_SEMASYCL_H #include "clang/AST/Decl.h" +#include "clang/AST/DeclBase.h" erichkeane wrote: Wonder same about declbase as well, probably a bit of work on a few of these includes to do that sort of analysis. https://g

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

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

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/93493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. I looked through the review and I think this is generally an improvement. We may find a need to relax some `const` later, but I did not spot any obvious concerns. That said, I'd like @ChuanqiXu9 to give the final sign-off on this as m

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

2024-05-31 Thread Aaron Ballman via cfe-commits
@@ -74,8 +74,8 @@ On Unix-like Systems https://llvm.org/docs/CMake.html#frequently-used-cmake-variables";>frequently used cmake variables for more options. AaronBallman wrote: [Re: lines 72 to 76] I think we should update this text at t

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

2024-05-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/93503 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

2024-05-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: In general, I think this is heading in the right direction. I did have a suggestion that may be worth considering. https://github.com/llvm/llvm-project/pull/93503 ___ cfe-commits mailing list cfe-commits@list

[clang] [clang] Fix loss of `dllexport` for exported template specialization (PR #93302)

2024-05-31 Thread Andrew Ng via cfe-commits
nga888 wrote: Ok, I have confirmed that the `getMostRecentDecl()` fix does indeed work on the `main` branch. When I started debugging this issue sometime ago, I was working with a downstream branch based off `17.x` using the source file from UE 5.4. I remember trying the use of `getMostRecentD

[clang] [llvm] [AMDGPU] Implement variadic functions by IR lowering (PR #93362)

2024-05-31 Thread Jon Chesterfield via cfe-commits
@@ -103,19 +104,27 @@ void AMDGPUABIInfo::computeInfo(CGFunctionInfo &FI) const { if (!getCXXABI().classifyReturnType(FI)) FI.getReturnInfo() = classifyReturnType(FI.getReturnType()); + unsigned ArgumentIndex = 0; + const unsigned numFixedArguments = FI.getNumRequired

[clang] [llvm] [IPO] Implement common code for variadic lowering pass (PR #93974)

2024-05-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-llvm-transforms @llvm/pr-subscribers-backend-webassembly Author: Jon Chesterfield (JonChesterfield) Changes Factored out of 93362 --- Patch is 169.04 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/l

[clang] [CUDA][HIP] Fix std::min in wrapper header (PR #93976)

2024-05-31 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu created https://github.com/llvm/llvm-project/pull/93976 The std::min behaves like 'ahttps://github.com/llvm/llvm-project/issues/93962 Fixes: https://github.com/ROCm/HIP/issues/3502 >From ac8100056c81d1b4d3d40c31574be93ca78cf80c Mon Sep 17 00:00:00 2001 From: "Yaxun

[clang] [CUDA][HIP] Fix std::min in wrapper header (PR #93976)

2024-05-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yaxun (Sam) Liu (yxsamliu) Changes The std::min behaves like 'a

[clang] [CUDA][HIP] Fix std::min in wrapper header (PR #93976)

2024-05-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Yaxun (Sam) Liu (yxsamliu) Changes The std::min behaves like 'a

[clang] [clang][ASTImport] fix issue on anonymous enum import (PR #93923)

2024-05-31 Thread Balázs Kéri via cfe-commits
https://github.com/balazske commented: Does this work on the following code? ``` struct A { enum { E1,E2 } x; enum { E3,E4 } y; }; ``` https://github.com/llvm/llvm-project/pull/93923 ___ cfe-commits mailing list cfe-commits@

[clang] [clang][ASTImport] fix issue on anonymous enum import (PR #93923)

2024-05-31 Thread Balázs Kéri via cfe-commits
https://github.com/balazske edited https://github.com/llvm/llvm-project/pull/93923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImport] fix issue on anonymous enum import (PR #93923)

2024-05-31 Thread Balázs Kéri via cfe-commits
@@ -9674,6 +9674,27 @@ TEST_P(ASTImporterOptionSpecificTestBase, ImportInstantiatedFromMember) { EXPECT_TRUE(ImportedPartialSpecialization->getInstantiatedFromMember()); } +TEST_P(ASTImporterOptionSpecificTestBase, ImportAnonymousEnum) { + const char *ToCode = + R"( +

[clang] [clang-tools-extra] [libcxx] [clang][Modules] Remove unnecessary includes of `Module.h` (PR #93417)

2024-05-31 Thread David Stone via cfe-commits
https://github.com/davidstone updated https://github.com/llvm/llvm-project/pull/93417 >From 19b59231951b3ef48e36b0342f15d61687b72d8d Mon Sep 17 00:00:00 2001 From: David Stone Date: Fri, 31 May 2024 09:40:02 -0600 Subject: [PATCH] [clang][Modules] Remove unnecessary includes of `Module.h` ---

[clang] [clang-tools-extra] [libcxx] [clang][Modules] Remove unnecessary includes of `Module.h` (PR #93417)

2024-05-31 Thread David Stone via cfe-commits
@@ -159,7 +159,8 @@ class APINotesManager { ArrayRef getCurrentModuleReaders() const { bool HasPublic = CurrentModuleReaders[ReaderKind::Public]; bool HasPrivate = CurrentModuleReaders[ReaderKind::Private]; -assert((!HasPrivate || HasPublic) && "private module req

[clang] 85ea1aa - [OpenACC] Fix device_type clause appertainment

2024-05-31 Thread via cfe-commits
Author: erichkeane Date: 2024-05-31T08:43:48-07:00 New Revision: 85ea1aaf15b3721aaea35280ffdedad36128bf6b URL: https://github.com/llvm/llvm-project/commit/85ea1aaf15b3721aaea35280ffdedad36128bf6b DIFF: https://github.com/llvm/llvm-project/commit/85ea1aaf15b3721aaea35280ffdedad36128bf6b.diff LO

[clang] [llvm] [IPO] Implement common code for variadic lowering pass (PR #93974)

2024-05-31 Thread Jon Chesterfield via cfe-commits
https://github.com/JonChesterfield edited https://github.com/llvm/llvm-project/pull/93974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add support for Cortex-A725 and Cortex-X925 (PR #93978)

2024-05-31 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray created https://github.com/llvm/llvm-project/pull/93978 Cortex-A725 and Cortex-X925 are Armv9.2 AArch64 CPUs. Technical Reference Manual for Cortex-A725: https://developer.arm.com/documentation/107652/latest Technical Reference Manual for Cortex-X925: https:/

[clang] [llvm] [AArch64] Add support for Cortex-A725 and Cortex-X925 (PR #93978)

2024-05-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-backend-aarch64 Author: Jonathan Thackray (jthackray) Changes Cortex-A725 and Cortex-X925 are Armv9.2 AArch64 CPUs. Technical Reference Manual for Cortex-A725: https://developer.arm.com/documentation/107652/latest T

[clang] [llvm] [IPO] Implement common code for variadic lowering pass (PR #93974)

2024-05-31 Thread Jon Chesterfield via cfe-commits
JonChesterfield wrote: This is #93362 with the amdgpu part removed as debugging the reported amdgpu libc memory error is taking longer than one hoped and I'd like to unblock implementing other targets. As it stands this is dead code other than the wasm tests which has the advantage that it de

[clang] [libc] [llvm] [AMDGPU] Implement variadic functions by IR lowering (PR #93362)

2024-05-31 Thread Jon Chesterfield via cfe-commits
JonChesterfield wrote: I've spawned #93974 in case we can land the target independent part in parallel with me trying to debug the amdgpu/libc error. Maintaining different branches with different variations on what subset is implemented is confusing me quite a lot and leads to reviewers seeing

[clang] Remove dangling conversion to `optional &` (PR #93385)

2024-05-31 Thread David Stone via cfe-commits
davidstone wrote: Yes please https://github.com/llvm/llvm-project/pull/93385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [llvm] [AMDGPU] Implement variadic functions by IR lowering (PR #93362)

2024-05-31 Thread via cfe-commits
@@ -10,6 +10,50 @@ #include "test/UnitTest/Test.h" +#include "src/__support/OSUtil/io.h" +#include "src/__support/integer_to_string.h" +using namespace LIBC_NAMESPACE; + +namespace { + +void nl() { write_to_stderr("\n"); } +void dump(const char *s) { + write_to_stderr(s); +

[clang] [clang][analyzer] Move PutenvStackArrayChecker out of alpha package. (PR #93980)

2024-05-31 Thread Balázs Kéri via cfe-commits
https://github.com/balazske created https://github.com/llvm/llvm-project/pull/93980 Checker alpha.security.PutenvStackArray is moved to security.PutenvStackArray. From 033c7c2187f4dcbd050c69c5279ae2dcfe02c529 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Wed, 29 May

[clang] [clang][analyzer] Move PutenvStackArrayChecker out of alpha package. (PR #93980)

2024-05-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balázs Kéri (balazske) Changes Checker alpha.security.PutenvStackArray is moved to security.PutenvStackArray. --- Full diff: https://github.com/llvm/llvm-project/pull/93980.diff 3 Files Affect

[clang] [llvm] Intrinsic: introduce minimumnum and maximumnum (PR #93841)

2024-05-31 Thread YunQiang Su via cfe-commits
@@ -16049,6 +16094,84 @@ of the two arguments. -0.0 is considered to be less than +0.0 for this intrinsic. Note that these are the semantics specified in the draft of IEEE 754-2019. +.. _i_minimumnum: + +'``llvm.minimumnum.*``' Intrinsic +^ + +

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-05-31 Thread Dana Jansens via cfe-commits
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D, } } } + +void clang::checkUnsafeBufferUsage(const Decl *D, + UnsafeBufferUsageHandler &Handler, + bool EmitSuggestions) { +#ifndef

[clang] [clang][analyzer] Move PutenvStackArrayChecker out of alpha package. (PR #93980)

2024-05-31 Thread Balázs Kéri via cfe-commits
balazske wrote: I found [this one](https://codechecker-demo.eastus.cloudapp.azure.com/Default/report-detail?run=memcached_1.6.8_baseline&is-unique=off&diff-type=New&checker-name=alpha.security.PutenvStackArray&report-hash=8c8c23edbd58c25757a51f22d1a10a5a&report-id=5484388&report-filepath=%2Floca

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-05-31 Thread Dana Jansens via cfe-commits
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D, } } } + +void clang::checkUnsafeBufferUsage(const Decl *D, + UnsafeBufferUsageHandler &Handler, + bool EmitSuggestions) { +#ifndef

[clang] [Clang] [C23] Fix typeof_unqual for qualified array types (PR #92767)

2024-05-31 Thread Aaron Ballman via cfe-commits
@@ -92,3 +92,43 @@ extern __attribute__((address_space(0))) int type_attr_test_2; // expec void invalid_param_fn(__attribute__((address_space(1))) int i); // expected-error {{parameter may not be qualified with an address space}} typeof(invalid_param_fn) invalid_param

[clang] [clang][Interp] Member Pointers (PR #91303)

2024-05-31 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/91303 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [clang][Interp] Member Pointers (PR #91303)

2024-05-31 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: https://github.com/AaronBallman approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/91303 ___ cfe-commits mailing

[clang] [clang][Interp] Member Pointers (PR #91303)

2024-05-31 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -0,0 +1,112 @@ +//===- MemberPointer.h --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exce

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Precommit CI failures seem relevant. https://github.com/llvm/llvm-project/pull/93966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Aaron Ballman via cfe-commits
@@ -32,5 +36,87 @@ inline bool isFunctionOrMethodOrBlockForAttrSubject(const Decl *D) { return isFuncOrMethodForAttrSubject(D) || llvm::isa(D); } +/// Return true if the given decl has a declarator that should have +/// been processed by Sema::GetTypeForDeclarator. +inline

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/93966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Aaron Ballman via cfe-commits
@@ -32,5 +36,87 @@ inline bool isFunctionOrMethodOrBlockForAttrSubject(const Decl *D) { return isFuncOrMethodForAttrSubject(D) || llvm::isa(D); } +/// Return true if the given decl has a declarator that should have +/// been processed by Sema::GetTypeForDeclarator. +inline

[clang] [BoundsSafety] Add `-fexperimental-bounds-safety` CC1 and language option and use it to tweak `counted_by`'s semantics (PR #92623)

2024-05-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/92623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [BoundsSafety] Add `-fexperimental-bounds-safety` CC1 and language option and use it to tweak `counted_by`'s semantics (PR #92623)

2024-05-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: I'd like to understand why we need a flag for this rather than changing the behavior of `-fbounds-safety`. (I'd like to avoid a proliferation of flags unless this flag is going to gate more changes in the near future.) https://github.com/llvm/llvm-pro

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-05-31 Thread Dana Jansens via cfe-commits
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D, } } } + +void clang::checkUnsafeBufferUsage(const Decl *D, + UnsafeBufferUsageHandler &Handler, + bool EmitSuggestions) { +#ifndef

[clang] [Bounds-Safety] Add sized_by, counted_by_or_null & sized_by_or_null (PR #93231)

2024-05-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. There are a few minor suggestions from @delcypher that should be addressed, but overall the changes LGTM (assuming there are no precommit CI surprises after fixing the merge conflicts). https://github.com/llvm/llvm-project/pull/93231

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-05-31 Thread Dana Jansens via cfe-commits
https://github.com/danakj edited https://github.com/llvm/llvm-project/pull/91991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA] Fix a couple of driver tests that really weren't being run (PR #93960)

2024-05-31 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu approved this pull request. https://github.com/llvm/llvm-project/pull/93960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Vlad Serebrennikov via cfe-commits
@@ -32,6 +32,7 @@ #include "clang/Basic/Specifiers.h" #include "clang/Sema/DeclSpec.h" #include "clang/Sema/Ownership.h" +#include "clang/Sema/ParsedAttr.h" Endilll wrote: Yeah, I totally forgot about forward decls while preparing this PR. I fixed that for th

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,57 @@ +//===- SemaSwift.h --- Swift language-specific routines ---*- 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-Identifier: Apa

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 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 c5fdb5c34e0dc3f5f3c0db19cf704b30a778cd0e b7d132f0a9d2b6acc67c227af6ce86eeeb394b82 --

[clang] [llvm] Intrinsic: introduce minimumnum and maximumnum (PR #93841)

2024-05-31 Thread YunQiang Su via cfe-commits
wzssyqa wrote: > > 3. PowerPC: has some interaction with the behavior of `minnum/maxnum`: need > > define `fcanonicalize`. > > AMDGPU has the same handling. This is to break the signaling nan handling > from IEEE to the broken old glibc libm behavior. If we fix the definition to > match IEEE,

<    1   2   3   4   5   >