[clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-05-30 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 971f1aaad3ca3680bfbab76212f498ca15b280a2 91276f5b2dc05032a285b465c0c8a69541bb25c4 --

[clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-05-30 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 971f1aaad3ca3680bfbab76212f498ca15b280a2...91276f5b2dc05032a285b465c0c8a69541bb25c4 lldb/

[clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-05-30 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/93809 >From 91276f5b2dc05032a285b465c0c8a69541bb25c4 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 2 May 2024 09:05:01 +0100 Subject: [PATCH 1/2] [clang][lldb] Don't assert structure layout correctness for

[clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-05-30 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/93809 >From 91276f5b2dc05032a285b465c0c8a69541bb25c4 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 2 May 2024 09:05:01 +0100 Subject: [PATCH 1/3] [clang][lldb] Don't assert structure layout correctness for

[clang-tools-extra] [clang-tidy] Add `bugprone-pointer-arithmetic-on-polymorphic-object` check (PR #91951)

2024-05-30 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,49 @@ +//===--- VirtualArithmeticCheck.cpp - clang-tidy---===// +// +// 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][analyzer][tests] Add test for a limitation of alpha.unix.Bloc… (PR #93799)

2024-05-30 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/93799 From 6cc7b93783993e0e7f21124f2d640cb92484faff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Thu, 30 May 2024 11:12:59 +0200 Subject: [PATCH 1/2] [clang][analyzer][NFC] Add test for a

[clang] [clang][analyzer][NFC] Improve docs of alpha.unix.BlockInCriticalSection (PR #93812)

2024-05-30 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 created https://github.com/llvm/llvm-project/pull/93812 - Enhanced descriptions for blocking and critical section functions - Added an additional code sample highlighting interleaved C and C++ style mutexes - Introduced a new section on limitations From 8cb24070e2c

[clang] [clang][analyzer][NFC] Improve docs of alpha.unix.BlockInCriticalSection (PR #93812)

2024-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Endre Fülöp (gamesh411) Changes - Enhanced descriptions for blocking and critical section functions - Added an additional code sample highlighting interleaved C and C++ style mutexes - Introduced a new section on limitations --- Full diff

[clang] [clang][analyzer][NFC] Improve docs of alpha.unix.BlockInCriticalSection (PR #93812)

2024-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Endre Fülöp (gamesh411) Changes - Enhanced descriptions for blocking and critical section functions - Added an additional code sample highlighting interleaved C and C++ style mutexes - Introduced a new section on limitatio

[clang] [llvm] [LoongArch] Adjust LA64 data layout by using n32:64 in layout string (PR #93814)

2024-05-30 Thread via cfe-commits
https://github.com/heiher created https://github.com/llvm/llvm-project/pull/93814 Although i32 type is illegal in the backend, LA64 has pretty good support for i32 types by using W instructions. By adding n32 to the DataLayout string, middle end optimizations will consider i32 to be a native

[clang] [llvm] [LoongArch] Adjust LA64 data layout by using n32:64 in layout string (PR #93814)

2024-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-loongarch Author: hev (heiher) Changes Although i32 type is illegal in the backend, LA64 has pretty good support for i32 types by using W instructions. By adding n32 to the DataLayout string, middle end optimizations

[clang] [clang][analyzer] Move unix.BlockInCriticalSection out of alpha (PR #93815)

2024-05-30 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 created https://github.com/llvm/llvm-project/pull/93815 After recent improvements, and testing on open source projects, the checker is ready to move out of the alpha package. I would like to land #93799 and #93799 first, then this modification. I have ran this chec

[clang] [clang][analyzer][tests] Add test for a limitation of alpha.unix.Bloc… (PR #93799)

2024-05-30 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/93799 From 6cc7b93783993e0e7f21124f2d640cb92484faff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Thu, 30 May 2024 11:12:59 +0200 Subject: [PATCH 1/3] [clang][analyzer][NFC] Add test for a

[clang] [clang][analyzer][NFC] Add test for a limitation of alpha.unix.Bloc… (PR #93799)

2024-05-30 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 edited https://github.com/llvm/llvm-project/pull/93799 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Test explicit emission of dtors in runtime interface builder (NFC) (PR #89734)

2024-05-30 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail updated https://github.com/llvm/llvm-project/pull/89734 From 3aef8a0b009b54c4839a323b21cb5b09aa50d035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Tue, 23 Apr 2024 12:23:11 +0200 Subject: [PATCH 1/3] [clang-repl] Add test for explicit

[clang] [clang-repl] Introduce common fixture class in unittests (NFC) (PR #93816)

2024-05-30 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail created https://github.com/llvm/llvm-project/pull/93816 Reduce code bloat by checking test requirements in a common test fixture From fd02a874601b8a72d05c3c1b219e28600851b56b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Thu, 30 May 20

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-05-30 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: Here we go: https://github.com/llvm/llvm-project/pull/93816 https://github.com/llvm/llvm-project/pull/84758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer][NFC] Add test for a limitation of alpha.unix.Bloc… (PR #93799)

2024-05-30 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. It's good to document this, the commit LGTM. Are you planning to fix this soon? https://github.com/llvm/llvm-project/pull/93799 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [clang-repl] Introduce common fixture class in unittests (NFC) (PR #93816)

2024-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Stefan Gränitz (weliveindetail) Changes Reduce code bloat by checking test requirements in a common test fixture --- Patch is 26.02 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/93816.diff 5

[clang] [clang-repl] Introduce common fixture class in unittests (NFC) (PR #93816)

2024-05-30 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 662b1305292d69507a09164c911cfc782e0e4e73 fd02a874601b8a72d05c3c1b219e28600851b56b --

[clang] [Clang] Fix overloading for constrained variadic functions (PR #93817)

2024-05-30 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/93817 Found by #93667 >From cee8bbd3c1e1a642622da0eaa26886ad9ce14c3c Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Thu, 30 May 2024 14:26:27 +0200 Subject: [PATCH] [Clang] Fix overloading for constrained variad

[clang] [clang-repl] Introduce common fixture class in unittests (NFC) (PR #93816)

2024-05-30 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/93816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix overloading for constrained variadic functions (PR #93817)

2024-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes Found by #93667 --- Full diff: https://github.com/llvm/llvm-project/pull/93817.diff 3 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+2) - (modified) clang/lib/Sema/SemaOverload.cpp (+1-1) - (mod

[clang] [llvm] [Frontend][OpenMP] Remove `reduction` from allowed clauses for `target` (PR #90754)

2024-05-30 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz closed https://github.com/llvm/llvm-project/pull/90754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] eb88e7c - [Frontend][OpenMP] Remove `reduction` from allowed clauses for `target` (#90754)

2024-05-30 Thread via cfe-commits
Author: Krzysztof Parzyszek Date: 2024-05-30T07:56:58-05:00 New Revision: eb88e7c1d95452b1a7a51564b7feac030ac883ad URL: https://github.com/llvm/llvm-project/commit/eb88e7c1d95452b1a7a51564b7feac030ac883ad DIFF: https://github.com/llvm/llvm-project/commit/eb88e7c1d95452b1a7a51564b7feac030ac883ad

[clang] 7b77301 - [clang] fix(93002): clang/lib/Sema/SemaOpenMP.cpp:7405: Possible & / && mixup ? (#93093)

2024-05-30 Thread via cfe-commits
Author: Oleksandr T Date: 2024-05-30T07:58:34-05:00 New Revision: 7b77301c22f5d4f25c5e96834bf7d6117c608228 URL: https://github.com/llvm/llvm-project/commit/7b77301c22f5d4f25c5e96834bf7d6117c608228 DIFF: https://github.com/llvm/llvm-project/commit/7b77301c22f5d4f25c5e96834bf7d6117c608228.diff L

[clang] [clang] fix(93002): clang/lib/Sema/SemaOpenMP.cpp:7405: Possible & / && mixup ? (PR #93093)

2024-05-30 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz closed https://github.com/llvm/llvm-project/pull/93093 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

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

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-30 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/93179 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix overloading for constrained variadic functions (PR #93817)

2024-05-30 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. 😂Thanks! https://github.com/llvm/llvm-project/pull/93817 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-05-30 Thread Fanbo Meng via cfe-commits
https://github.com/fanbo-meng updated https://github.com/llvm/llvm-project/pull/91384 >From 84e5ca4d8987d071d20b9dcba673b0c856762487 Mon Sep 17 00:00:00 2001 From: Fanbo Meng Date: Tue, 7 May 2024 13:36:38 -0400 Subject: [PATCH 1/9] [SystemZ][z/OS] Implement z/OS XPLINK ABI The XPLINK calling

[clang] [clang-repl] Test explicit emission of dtors in runtime interface builder (NFC) (PR #89734)

2024-05-30 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: Oh interesting, the Windows test actually fails at this assertion: ``` DC->getLexicalParent() == CurContext && "The next DeclContext should be lexically contained in the current one.", file C:\ws\src\clang\lib\Sema\SemaDecl.cpp, line 1332 ``` @vgvassilev Any ideas? https

[clang] [X86] Add support for MS inp functions. (PR #93804)

2024-05-30 Thread Phoebe Wang via cfe-commits
@@ -63,6 +63,82 @@ unsigned __int64 test__emulu(unsigned int a, unsigned int b) { // CHECK: [[RES:%[0-9]+]] = mul nuw i64 [[Y]], [[X]] // CHECK: ret i64 [[RES]] + +int test_inp(unsigned short port) { + return _inp(port); +} +// CHECK-I386-LABEL: define dso_local i32 @test_in

[clang] [X86] Add support for MS inp functions. (PR #93804)

2024-05-30 Thread Phoebe Wang via cfe-commits
@@ -63,6 +63,82 @@ unsigned __int64 test__emulu(unsigned int a, unsigned int b) { // CHECK: [[RES:%[0-9]+]] = mul nuw i64 [[Y]], [[X]] // CHECK: ret i64 [[RES]] + +int test_inp(unsigned short port) { + return _inp(port); +} +// CHECK-I386-LABEL: define dso_local i32 @test_in

[clang] [clang-repl] Introduce common fixture class in unittests (NFC) (PR #93816)

2024-05-30 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail updated https://github.com/llvm/llvm-project/pull/93816 From fd02a874601b8a72d05c3c1b219e28600851b56b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Thu, 30 May 2024 14:32:52 +0200 Subject: [PATCH 1/2] [clang-repl] Introduce common fixtu

[clang] [llvm] [RISCV] Add B extension (PR #76893)

2024-05-30 Thread Pengcheng Wang via cfe-commits
@@ -920,8 +920,8 @@ void RISCVISAInfo::updateImplication() { } static constexpr StringLiteral CombineIntoExts[] = { -{"zk"},{"zkn"}, {"zks"}, {"zvkn"}, {"zvknc"}, -{"zvkng"}, {"zvks"}, {"zvksc"}, {"zvksg"}, +{"b"}, {"zk"},{"zkn"}, {"zks"}, {"zvkn

[clang] [llvm] [AArch64] Support preserve_none calling convention (PR #91046)

2024-05-30 Thread via cfe-commits
antangelo wrote: Friendly ping https://github.com/llvm/llvm-project/pull/91046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Loop construct basic Sema and AST work (PR #93742)

2024-05-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/93742 >From 51792c63e8fee3ad662174d6a53bbca195cbc1b4 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Fri, 24 May 2024 12:12:29 -0700 Subject: [PATCH 1/2] [OpenACC] Loop construct basic Sema and AST work This patch

[clang] [OpenACC] Loop construct basic Sema and AST work (PR #93742)

2024-05-30 Thread Erich Keane via cfe-commits
@@ -0,0 +1,164 @@ + +// RUN: %clang_cc1 %s -fopenacc -ast-dump | FileCheck %s + +// Test this with PCH. +// RUN: %clang_cc1 %s -fopenacc -emit-pch -o %t %s +// RUN: %clang_cc1 %s -fopenacc -include-pch %t -ast-dump-all | FileCheck %s + +#ifndef PCH_HELPER +#define PCH_HELPER + +vo

[clang] Make warning pragma override -Werror=foo and DefaultError warnings (PR #93647)

2024-05-30 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for this! Please add a release note to clang/docs/ReleaseNotes.rst so users know about the behavioral change. Also, should we update some documentation as well? https://github.com/llvm/llvm-project/pull/93647

[clang] Make warning pragma override -Werror=foo and DefaultError warnings (PR #93647)

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

[clang] Make warning pragma override -Werror=foo and DefaultError warnings (PR #93647)

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

[clang] Make warning pragma override -Werror=foo and DefaultError warnings (PR #93647)

2024-05-30 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Adding @jyknight because of our discussions on related behavior regarding `DefaultError` diagnostics and suppression. https://github.com/llvm/llvm-project/pull/93647 ___ cfe-commits mailing list cfe-commits@l

[clang] [OpenACC] Loop construct basic Sema and AST work (PR #93742)

2024-05-30 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 bfabc958c7c0d7ddc15f23383d9da836e8c6093f 38de3cbcb63659c6a2d9caf05ce68b397b3a9250 --

[clang] [OpenACC] Loop construct basic Sema and AST work (PR #93742)

2024-05-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/93742 >From 51792c63e8fee3ad662174d6a53bbca195cbc1b4 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Fri, 24 May 2024 12:12:29 -0700 Subject: [PATCH 1/3] [OpenACC] Loop construct basic Sema and AST work This patch

[clang] [X86] Add support for MS inp functions. (PR #93804)

2024-05-30 Thread Malay Sanghi via cfe-commits
@@ -63,6 +63,82 @@ unsigned __int64 test__emulu(unsigned int a, unsigned int b) { // CHECK: [[RES:%[0-9]+]] = mul nuw i64 [[Y]], [[X]] // CHECK: ret i64 [[RES]] + +int test_inp(unsigned short port) { + return _inp(port); +} +// CHECK-I386-LABEL: define dso_local i32 @test_in

[clang] [X86] Add support for MS inp functions. (PR #93804)

2024-05-30 Thread Malay Sanghi via cfe-commits
@@ -63,6 +63,82 @@ unsigned __int64 test__emulu(unsigned int a, unsigned int b) { // CHECK: [[RES:%[0-9]+]] = mul nuw i64 [[Y]], [[X]] // CHECK: ret i64 [[RES]] + +int test_inp(unsigned short port) { + return _inp(port); +} +// CHECK-I386-LABEL: define dso_local i32 @test_in

[clang] [X86] Add support for MS inp functions. (PR #93804)

2024-05-30 Thread Phoebe Wang via cfe-commits
@@ -63,6 +63,82 @@ unsigned __int64 test__emulu(unsigned int a, unsigned int b) { // CHECK: [[RES:%[0-9]+]] = mul nuw i64 [[Y]], [[X]] // CHECK: ret i64 [[RES]] + +int test_inp(unsigned short port) { + return _inp(port); +} +// CHECK-I386-LABEL: define dso_local i32 @test_in

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

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

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

2024-05-30 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM aside from some coding style nits. Because AST printing is not part of the public interface for Clang, I don't think these changes need a release note. https://github.com/llvm/llvm-project/pull/93131 __

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

2024-05-30 Thread Aaron Ballman via cfe-commits
@@ -932,6 +953,11 @@ void DeclPrinter::VisitVarDecl(VarDecl *D) { : D->getASTContext().getUnqualifiedObjCPointerType(D->getType()); if (!Policy.SuppressSpecifiers) { +if (const char *lang = tryGetUnbracedLinkageLanguage(D)) { + // the "extern" specifier is impli

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

2024-05-30 Thread Aaron Ballman via cfe-commits
@@ -662,6 +678,11 @@ void DeclPrinter::VisitFunctionDecl(FunctionDecl *D) { CXXConversionDecl *ConversionDecl = dyn_cast(D); CXXDeductionGuideDecl *GuideDecl = dyn_cast(D); if (!Policy.SuppressSpecifiers) { +if (const char *lang = tryGetUnbracedLinkageLanguage(D)) { +

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

2024-05-30 Thread Aaron Ballman via cfe-commits
@@ -1064,6 +1090,8 @@ void DeclPrinter::VisitNamespaceAliasDecl(NamespaceAliasDecl *D) { void DeclPrinter::VisitEmptyDecl(EmptyDecl *D) { prettyPrintAttributes(D); + if (const char *lang = tryGetUnbracedLinkageLanguage(D)) +Out << "extern \"" << lang << "\";";

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

2024-05-30 Thread Egor Pasko via cfe-commits
https://github.com/pasko updated https://github.com/llvm/llvm-project/pull/92171 >From df3f8dfc47cd8d7b220ed712dc7c2cab1c563f50 Mon Sep 17 00:00:00 2001 From: Egor Pasko Date: Mon, 6 May 2024 19:48:59 +0200 Subject: [PATCH 01/15] wip: Move instrumentation passes This change is not ready for lan

[clang] [llvm] [AArch64] Remove SME/SVE uses of FMVDependencies (PR #93695)

2024-05-30 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm edited https://github.com/llvm/llvm-project/pull/93695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 57da040 - [clang-tidy] Check number of arguments to size/length in readability-container-size-empty (#93724)

2024-05-30 Thread via cfe-commits
Author: Piotr Zegar Date: 2024-05-30T15:56:04+02:00 New Revision: 57da0407c44b187feed40b02cdfd24d71df755cc URL: https://github.com/llvm/llvm-project/commit/57da0407c44b187feed40b02cdfd24d71df755cc DIFF: https://github.com/llvm/llvm-project/commit/57da0407c44b187feed40b02cdfd24d71df755cc.diff L

[clang-tools-extra] [clang-tidy] Check number of arguments to size/length in readability-container-size-empty (PR #93724)

2024-05-30 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/93724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ConstantFold] Remove non-trivial gep-of-gep fold (PR #93823)

2024-05-30 Thread Nikita Popov via cfe-commits
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/93823 This fold is subtly incorrect, because DL-unaware constant folding does not know the correct index type to use, and just performs the addition in the type that happens to already be there. This is incorrect, since

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-30 Thread Chris Apple via cfe-commits
cjappl wrote: Ping @yln @vitalybuka @Sirraide @AaronBallman @zygoloid @compnerd @petrhosek @isanbard @MaskRay https://github.com/llvm/llvm-project/pull/92460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [llvm] [ConstantFold] Remove non-trivial gep-of-gep fold (PR #93823)

2024-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms @llvm/pr-subscribers-llvm-ir Author: Nikita Popov (nikic) Changes This fold is subtly incorrect, because DL-unaware constant folding does not know the correct index type to use, and just performs the addition in the type that happens to

[clang] [llvm] [AArch64] Remove SME/SVE uses of FMVDependencies (PR #93695)

2024-05-30 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm edited https://github.com/llvm/llvm-project/pull/93695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Remove SME/SVE uses of FMVDependencies (PR #93695)

2024-05-30 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm edited https://github.com/llvm/llvm-project/pull/93695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-05-30 Thread Egor Pasko via cfe-commits
@@ -1030,6 +1036,12 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level, Phase != ThinOrFullLTOPhase::ThinLTOPostLink) MPM.addPass(SampleProfileProbePass(TM)); + // Instrument function entry and exit before all inlining. + if (!isLTOPostLink(

[clang] [llvm] [ConstantFold] Remove non-trivial gep-of-gep fold (PR #93823)

2024-05-30 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw commented: > because the DL-aware constant folding will take care of this anyway. Can you point out where we do this fold? > I've only kept the straightforward zero-index case, where we just concatenate > two GEPs. Is there a test for this case? https://github.com

[clang-tools-extra] [clang-tidy] Option to ignore anonymous namespaces in avoid-non-const-global-variables (PR #93827)

2024-05-30 Thread Pascal Jungblut via cfe-commits
https://github.com/pascalj created https://github.com/llvm/llvm-project/pull/93827 Add an option to ignore warnings for cppcoreguidelines avoid-non-const-global-variables. Understandably, the core guidelines discourage non const global variables, even at the TU level (see https://github.com/i

[clang-tools-extra] [clang-tidy] Option to ignore anonymous namespaces in avoid-non-const-global-variables (PR #93827)

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

[clang-tools-extra] [clang-tidy] Option to ignore anonymous namespaces in avoid-non-const-global-variables (PR #93827)

2024-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Pascal Jungblut (pascalj) Changes Add an option to ignore warnings for cppcoreguidelines avoid-non-const-global-variables. Understandably, the core guidelines discourage non const global variables, even at the TU level (see https://

[clang] [X86] Add support for MS inp functions. (PR #93804)

2024-05-30 Thread Malay Sanghi via cfe-commits
https://github.com/MalaySanghi updated https://github.com/llvm/llvm-project/pull/93804 >From de79bf75b68825440b939f030e1d659d26f3d2ea Mon Sep 17 00:00:00 2001 From: Malay Sanghi Date: Thu, 30 May 2024 01:39:41 -0700 Subject: [PATCH 1/2] Add support for MS inp functions. support _inp, _inpw, _i

[clang] [X86] Add support for MS inp functions. (PR #93804)

2024-05-30 Thread Malay Sanghi via cfe-commits
@@ -63,6 +63,82 @@ unsigned __int64 test__emulu(unsigned int a, unsigned int b) { // CHECK: [[RES:%[0-9]+]] = mul nuw i64 [[Y]], [[X]] // CHECK: ret i64 [[RES]] + +int test_inp(unsigned short port) { + return _inp(port); +} +// CHECK-I386-LABEL: define dso_local i32 @test_in

[clang-tools-extra] [clang-tidy] Option to ignore anonymous namespaces in avoid-non-const-global-variables (PR #93827)

2024-05-30 Thread via cfe-commits
@@ -41,3 +41,25 @@ The variables ``a``, ``c``, ``c_ptr1``, ``c_const_ptr`` and ``c_reference`` will all generate warnings since they are either a non-const globally accessible variable, a pointer or a reference providing global access to non-const data or both. + +Options +--

[clang] a871470 - [clang-repl] Introduce common fixture class in unittests (NFC) (#93816)

2024-05-30 Thread via cfe-commits
Author: Stefan Gränitz Date: 2024-05-30T16:15:12+02:00 New Revision: a871470a0d0c828718409c7a6dfb067a3231d013 URL: https://github.com/llvm/llvm-project/commit/a871470a0d0c828718409c7a6dfb067a3231d013 DIFF: https://github.com/llvm/llvm-project/commit/a871470a0d0c828718409c7a6dfb067a3231d013.diff

[clang] [clang-repl] Introduce common fixture class in unittests (NFC) (PR #93816)

2024-05-30 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail closed https://github.com/llvm/llvm-project/pull/93816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ConstantFold] Remove non-trivial gep-of-gep fold (PR #93823)

2024-05-30 Thread Nikita Popov via cfe-commits
nikic wrote: > > because the DL-aware constant folding will take care of this anyway. > > Can you point out where we do this fold? https://github.com/llvm/llvm-project/blob/1f46729a18ef13c3ba4184ead1da4ab3037cb7ae/llvm/lib/Analysis/ConstantFolding.cpp#L865 > > I've only kept the straightforwar

[clang] [X86] Add support for MS inp functions. (PR #93804)

2024-05-30 Thread Phoebe Wang via cfe-commits
@@ -329,6 +329,28 @@ static __inline__ void __DEFAULT_FN_ATTRS __stosq(unsigned __int64 *__dst, static __inline__ void __DEFAULT_FN_ATTRS __halt(void) { __asm__ volatile("hlt"); } + +static inline int _inp(unsigned short port) { + int ret; + __asm__ volatile("inb %b1, %b0"

[clang] [X86] Add support for MS inp functions. (PR #93804)

2024-05-30 Thread Phoebe Wang via cfe-commits
@@ -329,6 +329,28 @@ static __inline__ void __DEFAULT_FN_ATTRS __stosq(unsigned __int64 *__dst, static __inline__ void __DEFAULT_FN_ATTRS __halt(void) { __asm__ volatile("hlt"); } + +static inline int _inp(unsigned short port) { + int ret; + __asm__ volatile("inb %b1, %b0"

[clang-tools-extra] [clang-tidy] Option to ignore anonymous namespaces in avoid-non-const-global-variables (PR #93827)

2024-05-30 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. - storeOptions is missing - release notes need to be updated about added new option - tests need some love (reduce amount of changes) - what about "static" non const global variables I'm fine for having an options that control

[clang-tools-extra] [clang-tidy] Option to ignore anonymous namespaces in avoid-non-const-global-variables (PR #93827)

2024-05-30 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/93827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Option to ignore anonymous namespaces in avoid-non-const-global-variables (PR #93827)

2024-05-30 Thread Piotr Zegar via cfe-commits
@@ -16,9 +15,12 @@ using namespace clang::ast_matchers; namespace clang::tidy::cppcoreguidelines { void AvoidNonConstGlobalVariablesCheck::registerMatchers(MatchFinder *Finder) { + auto NamespaceMatcher = Options.get("AllowAnonymousNamespace", false) PiotrZSL

[clang-tools-extra] [clang-tidy] Option to ignore anonymous namespaces in avoid-non-const-global-variables (PR #93827)

2024-05-30 Thread Piotr Zegar via cfe-commits
@@ -1,29 +1,39 @@ -// RUN: %check_clang_tidy %s cppcoreguidelines-avoid-non-const-global-variables %t +// RUN: %check_clang_tidy %s -check-suffix=DEFAULT cppcoreguidelines-avoid-non-const-global-variables %t +// RUN: %check_clang_tidy %s -check-suffix=NAMESPACE cppcoreguideline

[clang-tools-extra] [clang-tidy] Option to ignore anonymous namespaces in avoid-non-const-global-variables (PR #93827)

2024-05-30 Thread Piotr Zegar via cfe-commits
@@ -41,3 +41,25 @@ The variables ``a``, ``c``, ``c_ptr1``, ``c_const_ptr`` and ``c_reference`` will all generate warnings since they are either a non-const globally accessible variable, a pointer or a reference providing global access to non-const data or both. + +Options +--

[clang-tools-extra] [clang-tidy] Option to ignore anonymous namespaces in avoid-non-const-global-variables (PR #93827)

2024-05-30 Thread Piotr Zegar via cfe-commits
@@ -41,3 +41,25 @@ The variables ``a``, ``c``, ``c_ptr1``, ``c_const_ptr`` and ``c_reference`` will all generate warnings since they are either a non-const globally accessible variable, a pointer or a reference providing global access to non-const data or both. + +Options +--

[clang] [flang] [mlir] Avoid object libraries in the VS IDE (PR #93519)

2024-05-30 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: I applied the patch locally and tried it out, and I think this is an improvement for folks generating VS solutions. https://github.com/llvm/llvm-project/pull/93519 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [X86] Add support for MS inp functions. (PR #93804)

2024-05-30 Thread Malay Sanghi via cfe-commits
https://github.com/MalaySanghi updated https://github.com/llvm/llvm-project/pull/93804 >From de79bf75b68825440b939f030e1d659d26f3d2ea Mon Sep 17 00:00:00 2001 From: Malay Sanghi Date: Thu, 30 May 2024 01:39:41 -0700 Subject: [PATCH 1/3] Add support for MS inp functions. support _inp, _inpw, _i

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

2024-05-30 Thread Egor Pasko via cfe-commits
https://github.com/pasko updated https://github.com/llvm/llvm-project/pull/92171 >From df3f8dfc47cd8d7b220ed712dc7c2cab1c563f50 Mon Sep 17 00:00:00 2001 From: Egor Pasko Date: Mon, 6 May 2024 19:48:59 +0200 Subject: [PATCH 01/16] wip: Move instrumentation passes This change is not ready for lan

[clang] [X86] Add support for MS inp functions. (PR #93804)

2024-05-30 Thread Malay Sanghi via cfe-commits
@@ -329,6 +329,28 @@ static __inline__ void __DEFAULT_FN_ATTRS __stosq(unsigned __int64 *__dst, static __inline__ void __DEFAULT_FN_ATTRS __halt(void) { __asm__ volatile("hlt"); } + +static inline int _inp(unsigned short port) { + int ret; + __asm__ volatile("inb %b1, %b0"

[clang] [llvm] [AArch64] Remove SME/SVE uses of FMVDependencies (PR #93695)

2024-05-30 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm ready_for_review https://github.com/llvm/llvm-project/pull/93695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Remove SME/SVE uses of FMVDependencies (PR #93695)

2024-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: Tomas Matheson (tmatheson-arm) Changes When FMV was added to AArch64, it added a dependency expansion step after the -cc1 command line was parsed but before Sema, in `AArch64TargetInfo::initFeatureMap`. One effect of this is tha

[clang] [llvm] [RISCV] Remove experimental from Zabha (PR #93831)

2024-05-30 Thread via cfe-commits
https://github.com/AlexGhiti created https://github.com/llvm/llvm-project/pull/93831 The Zabha extension was ratified in April 2024. >From 7c306e0fa4f1864389a934fa9fbcd18cf24ddd0c Mon Sep 17 00:00:00 2001 From: Alexandre Ghiti Date: Thu, 30 May 2024 14:39:20 + Subject: [PATCH] [RISCV] Remo

[clang] [llvm] [RISCV] Remove experimental from Zabha (PR #93831)

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

[clang] [llvm] [RISCV] Remove experimental from Zabha (PR #93831)

2024-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc Author: None (AlexGhiti) Changes The Zabha extension was ratified in April 2024. --- Full diff: https://github.com/llvm/llvm-project/pull/93831.diff 11 Files Affected: - (modified) clang/test/Preprocessor/riscv-target-features.c (+9-9) - (modifie

[clang] [llvm] [RISCV] Remove experimental from Zabha (PR #93831)

2024-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (AlexGhiti) Changes The Zabha extension was ratified in April 2024. --- Full diff: https://github.com/llvm/llvm-project/pull/93831.diff 11 Files Affected: - (modified) clang/test/Preprocessor/riscv-target-features.c (+9-9) - (modi

[clang] [llvm] [RISCV] Remove experimental from Zabha (PR #93831)

2024-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: None (AlexGhiti) Changes The Zabha extension was ratified in April 2024. --- Full diff: https://github.com/llvm/llvm-project/pull/93831.diff 11 Files Affected: - (modified) clang/test/Preprocessor/riscv-target-features.c (+9-9)

[clang] [X86] Add support for MS inp functions. (PR #93804)

2024-05-30 Thread Phoebe Wang via cfe-commits
@@ -63,6 +63,47 @@ unsigned __int64 test__emulu(unsigned int a, unsigned int b) { // CHECK: [[RES:%[0-9]+]] = mul nuw i64 [[Y]], [[X]] // CHECK: ret i64 [[RES]] + +int test_inp(unsigned short port) { + return _inp(port); +} +// CHECK-LABEL: i32 @test_inp(i16 noundef +// CHEC

[clang] [clang-repl] Introduce common fixture class in unittests (NFC) (PR #93816)

2024-05-30 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: Looking into https://lab.llvm.org/buildbot/#/builders/86/builds/81169 right now. Pushing a fix soon. https://github.com/llvm/llvm-project/pull/93816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [OpenACC] Loop construct basic Sema and AST work (PR #93742)

2024-05-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/93742 >From 51792c63e8fee3ad662174d6a53bbca195cbc1b4 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Fri, 24 May 2024 12:12:29 -0700 Subject: [PATCH 1/3] [OpenACC] Loop construct basic Sema and AST work This patch

[clang] [OpenACC] Loop construct basic Sema and AST work (PR #93742)

2024-05-30 Thread Erich Keane via cfe-commits
erichkeane wrote: Did a merge which will hopefully fix the build failures this was seeing. https://github.com/llvm/llvm-project/pull/93742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] 647d272 - [clang-repl] Fix SetUp in CodeCompletionTest fixture (#93816)

2024-05-30 Thread Stefan Gränitz via cfe-commits
Author: Stefan Gränitz Date: 2024-05-30T17:03:21+02:00 New Revision: 647d2728c4dbc387521ce3984ebfda78ff2b031f URL: https://github.com/llvm/llvm-project/commit/647d2728c4dbc387521ce3984ebfda78ff2b031f DIFF: https://github.com/llvm/llvm-project/commit/647d2728c4dbc387521ce3984ebfda78ff2b031f.diff

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

2024-05-30 Thread Jean-Pierre Coetzee via cfe-commits
jpc0 wrote: Just a note, I am building on Windows with MSVC cl.exe and ninja and get this: ``` C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include\memory(3138): error C2027: use of undefined type 'clang::clangd::ProjectModules' ``` While building ConfigCom

[clang] 1ee02f9 - [Clang] Fix overloading for constrained variadic functions (#93817)

2024-05-30 Thread via cfe-commits
Author: cor3ntin Date: 2024-05-30T17:22:07+02:00 New Revision: 1ee02f9b6053617b741de542ee127c17c5a548be URL: https://github.com/llvm/llvm-project/commit/1ee02f9b6053617b741de542ee127c17c5a548be DIFF: https://github.com/llvm/llvm-project/commit/1ee02f9b6053617b741de542ee127c17c5a548be.diff LOG:

[clang] [Clang] Fix overloading for constrained variadic functions (PR #93817)

2024-05-30 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/93817 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   >