[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-23 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/73099 >From 1d70b7726e7d1f11622a6d5c8246b0737e024c8d Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Tue, 19 Sep 2023 08:37:18 -0700 Subject: [PATCH 1/2] [C23] Implement N3018: The constexpr specifier f

[clang] [ClangRepl] Type Directed Code Completion (PR #67349)

2023-11-23 Thread Fred Fu via cfe-commits
https://github.com/capfredf updated https://github.com/llvm/llvm-project/pull/67349 >From 80962a4daaf20069c56d86f196a06abc91f3474c Mon Sep 17 00:00:00 2001 From: Fred Fu Date: Tue, 29 Aug 2023 11:56:59 -0400 Subject: [PATCH] [ClangRepl] Add type directed code completion to clang-repl use CodeC

[clang] [clang-format] Option to ignore macro definitions (PR #70338)

2023-11-23 Thread via cfe-commits
https://github.com/tomekpaszek updated https://github.com/llvm/llvm-project/pull/70338 >From b5ba0b3fde2c6662e19dfdf96a787621ec767460 Mon Sep 17 00:00:00 2001 From: Tomek Paszek Date: Sat, 11 Nov 2023 19:38:00 +0100 Subject: [PATCH 01/12] Added an option to ignore macro definitions. --- clang

[clang] [clang][Interp] Implement IntegralAP::{div, rem} (PR #72614)

2023-11-23 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/72614 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Diagnose reads from non-const global variables (PR #71919)

2023-11-23 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/71919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Support `fprintf` in the SecuritySyntaxChecker (PR #73247)

2023-11-23 Thread Ben Shi via cfe-commits
https://github.com/benshi001 created https://github.com/llvm/llvm-project/pull/73247 None >From 150d3374346ef2f09e4c656614c283771083 Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Thu, 23 Nov 2023 18:22:14 +0800 Subject: [PATCH] [clang][analyzer] Support `fprintf` in the SecuritySyntaxCheck

[clang] [clang][analyzer] Support `fprintf` in the SecuritySyntaxChecker (PR #73247)

2023-11-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ben Shi (benshi001) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/73247.diff 2 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp (+7-6) - (modified) clang/test/Analysis/secu

[clang] [clang][analyzer] Support `fprintf` in the SecuritySyntaxChecker (PR #73247)

2023-11-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ben Shi (benshi001) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/73247.diff 2 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp (+7-6) - (modified) clang/

[clang] [clang][analyzer] Support `fprintf` in the SecuritySyntaxChecker (PR #73247)

2023-11-23 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 0bc7cd4d51226344a54da5929d87184730e73e83 150d3374346ef2f09e4c656614c283771083 --

[clang] [clang][analyzer] Support `fprintf` in the SecuritySyntaxChecker (PR #73247)

2023-11-23 Thread Ben Shi via cfe-commits
https://github.com/benshi001 updated https://github.com/llvm/llvm-project/pull/73247 >From 34603a920d5b3ce462c85980c4abff912c1bb22a Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Thu, 23 Nov 2023 18:22:14 +0800 Subject: [PATCH] [clang][analyzer] Support `fprintf` in the SecuritySyntaxChecker --

[clang] 53578e5 - [clang][analyzer] Support `fgetc` in StreamChecker (#72627)

2023-11-23 Thread via cfe-commits
Author: Ben Shi Date: 2023-11-23T23:11:19+08:00 New Revision: 53578e5c854d681d4b76e311e2bbc7cbd92ad4ce URL: https://github.com/llvm/llvm-project/commit/53578e5c854d681d4b76e311e2bbc7cbd92ad4ce DIFF: https://github.com/llvm/llvm-project/commit/53578e5c854d681d4b76e311e2bbc7cbd92ad4ce.diff LOG:

[clang] [clang][analyzer] Support `fgetc` in StreamChecker (PR #72627)

2023-11-23 Thread Ben Shi via cfe-commits
https://github.com/benshi001 closed https://github.com/llvm/llvm-project/pull/72627 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d8c4080 - [clang][CGExprConstant] Remove no-op ptr-to-ptr bitcast (NFC)

2023-11-23 Thread Youngsuk Kim via cfe-commits
Author: Youngsuk Kim Date: 2023-11-23T09:17:01-06:00 New Revision: d8c40800edc5995c5ff765c4e2940ea001589fa0 URL: https://github.com/llvm/llvm-project/commit/d8c40800edc5995c5ff765c4e2940ea001589fa0 DIFF: https://github.com/llvm/llvm-project/commit/d8c40800edc5995c5ff765c4e2940ea001589fa0.diff

[clang] [Clang][SME2] Add outer product and accumulate/subtract builtins (PR #71176)

2023-11-23 Thread Matthew Devereau via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu \ +// RUN:-target-feature +sve2 -target-feature +sme2 -target-feature +sve -fsyntax-only -verify %s + +// REQUIRES: aarch64-registered-target + +#include + +void test_outer_product(svbool_t pred, svint16_t s

[clang] [Clang][SME2] Add outer product and accumulate/subtract builtins (PR #71176)

2023-11-23 Thread Matthew Devereau via cfe-commits
@@ -298,3 +298,19 @@ multiclass ZAAddSub { defm SVADD : ZAAddSub<"add">; defm SVSUB : ZAAddSub<"sub">; + +// +// Outer produce and accumulate/subtract +// + +let TargetGuard = "sme2" in { + def SVSMOPA : Inst<"svmopa_za32[_{d}]_m", "viPPdd", "s", MergeNone, "aarch64_sme_smo

[clang] [Clang][SME2] Add outer product and accumulate/subtract builtins (PR #71176)

2023-11-23 Thread Matthew Devereau via cfe-commits
@@ -0,0 +1,170 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py + +// REQUIRES: aarch64-registered-target + +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -emit-ll

[clang] [clang][analyzer] Move `security.cert.env.InvalidPtr` out of `alpha` (PR #71912)

2023-11-23 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/71912 From 248c94c3b8dd29fa9d98419e53f42454a2225544 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Fri, 10 Nov 2023 10:08:58 +0100 Subject: [PATCH 1/3] [analyzer] Move security.cert.env.Inva

[clang-tools-extra] [clang-apply-replacements] Apply format only if --format is specified (PR #70801)

2023-11-23 Thread Malcolm Parsons via cfe-commits
pepsiman wrote: `createReplacementsForHeaders()` is applying a cleanup without checking the `Cleanup` flag. But clang-apply-replacements always sets `Cleanup` to `true` anyway. The change looks good to me, but it might be working around a bug elsewhere. https://github.com/llvm/llvm-project/pull

[flang] [clang] [flang] Add MSC_VER and target arch defines when targeting the MSVC ABI (PR #73250)

2023-11-23 Thread David Truby via cfe-commits
https://github.com/DavidTruby created https://github.com/llvm/llvm-project/pull/73250 None >From 656463c6298b981cbd43d1d5042438eab700143b Mon Sep 17 00:00:00 2001 From: David Truby Date: Thu, 23 Nov 2023 15:32:57 + Subject: [PATCH] [flang] Add MSC_VER and target arch defines when targeting

[flang] [clang] [flang] Add MSC_VER and target arch defines when targeting the MSVC ABI (PR #73250)

2023-11-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver Author: David Truby (DavidTruby) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/73250.diff 2 Files Affected: - (modified) clang/lib/Driver/ToolChains/Flang.cpp (+24) - (added) flang/test/Driver/msvc-defines.f90 (+10)

[flang] [clang] [flang] Add MSC_VER and target arch defines when targeting the MSVC ABI (PR #73250)

2023-11-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: David Truby (DavidTruby) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/73250.diff 2 Files Affected: - (modified) clang/lib/Driver/ToolChains/Flang.cpp (+24) - (added) flang/test/Driver/msvc-defines.f90 (+10)

[flang] [clang] [flang] Add MSC_VER and target arch defines when targeting the MSVC ABI (PR #73250)

2023-11-23 Thread David Truby via cfe-commits
https://github.com/DavidTruby edited https://github.com/llvm/llvm-project/pull/73250 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang] Add MSC_VER and target arch defines when targeting the MSVC ABI (PR #73250)

2023-11-23 Thread David Truby via cfe-commits
DavidTruby wrote: @pbo-linaro @bradking I think this fixes the linked issue, could someone confirm that for me? Thanks! https://github.com/llvm/llvm-project/pull/73250 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [analyzer] Switch to PostStmt callbacks in ArrayBoundV2 (PR #72107)

2023-11-23 Thread Balázs Kéri via cfe-commits
@@ -64,6 +100,28 @@ double arrayInStructPtr(struct vec *pv) { // expected-note@-2 {{Access of the field 'elems' at index 64, while it holds only 64 'double' elements}} } +struct item { + int a, b; +} itemArray[20] = {0}; + +int structOfArrays(void) { balaz

[flang] [clang] [Flang][Clang] Add support for frame pointers in Flang Driver (PR #72146)

2023-11-23 Thread Tom Eccles via cfe-commits
@@ -6752,10 +6754,7 @@ def new_struct_path_tbaa : Flag<["-"], "new-struct-path-tbaa">, def mdebug_pass : Separate<["-"], "mdebug-pass">, HelpText<"Enable additional debug output">, MarshallingInfoString>; -def mframe_pointer_EQ : Joined<["-"], "mframe-pointer=">, - HelpTe

[flang] [clang] [Flang][Clang] Add support for frame pointers in Flang Driver (PR #72146)

2023-11-23 Thread Tom Eccles via cfe-commits
https://github.com/tblah requested changes to this pull request. While I guess it isn't wrong, it feels weird do declare all of the storage on the front end driver side, but never set them (the member of the CodeGenOpttions class, the changes in Frontend/CodeGenOptions.h, adding it to MLIRToLL

[flang] [clang] [Flang][Clang] Add support for frame pointers in Flang Driver (PR #72146)

2023-11-23 Thread Tom Eccles via cfe-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/72146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Flang][Clang] Add support for frame pointers in Flang Driver (PR #72146)

2023-11-23 Thread Tom Eccles via cfe-commits
@@ -1114,7 +1114,8 @@ bool CompilerInvocation::createFromArgs( res.loweringOpts.setLowerToHighLevelFIR(false); } - if (args.hasArg(clang::driver::options::OPT_flang_experimental_polymorphism)) { + if (args.hasArg( tblah wrote: This looks unrelated to

[clang] [flang] [Flang][Clang] Add support for frame pointers in Flang Driver (PR #72146)

2023-11-23 Thread Tom Eccles via cfe-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/72146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-23 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm updated https://github.com/llvm/llvm-project/pull/73124 >From ba38aec7ac04c63fd5167908fe7f91d6ac7bceed Mon Sep 17 00:00:00 2001 From: Michael Klemm Date: Wed, 22 Nov 2023 14:22:20 +0100 Subject: [PATCH 1/5] Let the linker fail on multiple definitions of main() --- c

[clang] [flang] [flang] Enable alias tags pass by default (PR #73111)

2023-11-23 Thread Andrzej Warzyński via cfe-commits
@@ -242,10 +242,24 @@ static void parseCodeGenArgs(Fortran::frontend::CodeGenOptions &opts, clang::driver::options::OPT_fno_loop_versioning, false)) opts.LoopVersioning = 1; - opts.AliasAnalysis = - args.hasFlag(clang::driver::options::OPT_falias_

[clang] [flang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-23 Thread Michael Klemm via cfe-commits
@@ -122,6 +122,7 @@ # the build directory holding that tool. tools = [ ToolSubst("%flang", command=FindTool("flang-new"), unresolved="fatal"), +ToolSubst("%clang", command=FindTool("clang"), unresolved="fatal"), mjklemm wrote: @banach-space I had to ad

[clang] [flang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-23 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: As this is a "test input" rather than a "test file", could you move it to "flang/test/Driver/Inputs"? https://github.com/llvm/llvm-project/pull/73124 ___ cfe-commits mailing list cfe-commits@lists

[clang] [flang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-23 Thread Michael Klemm via cfe-commits
mjklemm wrote: > Would it be possible to test this? I have added a simple test. It checks that the linker indeed fails, but does not check the actual linker error message. PLease let me know if that's desired. I could then provide the error messages for LD and LLD. For other environments,

[clang] [flang] [flang] Add MSC_VER and target arch defines when targeting the MSVC ABI (PR #73250)

2023-11-23 Thread Pierrick Bouvier via cfe-commits
pbo-linaro wrote: I'll let @bradking check this, as he implemented this. https://github.com/llvm/llvm-project/pull/73250 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-23 Thread Andrzej Warzyński via cfe-commits
@@ -0,0 +1,13 @@ +! RUN: %clang -x c -o %t.c-part -c %s.c-part banach-space wrote: Could you try `flang-new -x c` instead? It would be great if we could avoid using the `clang` binary in Flang (to avoid increasing the dependency). https://github.com/llvm/llvm-p

[clang] [AArch64][SME2] Enable CLAMP multi-vector builtins for SME2 (PR #72272)

2023-11-23 Thread Matthew Devereau via cfe-commits
MDevereau wrote: Hi Dinar, I can see you've added FCLAMP to #72487. Given these builtins are all defined in the same section in the acle [here](https://github.com/ARM-software/acle/pull/217/files#diff-516526d4a18101dc85300bc2033d0f86dc46c505b7510a7694baabea851aedfaR11371-R11394) I think it wou

[clang] [clang] Avoid memcopy for small structure with padding under -ftrivial-auto-var-init (PR #71677)

2023-11-23 Thread via cfe-commits
serge-sans-paille wrote: @omjavaid thanks for the revert. Life was in the way today and I couldn't handle that properly. The patch was trivial, I'm going to recommit soon. https://github.com/llvm/llvm-project/pull/71677 ___ cfe-commits mailing list cf

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-23 Thread Michael Klemm via cfe-commits
@@ -0,0 +1,13 @@ +! RUN: %clang -x c -o %t.c-part -c %s.c-part mjklemm wrote: That does not seem to work and gives me this error when running the test. `error: unknown integrated tool '-cc1'. Valid tools include '-fc1'.` I do not necessarily need `clang` as the

[flang] [clang] [flang] Enable alias tags pass by default (PR #73111)

2023-11-23 Thread Tom Eccles via cfe-commits
@@ -242,10 +242,24 @@ static void parseCodeGenArgs(Fortran::frontend::CodeGenOptions &opts, clang::driver::options::OPT_fno_loop_versioning, false)) opts.LoopVersioning = 1; - opts.AliasAnalysis = - args.hasFlag(clang::driver::options::OPT_falias_

[clang] 10e4835 - [clang][CodeGen] Remove ptr-to-ptr bitcasts (NFC) (#73020)

2023-11-23 Thread via cfe-commits
Author: Youngsuk Kim Date: 2023-11-23T11:34:59-05:00 New Revision: 10e483521a067eb5be9c844a41248e9d12e46dde URL: https://github.com/llvm/llvm-project/commit/10e483521a067eb5be9c844a41248e9d12e46dde DIFF: https://github.com/llvm/llvm-project/commit/10e483521a067eb5be9c844a41248e9d12e46dde.diff

[clang] [clang][CodeGen] Remove ptr-to-ptr bitcasts (NFC) (PR #73020)

2023-11-23 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 closed https://github.com/llvm/llvm-project/pull/73020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [clang] [llvm] [mlir] [compiler-rt] [flang] [libc] [AMDGPU] Define new targets gfx1200 and gfx1201 (PR #73133)

2023-11-23 Thread Piotr Sobczak via cfe-commits
https://github.com/piotrAMD approved this pull request. LGTM. The failures in buildkite/github-pull-requests look unrelated. https://github.com/llvm/llvm-project/pull/73133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] fe5c360 - [clang] Avoid memcopy for small structure with padding under -ftrivial-auto-var-init (#71677)

2023-11-23 Thread via cfe-commits
Author: serge-sans-paille Date: 2023-11-23T17:37:03+01:00 New Revision: fe5c360a9aae61db37886c0c795c409b5129905f URL: https://github.com/llvm/llvm-project/commit/fe5c360a9aae61db37886c0c795c409b5129905f DIFF: https://github.com/llvm/llvm-project/commit/fe5c360a9aae61db37886c0c795c409b5129905f.d

[clang] [APINotes] Upstream Driver and Frontend options that enable API Notes (PR #73120)

2023-11-23 Thread Saleem Abdulrasool via cfe-commits
@@ -6720,6 +6720,17 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, Args.addOptOutFlag(CmdArgs, options::OPT_fassume_sane_operator_new, options::OPT_fno_assume_sane_operator_new); + if (Args.hasFlag(options::OPT_fapinotes, options::OPT

[clang] cf1e0c0 - [AMDGPU] Define new targets gfx1200 and gfx1201 (#73133)

2023-11-23 Thread via cfe-commits
Author: Jay Foad Date: 2023-11-23T16:44:05Z New Revision: cf1e0c0b07c09af6b72ee912a5e0529c8ff66cad URL: https://github.com/llvm/llvm-project/commit/cf1e0c0b07c09af6b72ee912a5e0529c8ff66cad DIFF: https://github.com/llvm/llvm-project/commit/cf1e0c0b07c09af6b72ee912a5e0529c8ff66cad.diff LOG: [AMD

[mlir] [llvm] [clang] [libcxx] [libc] [compiler-rt] [flang] [AMDGPU] Define new targets gfx1200 and gfx1201 (PR #73133)

2023-11-23 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed https://github.com/llvm/llvm-project/pull/73133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-23 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm updated https://github.com/llvm/llvm-project/pull/73124 >From ba38aec7ac04c63fd5167908fe7f91d6ac7bceed Mon Sep 17 00:00:00 2001 From: Michael Klemm Date: Wed, 22 Nov 2023 14:22:20 +0100 Subject: [PATCH 1/6] Let the linker fail on multiple definitions of main() --- c

[clang] [flang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-23 Thread Michael Klemm via cfe-commits
mjklemm wrote: Done. https://github.com/llvm/llvm-project/pull/73124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [APINotes] Upstream Driver and Frontend options that enable API Notes (PR #73120)

2023-11-23 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan updated https://github.com/llvm/llvm-project/pull/73120 >From 5fcceda3e5904b82ccac23e2137d95e0e357b475 Mon Sep 17 00:00:00 2001 From: Egor Zhdan Date: Wed, 22 Nov 2023 13:54:04 + Subject: [PATCH] [APINotes] Upstream Driver and Frontend options that enable API N

[clang] [APINotes] Upstream Driver and Frontend options that enable API Notes (PR #73120)

2023-11-23 Thread Egor Zhdan via cfe-commits
@@ -6720,6 +6720,17 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, Args.addOptOutFlag(CmdArgs, options::OPT_fassume_sane_operator_new, options::OPT_fno_assume_sane_operator_new); + if (Args.hasFlag(options::OPT_fapinotes, options::OPT

[clang] [APINotes] Upstream Driver and Frontend options that enable API Notes (PR #73120)

2023-11-23 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/73120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-23 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 e5cc3da6a9077548f613eee3aacc5e7b017c81f3 3b0090997023b1b6392bc23d386ace7c7cb796ce --

[clang] [clang] Avoid memcopy for small structure with padding under -ftrivial-auto-var-init (PR #71677)

2023-11-23 Thread Youngsuk Kim via cfe-commits
JOE1994 wrote: FYI, the following `clang` tests seem to fail after revision [fe5c360](https://github.com/llvm/llvm-project/commit/fe5c360a9aae61db37886c0c795c409b5129905f) ``` Failed Tests (2): Clang :: CodeGen/aapcs-align.cpp Clang :: CodeGen/aapcs64-align.cpp ``` https://github.com/llvm/l

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-23 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,15 @@ +! UNSUPPORTED: system-windows + +! RUN: %clang -o %t.c-object -c %S/Inputs/main_dupes.c kiranchandramohan wrote: You can use %cc for the system-compiler and REQUIRE it to be present for this test. Reference: https://github.com/llvm/llvm-proje

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-23 Thread Kiran Chandramohan via cfe-commits
@@ -122,6 +122,7 @@ # the build directory holding that tool. tools = [ ToolSubst("%flang", command=FindTool("flang-new"), unresolved="fatal"), +ToolSubst("%clang", command=FindTool("clang"), unresolved="fatal"), kiranchandramohan wrote: Remove this if

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-23 Thread Michael Klemm via cfe-commits
@@ -0,0 +1,15 @@ +! UNSUPPORTED: system-windows + +! RUN: %clang -o %t.c-object -c %S/Inputs/main_dupes.c mjklemm wrote: When I do this, the test goes to "unsupported" for me, as it seems that %cc is not set as a substitution in lit.cfg.py. https://github.com/l

[clang] 002d471 - [ClangRepl] Type Directed Code Completion (#67349)

2023-11-23 Thread via cfe-commits
Author: Fred Fu Date: 2023-11-23T19:56:35+02:00 New Revision: 002d471a4a3cd8b429e4ca7c84fd54a642e50e4c URL: https://github.com/llvm/llvm-project/commit/002d471a4a3cd8b429e4ca7c84fd54a642e50e4c DIFF: https://github.com/llvm/llvm-project/commit/002d471a4a3cd8b429e4ca7c84fd54a642e50e4c.diff LOG:

[clang] [ClangRepl] Type Directed Code Completion (PR #67349)

2023-11-23 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev closed https://github.com/llvm/llvm-project/pull/67349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

2023-11-23 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/73234 >From c274d62d03e1ab390284b26d6e23a23d099a98f6 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Thu, 23 Nov 2023 12:51:46 +0100 Subject: [PATCH 1/2] [Clang] Improve support for expression messages in `static

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

2023-11-23 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/73234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

2023-11-23 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/73234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

2023-11-23 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. DR testing part looks good, save for a couple of minor comments. https://github.com/llvm/llvm-project/pull/73234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

2023-11-23 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,30 @@ +// RUN: %clang_cc1 -std=c++2c -verify %s + +namespace dr2798 { // dr2798: 17 drafting +#if __cpp_static_assert >= 202306 +struct string { +constexpr string() { Endilll wrote: Is there a reason not to format this test with clang-format? http

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

2023-11-23 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,30 @@ +// RUN: %clang_cc1 -std=c++2c -verify %s + +namespace dr2798 { // dr2798: 17 drafting +#if __cpp_static_assert >= 202306 +struct string { +constexpr string() { +data_ = new char[6](); +__builtin_memcpy(data_, "Hello", 5); +data_[5] = 0

[clang] [clang][Interp] Implement dynamic memory allocation handling (PR #70306)

2023-11-23 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/70306 >From 29270191a209af2d8bcf270c84a87d6fa456fa0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 25 Oct 2023 08:33:30 +0200 Subject: [PATCH] [clang][Interp] Implement dynamic memory allocat

[llvm] [clang] Header (PR #73258)

2023-11-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang Author: None (CarolineConcatto) Changes --- Patch is 212.10 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/73258.diff 49 Files Affected: - (modified) clang/include/

[clang] [clang] Print static_assert values of arithmetic binary operators (PR #71671)

2023-11-23 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/71671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Header (PR #73258)

2023-11-23 Thread via cfe-commits
https://github.com/CarolineConcatto updated https://github.com/llvm/llvm-project/pull/73258 >From e0f245e8d6a395afac5de471b55358c7b730a170 Mon Sep 17 00:00:00 2001 From: Caroline Concatto Date: Wed, 22 Nov 2023 10:03:50 + Subject: [PATCH] [Clang][AArch64] Add fix vector types to header int

[clang] [Clang][AArch64] Add fix vector types to header into SVE (PR #73258)

2023-11-23 Thread via cfe-commits
https://github.com/CarolineConcatto edited https://github.com/llvm/llvm-project/pull/73258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Print static_assert values of arithmetic binary operators (PR #71671)

2023-11-23 Thread via cfe-commits
@@ -17219,10 +17219,10 @@ static bool UsefulToPrintExpr(const Expr *E) { if (const auto *UnaryOp = dyn_cast(E)) return UsefulToPrintExpr(UnaryOp->getSubExpr()); - // Ignore nested binary operators. This could be a FIXME for improvements - // to the diagnostics in the f

[clang] [clang] Print static_assert values of arithmetic binary operators (PR #71671)

2023-11-23 Thread Timm Baeder via cfe-commits
@@ -17219,10 +17219,10 @@ static bool UsefulToPrintExpr(const Expr *E) { if (const auto *UnaryOp = dyn_cast(E)) return UsefulToPrintExpr(UnaryOp->getSubExpr()); - // Ignore nested binary operators. This could be a FIXME for improvements - // to the diagnostics in the f

[clang] [Clang][AArch64] Add fix vector types to header into SVE (PR #73258)

2023-11-23 Thread via cfe-commits
https://github.com/CarolineConcatto edited https://github.com/llvm/llvm-project/pull/73258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Add fix vector types to header into SVE (PR #73258)

2023-11-23 Thread via cfe-commits
https://github.com/CarolineConcatto edited https://github.com/llvm/llvm-project/pull/73258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 07d799f - [APINotes] Upstream Driver and Frontend options that enable API Notes

2023-11-23 Thread via cfe-commits
Author: Egor Zhdan Date: 2023-11-23T18:52:27Z New Revision: 07d799f08fec4cb9ceb14a43cc134dee7f1621fc URL: https://github.com/llvm/llvm-project/commit/07d799f08fec4cb9ceb14a43cc134dee7f1621fc DIFF: https://github.com/llvm/llvm-project/commit/07d799f08fec4cb9ceb14a43cc134dee7f1621fc.diff LOG: [A

[clang] [APINotes] Upstream Driver and Frontend options that enable API Notes (PR #73120)

2023-11-23 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan closed https://github.com/llvm/llvm-project/pull/73120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ClangRepl] Type Directed Code Completion (PR #67349)

2023-11-23 Thread Fred Fu via cfe-commits
capfredf wrote: @vgvassilev Thank you very much! https://github.com/llvm/llvm-project/pull/67349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ClangRepl] Type Directed Code Completion (PR #67349)

2023-11-23 Thread Fred Fu via cfe-commits
capfredf wrote: @vgvassilev there are some issues reported by sanitizers. Let's revert the patch. I will fix those issues and then re-land the patch https://github.com/llvm/llvm-project/pull/67349 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [clang] Print static_assert values of arithmetic binary operators (PR #71671)

2023-11-23 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM. I wonder if we should add an entry in the release notes? https://github.com/llvm/llvm-project/pull/71671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [clang] Print static_assert values of arithmetic binary operators (PR #71671)

2023-11-23 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/71671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[ClangRepl] Type Directed Code Completion" (PR #73259)

2023-11-23 Thread Fred Fu via cfe-commits
https://github.com/capfredf created https://github.com/llvm/llvm-project/pull/73259 Reverts llvm/llvm-project#67349 >From ad46f098f845c6a67cce0229dd402bd8cf31ac16 Mon Sep 17 00:00:00 2001 From: Fred Fu Date: Thu, 23 Nov 2023 14:06:49 -0500 Subject: [PATCH] Revert "[ClangRepl] Type Directed Cod

[clang] [clang] Print static_assert values of arithmetic binary operators (PR #71671)

2023-11-23 Thread via cfe-commits
@@ -17219,10 +17219,10 @@ static bool UsefulToPrintExpr(const Expr *E) { if (const auto *UnaryOp = dyn_cast(E)) return UsefulToPrintExpr(UnaryOp->getSubExpr()); - // Ignore nested binary operators. This could be a FIXME for improvements - // to the diagnostics in the f

[clang] Revert "[ClangRepl] Type Directed Code Completion" (PR #73259)

2023-11-23 Thread Fred Fu via cfe-commits
capfredf wrote: @vgvassilev https://github.com/llvm/llvm-project/pull/73259 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[ClangRepl] Type Directed Code Completion" (PR #73259)

2023-11-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Fred Fu (capfredf) Changes Reverts llvm/llvm-project#67349 --- Patch is 24.17 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/73259.diff 6 Files Affected: - (modified) clang/include/clang/Int

[clang] 9ebe6e2 - Revert "[ClangRepl] Type Directed Code Completion" (#73259)

2023-11-23 Thread via cfe-commits
Author: Fred Fu Date: 2023-11-23T21:07:51+02:00 New Revision: 9ebe6e28cdbe97f6c03209b87e91be6b55a8026a URL: https://github.com/llvm/llvm-project/commit/9ebe6e28cdbe97f6c03209b87e91be6b55a8026a DIFF: https://github.com/llvm/llvm-project/commit/9ebe6e28cdbe97f6c03209b87e91be6b55a8026a.diff LOG:

[clang] Revert "[ClangRepl] Type Directed Code Completion" (PR #73259)

2023-11-23 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev closed https://github.com/llvm/llvm-project/pull/73259 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [PowerPC] Implement llvm.set.rounding intrinsic (PR #67302)

2023-11-23 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff edited https://github.com/llvm/llvm-project/pull/67302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [PowerPC] Implement llvm.set.rounding intrinsic (PR #67302)

2023-11-23 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff commented: The patch looks good but I am not familiar with PPC instructions enough. Could you please run the runtime tests from here: https://github.com/llvm/llvm-test-suite/tree/main/MultiSource/UnitTests/Float/rounding? You just need to build application from two

[clang-tools-extra] [llvm] [PowerPC] Implement llvm.set.rounding intrinsic (PR #67302)

2023-11-23 Thread Serge Pavlov via cfe-commits
@@ -8900,6 +8900,83 @@ SDValue PPCTargetLowering::LowerINT_TO_FP(SDValue Op, return FP; } +SDValue PPCTargetLowering::LowerSET_ROUNDING(SDValue Op, + SelectionDAG &DAG) const { + SDLoc Dl(Op); + MachineFunction &MF = DAG.getMachi

[llvm] [clang-tools-extra] [PowerPC] Implement llvm.set.rounding intrinsic (PR #67302)

2023-11-23 Thread Serge Pavlov via cfe-commits
@@ -8900,6 +8900,83 @@ SDValue PPCTargetLowering::LowerINT_TO_FP(SDValue Op, return FP; } +SDValue PPCTargetLowering::LowerSET_ROUNDING(SDValue Op, + SelectionDAG &DAG) const { + SDLoc Dl(Op); + MachineFunction &MF = DAG.getMachi

[llvm] [clang-tools-extra] [PowerPC] Implement llvm.set.rounding intrinsic (PR #67302)

2023-11-23 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff edited https://github.com/llvm/llvm-project/pull/67302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Adjust TBAA Base Info API (PR #73263)

2023-11-23 Thread Nathan Sidwell via cfe-commits
https://github.com/urnathan created https://github.com/llvm/llvm-project/pull/73263 I noticed a couple of minor issues with CodeGenTBAA::getBaseTypeInfo. 1) isValidBaseType explicitly checks for a reference type to return false, but then also returns false for all non-record types. Just remove

[clang] [clang] Avoid recalculating TBAA base type info (PR #73264)

2023-11-23 Thread Nathan Sidwell via cfe-commits
https://github.com/urnathan created https://github.com/llvm/llvm-project/pull/73264 I noticed that TBAA BaseTypeMetadataCache can legitimately store null values, but it also uses that to mean 'no entry'. Thus nullptr entries get continually recalculated. (AFAICT null entries can never become n

[clang] [clang] Refactor TBAA Base Info construction (PR #70499)

2023-11-23 Thread Nathan Sidwell via cfe-commits
https://github.com/urnathan closed https://github.com/llvm/llvm-project/pull/70499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 419a4e4 - Revert "[clang] Avoid memcopy for small structure with padding under -ftrivial-auto-var-init (#71677)"

2023-11-23 Thread Florian Hahn via cfe-commits
Author: Florian Hahn Date: 2023-11-23T20:18:55Z New Revision: 419a4e41fc36a91999da6cbe06d430cac07224f1 URL: https://github.com/llvm/llvm-project/commit/419a4e41fc36a91999da6cbe06d430cac07224f1 DIFF: https://github.com/llvm/llvm-project/commit/419a4e41fc36a91999da6cbe06d430cac07224f1.diff LOG:

[clang] [clang] Avoid memcopy for small structure with padding under -ftrivial-auto-var-init (PR #71677)

2023-11-23 Thread Florian Hahn via cfe-commits
fhahn wrote: Reverted the change for now, as many build bots have been red due to the test failures https://github.com/llvm/llvm-project/pull/71677 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [clang] Avoid memcopy for small structure with padding under -ftrivial-auto-var-init (PR #71677)

2023-11-23 Thread Florian Hahn via cfe-commits
fhahn wrote: @serge-sans-paille those test failures were also highlighted by the precommit checks, would be good to check those before landing https://github.com/llvm/llvm-project/pull/71677 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-23 Thread Andrzej Warzyński via cfe-commits
@@ -0,0 +1,15 @@ +! UNSUPPORTED: system-windows + +! RUN: %clang -o %t.c-object -c %S/Inputs/main_dupes.c banach-space wrote: Check: * https://github.com/llvm/llvm-project/blob/main/flang/test/lit.site.cfg.py.in#L24, and * https://github.com/llvm/llvm-project/b

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-23 Thread Andrzej Warzyński via cfe-commits
@@ -0,0 +1,13 @@ +! RUN: %clang -x c -o %t.c-part -c %s.c-part banach-space wrote: That's a shame - thanks for checking. One alternative would be to add LLVM IR instead of a C file, but LLVM IR is not stable. Though a plain function definition should be fairly

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-23 Thread Andrzej Warzyński via cfe-commits
@@ -0,0 +1,8 @@ +#include + +int main(int argc, char * argv[]) { +// Irrelevant what to do in here. +// Test is supposed to fail at link time. +printf("Hello from C [%s]\n", __FUNCTION__); banach-space wrote: Note that if you remove this line and `#i

<    1   2   3   >