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

2023-12-11 Thread Timm Baeder via cfe-commits
@@ -44,6 +44,24 @@ static_assert(MulA * MulB == 50, ""); // ref-error {{not an integral constant ex static_assert(MulA * 5 == 25, ""); static_assert(-1 * MulB == -7, ""); + +constexpr _BitInt(4) DivA = 2; +constexpr _BitInt(2) DivB = 1; +static_assert(DivA / DivB == 2, "");

[clang] [clang] Add per-global code model attribute (PR #72078)

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

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-11 Thread via cfe-commits
@@ -4841,6 +4841,19 @@ CodeGenModule::GetOrCreateLLVMGlobal(StringRef MangledName, llvm::Type *Ty, isExternallyVisible(D->getLinkageAndVisibility().getLinkage())) GV->setSection(".cp.rodata"); +// Handle code model attribute +if (D->hasAttr()) { +

[clang] [clang] Add per-global code model attribute (PR #72078)

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

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-11 Thread via cfe-commits
@@ -0,0 +1,37 @@ +// RUN: %clang_cc1 -emit-llvm -triple loongarch64 %s -o - | FileCheck %s + +// CHECK: @_ZL2v1 ={{.*}} global i32 0, code_model "small" +static int v1 __attribute__((model("normal"))); + +void use1() { + v1 = 1; +} + +// CHECK: @v2 ={{.*}} global i32 0,

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-11 Thread via cfe-commits
https://github.com/heiher updated https://github.com/llvm/llvm-project/pull/72078 >From e3863873ab817dacf8680763bb42d91f005fe5ea Mon Sep 17 00:00:00 2001 From: WANG Rui Date: Fri, 10 Nov 2023 21:07:48 -0600 Subject: [PATCH 1/6] [clang] Add per-global code model attribute This patch adds a

[clang] [clang][Interp] Reject static lambdas with captures (PR #74718)

2023-12-11 Thread Ben Jackson via cfe-commits
@@ -61,6 +61,11 @@ ByteCodeEmitter::compileFunc(const FunctionDecl *FuncDecl) { MD->getParent()->getCaptureFields(LC, LTC); for (auto Cap : LC) { +// Static lambdas cannot have any captures. If this one does, +// it has already been diagnosed and

[clang] [clang][Interp] Reject static lambdas with captures (PR #74718)

2023-12-11 Thread Ben Jackson via cfe-commits
https://github.com/puremourning commented: Lgtm https://github.com/llvm/llvm-project/pull/74718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Reject static lambdas with captures (PR #74718)

2023-12-11 Thread Ben Jackson via cfe-commits
https://github.com/puremourning edited https://github.com/llvm/llvm-project/pull/74718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][wasm] Resolve assertion errors caused by converting ComplexTy… (PR #70496)

2023-12-11 Thread via cfe-commits
knightXun wrote: cc @Endilll @cor3ntin https://github.com/llvm/llvm-project/pull/70496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Sema] Implement support for -Wformat-signedness (PR #74440)

2023-12-11 Thread Karl-Johan Karlsson via cfe-commits
https://github.com/karka228 updated https://github.com/llvm/llvm-project/pull/74440 >From a80bf9d03f19d48c0aca4af7758dc49516da8825 Mon Sep 17 00:00:00 2001 From: Karl-Johan Karlsson Date: Tue, 5 Dec 2023 10:03:00 +0100 Subject: [PATCH 1/6] [Sema] Implement support for -Wformat-signedness In

[libcxx] [clang] [clang-tools-extra] [compiler-rt] [libc] [llvm] [flang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-11 Thread Yeoul Na via cfe-commits
@@ -4022,8 +4169,36 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, ArrayLV = EmitArraySubscriptExpr(ASE, /*Accessed*/ true); else ArrayLV = EmitLValue(Array); + auto *Idx = EmitIdxAfterBase(/*Promote*/true); +if

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

2023-12-11 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -1005,12 +1008,23 @@ bool SetThisField(InterpState , CodePtr OpPC, uint32_t I) { template ::T> bool GetGlobal(InterpState , CodePtr OpPC, uint32_t I) { const Block *B = S.P.getGlobal(I); + + if (!CheckConstant(S, OpPC,

[clang] [Preprocessor] Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 for AArch64 (PR #74954)

2023-12-11 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/74954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1c830b7 - [Preprocessor] Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 for AArch64 (#74954)

2023-12-11 Thread via cfe-commits
Author: Fangrui Song Date: 2023-12-11T23:09:14-08:00 New Revision: 1c830b787c0d8ccc863d23fa507182dc7685fcc2 URL: https://github.com/llvm/llvm-project/commit/1c830b787c0d8ccc863d23fa507182dc7685fcc2 DIFF: https://github.com/llvm/llvm-project/commit/1c830b787c0d8ccc863d23fa507182dc7685fcc2.diff

[clang] [clang][Interp] Reject static lambdas with captures (PR #74718)

2023-12-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/74718 >From cb0cb30f9caea7d73a2bb09068f7187ac3b94408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 7 Dec 2023 14:19:52 +0100 Subject: [PATCH] [clang][Interp] Reject static lambdas with

[clang] [clang][Sema] Resolving Inconsistent Arguments Panic in Variadic Template Variables (PR #70280)

2023-12-11 Thread via cfe-commits
https://github.com/knightXun updated https://github.com/llvm/llvm-project/pull/70280 >From 95180e1765fea3ec6de822d0b9926056d0d12404 Mon Sep 17 00:00:00 2001 From: knightXun Date: Thu, 26 Oct 2023 09:25:58 +0800 Subject: [PATCH] [clang][Sema] Resolving Panic Caused by Inconsistent Arguments in

[clang] [clang][Sema] Resolving Inconsistent Arguments Panic in Variadic Template Variables (PR #70280)

2023-12-11 Thread via cfe-commits
https://github.com/knightXun updated https://github.com/llvm/llvm-project/pull/70280 >From 23a1a74bfef2c974f2fd99569e124ee4a82bbadf Mon Sep 17 00:00:00 2001 From: knightXun Date: Thu, 26 Oct 2023 09:25:58 +0800 Subject: [PATCH 1/2] [clang][Sema] Resolving Panic Caused by Inconsistent

[compiler-rt] [clang] [libc] [clang-tools-extra] [libcxx] [llvm] [flang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-11 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna unassigned https://github.com/llvm/llvm-project/pull/73730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix parsing of `operator<() {}` (PR #75144)

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

[clang] [Clang][InstrProf] Allow mix-up of absolute path with relative path on command line when using -fprofile-list= (PR #67519)

2023-12-11 Thread Petr Hosek via cfe-commits
petrhosek wrote: I think we should close it, the current behavior is as expected. https://github.com/llvm/llvm-project/pull/67519 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][InstrProf] Allow mix-up of absolute path with relative path on command line when using -fprofile-list= (PR #67519)

2023-12-11 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek closed https://github.com/llvm/llvm-project/pull/67519 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Implement inc/dec for IntegralAP (PR #69597)

2023-12-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/69597 >From d97047b5ac828e8ed3cfbe606ed4c3616dc5ee44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 18 Oct 2023 15:36:13 +0200 Subject: [PATCH] [clang][Interp] Implement inc/dec for

[clang] [clang][Sema] Resolving Inconsistent Arguments Panic in Variadic Template Variables (PR #70280)

2023-12-11 Thread via cfe-commits
https://github.com/knightXun updated https://github.com/llvm/llvm-project/pull/70280 >From 23a1a74bfef2c974f2fd99569e124ee4a82bbadf Mon Sep 17 00:00:00 2001 From: knightXun Date: Thu, 26 Oct 2023 09:25:58 +0800 Subject: [PATCH] [clang][Sema] Resolving Panic Caused by Inconsistent Arguments in

[clang] [clang-format] Fix parsing of `operator<() {}` (PR #75144)

2023-12-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: None (XDeme) Changes Fixes llvm/llvm-project#74876. During the parsing of `operator(Foo) {}`, there was no handling for the operator, so it called `consumeToken()` again starting from `(Foo)`, causing the

[clang] [clang-format] Fix parsing of `operator<() {}` (PR #75144)

2023-12-11 Thread via cfe-commits
https://github.com/XDeme created https://github.com/llvm/llvm-project/pull/75144 Fixes llvm/llvm-project#74876. During the parsing of `operator<(Foo&) {}`, there was no handling for the operator<, so it called `consumeToken()` again starting from `(Foo&)`, causing the

[clang] [clang] Crash when referencing capture in static lambda (PR #74661)

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

[clang] c88d731 - [clang] Crash when referencing capture in static lambda (#74661)

2023-12-11 Thread via cfe-commits
Author: Ben Jackson Date: 2023-12-12T07:30:23+01:00 New Revision: c88d73164a3960c5ef3ff578631f0e765b893809 URL: https://github.com/llvm/llvm-project/commit/c88d73164a3960c5ef3ff578631f0e765b893809 DIFF: https://github.com/llvm/llvm-project/commit/c88d73164a3960c5ef3ff578631f0e765b893809.diff

[clang] [clang] Skip tautological comparison if the comparison involves the 'size_t' type (PR #74427)

2023-12-11 Thread Shivam Gupta via cfe-commits
xgupta wrote: Ping @cor3ntin, do you have any more comments for this PR? https://github.com/llvm/llvm-project/pull/74427 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][InstrProf] Allow mix-up of absolute path with relative path on command line when using -fprofile-list= (PR #67519)

2023-12-11 Thread Shivam Gupta via cfe-commits
xgupta wrote: @ellishg, @gulfemsavrun shall we close this PR, or it is of any use? For me, it is not much now since it was my mistake to understand the use of -fprofile-list. https://github.com/llvm/llvm-project/pull/67519 ___ cfe-commits mailing

[clang] [clang][Interp] Implement __builtin_rotate{right, left} (PR #72984)

2023-12-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/72984 >From 1a2bda9e9b28a4f99e723bf6265cb769e048a315 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 21 Nov 2023 13:44:07 +0100 Subject: [PATCH] [clang][Interp] Implement

[clang] [clang-tools-extra] [clang][modules] Deprecate module.map in favor of module.modulemap (PR #75142)

2023-12-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules @llvm/pr-subscribers-clangd Author: Michael Spencer (Bigcheese) Changes This patch deprecates `module.map` in favor of `module.modulemap`, which has been the preferred form since 2014. The eventual goal is to remove support for

[clang] [clang][Interp] Implement __builtin_rotate{right, left} (PR #72984)

2023-12-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/72984 >From d728e5a0a38ee24040b360c3aa53ba9575d5c897 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 21 Nov 2023 13:44:07 +0100 Subject: [PATCH] [clang][Interp] Implement

[clang] [clang][Interp] Decay arrays to the first element (PR #72660)

2023-12-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/72660 >From b7277a29fe5bee1197e7ef93730265a9152e36c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 17 Nov 2023 15:54:02 +0100 Subject: [PATCH] [clang][Interp] Decay pointers to the first

[clang] [llvm] [RISCV] Add MC layer support for Zicfiss. (PR #66043)

2023-12-11 Thread Yeting Kuo via cfe-commits
yetingk wrote: Rebase and bump to 0.4 https://github.com/llvm/llvm-project/pull/66043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add MC layer support for Zicfiss. (PR #66043)

2023-12-11 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk updated https://github.com/llvm/llvm-project/pull/66043 >From 834bb96261b3e7b65a0bbd8f2651c3d307f1de79 Mon Sep 17 00:00:00 2001 From: Yeting Kuo Date: Tue, 12 Sep 2023 12:28:00 +0800 Subject: [PATCH 1/6] [RISCV] Add MC layer support for Zicfiss. The patch adds the

[clang] [llvm] [RISCV] Update the interface of sifive vqmaccqoq (PR #74284)

2023-12-11 Thread Wang Pengcheng via cfe-commits
@@ -130,18 +138,18 @@ multiclass RVVVFNRCLIPBuiltinSet; -defm sf_vqmacc_2x8x2 : RVVVQMACCBuiltinSet<[["", "v", "vv(FixedSEW:8)Sv(FixedSEW:8)v"]]>; -defm sf_vqmaccus_2x8x2 : RVVVQMACCBuiltinSet<[["", "v", "vv(FixedSEW:8)SUv(FixedSEW:8)v"]]>; -defm sf_vqmaccsu_2x8x2 :

[polly] [clang] [llvm] [polly][ScheduleOptimizer] Fix long compile time(hang) reported in polly (PR #75141)

2023-12-11 Thread Karthika Devi C via cfe-commits
https://github.com/kartcq edited https://github.com/llvm/llvm-project/pull/75141 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [polly] [polly][ScheduleOptimizer] Fix long compile time(hang) reported in polly (PR #75141)

2023-12-11 Thread Karthika Devi C via cfe-commits
https://github.com/kartcq created https://github.com/llvm/llvm-project/pull/75141 [polly][ScheduleOptimizer] Bail out on exceeding Schedule compute's ISL quota. There is no upper cap set on current Schedule Optimizer to compute schedule. In some cases a very long compile time taken to

[clang] [clang][sema] make sure arguments of __atomic_exchange complete type (PR #75135)

2023-12-11 Thread via cfe-commits
knightXun wrote: cc @shafik @cor3ntin https://github.com/llvm/llvm-project/pull/75135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [RISCV] Update the interface of sifive vqmaccqoq (PR #74284)

2023-12-11 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat closed https://github.com/llvm/llvm-project/pull/74284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][Clang] Force use of `num_teams` and `thread_limit` for bare kernel (PR #68373)

2023-12-11 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/68373 >From 380046a1117cef08e40f9bcdce2c51c3fe73a26f Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Tue, 12 Dec 2023 00:11:13 -0500 Subject: [PATCH] [OpenMP][Clang] Force use of `num_teams` and `thread_limit` for

[clang] [clang][sema] make sure arguments of __atomic_exchange complete type (PR #75135)

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

[clang] [clang][sema] check args of __atomic_exchange is complete type (PR #75135)

2023-12-11 Thread via cfe-commits
https://github.com/knightXun updated https://github.com/llvm/llvm-project/pull/75135 >From dc3714573f92b2303ca3bad046b355ccb66c2957 Mon Sep 17 00:00:00 2001 From: knightXun Date: Tue, 12 Dec 2023 12:23:54 +0800 Subject: [PATCH 1/2] [clang][sema] check args of __atomic_exchange is complete

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-12-11 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,362 @@ +== +``-fbounds-safety``: Enforcing bounds safety for C +== + +.. contents:: + :local: + +Overview + + +``-fbounds-safety`` is a C extension to enforce

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-12-11 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,362 @@ +== +``-fbounds-safety``: Enforcing bounds safety for C +== + +.. contents:: + :local: + +Overview + + +``-fbounds-safety`` is a C extension to enforce

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-12-11 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,362 @@ +== +``-fbounds-safety``: Enforcing bounds safety for C +== + +.. contents:: + :local: + +Overview + + +``-fbounds-safety`` is a C extension to enforce

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-12-11 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,362 @@ +== +``-fbounds-safety``: Enforcing bounds safety for C +== + +.. contents:: + :local: + +Overview + + +``-fbounds-safety`` is a C extension to enforce

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-12-11 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,362 @@ +== +``-fbounds-safety``: Enforcing bounds safety for C +== + +.. contents:: + :local: + +Overview + + +``-fbounds-safety`` is a C extension to enforce

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-12-11 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,362 @@ +== +``-fbounds-safety``: Enforcing bounds safety for C +== + +.. contents:: + :local: + +Overview + + +``-fbounds-safety`` is a C extension to enforce

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-12-11 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,362 @@ +== +``-fbounds-safety``: Enforcing bounds safety for C +== + +.. contents:: + :local: + +Overview + + +``-fbounds-safety`` is a C extension to enforce

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-12-11 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,362 @@ +== +``-fbounds-safety``: Enforcing bounds safety for C +== + +.. contents:: + :local: + +Overview + + +``-fbounds-safety`` is a C extension to enforce

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-12-11 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,362 @@ +== +``-fbounds-safety``: Enforcing bounds safety for C +== + +.. contents:: + :local: + +Overview + + +``-fbounds-safety`` is a C extension to enforce

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-12-11 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,362 @@ +== +``-fbounds-safety``: Enforcing bounds safety for C +== + +.. contents:: + :local: + +Overview + + +``-fbounds-safety`` is a C extension to enforce

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-12-11 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,362 @@ +== +``-fbounds-safety``: Enforcing bounds safety for C +== + +.. contents:: + :local: + +Overview + + +``-fbounds-safety`` is a C extension to enforce

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-12-11 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna commented: Thanks @AaronBallman for your feedback! I left inlined comments to answer these and updated documents. https://github.com/llvm/llvm-project/pull/70749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-12-11 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,362 @@ +== +``-fbounds-safety``: Enforcing bounds safety for C +== + +.. contents:: + :local: + +Overview + + +``-fbounds-safety`` is a C extension to enforce

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-12-11 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,362 @@ +== +``-fbounds-safety``: Enforcing bounds safety for C +== + +.. contents:: + :local: + +Overview + + +``-fbounds-safety`` is a C extension to enforce

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-12-11 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,362 @@ +== +``-fbounds-safety``: Enforcing bounds safety for C +== + +.. contents:: + :local: + +Overview + + +``-fbounds-safety`` is a C extension to enforce

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-12-11 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna edited https://github.com/llvm/llvm-project/pull/70749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-12-11 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,362 @@ +== +``-fbounds-safety``: Enforcing bounds safety for C +== + +.. contents:: + :local: + +Overview + + +``-fbounds-safety`` is a C extension to enforce

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-12-11 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,362 @@ +== +``-fbounds-safety``: Enforcing bounds safety for C +== + +.. contents:: + :local: + +Overview + + +``-fbounds-safety`` is a C extension to enforce

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-12-11 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,362 @@ +== +``-fbounds-safety``: Enforcing bounds safety for C +== + +.. contents:: + :local: + +Overview + + +``-fbounds-safety`` is a C extension to enforce

[clang] [clang][sema] check args of __atomic_exchange is complete type (PR #75135)

2023-12-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: flyingcat (knightXun) Changes make sure the args of __atomic_exchange is complete type, make it consistent with GCC issue: https://github.com/llvm/llvm-project/issues/74464 --- Full diff:

[clang] [clang][sema] check args of __atomic_exchange is complete type (PR #75135)

2023-12-11 Thread via cfe-commits
https://github.com/knightXun created https://github.com/llvm/llvm-project/pull/75135 make sure the args of __atomic_exchange is complete type, make it consistent with GCC issue: https://github.com/llvm/llvm-project/issues/74464 >From dc3714573f92b2303ca3bad046b355ccb66c2957 Mon Sep 17

[clang] [analyzer] Move alpha checker EnumCastOutOfRange to optin (PR #67157)

2023-12-11 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: I am a bit concerned about the bad user experience with bitwise enums, but I think that is probably OK since this is an optin check. That being said, I think: * It would be easy to address this, there is already a clang tidy check for bitwise enums, the heuristics to

[clang] [clang][ASTImporter] add processing of SubstNonTypeTemplateParmExpr in isAncestorDeclContextOf (PR #74991)

2023-12-11 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/74991 >From e5a6b1423919ded1ae11b431b2afa7213d052c41 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 10 Dec 2023 21:01:49 +0800 Subject: [PATCH] [clang][ASTImporter] add processing of SubstNonTypeTemplateParmExpr in

[clang] [clang][ASTImporter] add processing of SubstNonTypeTemplateParmExpr in isAncestorDeclContextOf (PR #74991)

2023-12-11 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/74991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] add processing of SubstNonTypeTemplateParmExpr in isAncestorDeclContextOf (PR #74991)

2023-12-11 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/74991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] delay import funtion return type (PR #74991)

2023-12-11 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/74991 >From 07b7415da7af38c45f4d22ba4d42f435c6a9fe68 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 10 Dec 2023 21:01:49 +0800 Subject: [PATCH] [clang][ASTImporter] add processing of SubstNonTypeTemplateParmExpr in

[clang] [clang][ASTImporter] delay import funtion return type (PR #74991)

2023-12-11 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/74991 >From 8dc4955fad0147db16bddfe8fc7d227ae69b89a1 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 10 Dec 2023 21:01:49 +0800 Subject: [PATCH] [clang][ASTImporter] add processing of SubstNonTypeTemplateParmExpr in

[compiler-rt] [clang] [clang-tools-extra] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-11 Thread Teresa Johnson via cfe-commits
https://github.com/teresajohnson approved this pull request. LGTM other than a couple of minor comments and pending resolution of the LLVM IR test. Thanks! https://github.com/llvm/llvm-project/pull/74008 ___ cfe-commits mailing list

[clang] [llvm] [RISCV] Bump zicfilp to 0.4 (PR #75134)

2023-12-11 Thread Craig Topper via cfe-commits
@@ -736,7 +736,7 @@ R"(All available -march extensions for RISC-V xventanacondops 1.0 Experimental extensions -zicfilp 0.2 This is a long dummy description +zicfilp 0.4 This is a long dummy description

[compiler-rt] [clang] [clang-tools-extra] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-11 Thread Teresa Johnson via cfe-commits
@@ -352,6 +366,8 @@ std::string getIRPGOFuncName(const Function , bool InLTO) { return getIRPGOObjectName(F, InLTO, getPGOFuncNameMetadata(F)); } +// DEPRECATED. Use `getIRPGOFuncName`for new code. See that function for teresajohnson wrote: In the header

[clang] [llvm] [CodeGen][arm64e] Add methods and data members to Address, which are needed to authenticate signed pointers (PR #67454)

2023-12-11 Thread John McCall via cfe-commits
@@ -232,110 +279,133 @@ class CGBuilderTy : public CGBuilderBaseTy { /// where i64 is actually the target word size. Address CreateConstGEP(Address Addr, uint64_t Index, const llvm::Twine = "") { +llvm::Type *ElTy = Addr.getElementType();

[clang] [llvm] [RISCV] Bump zicfilp to 0.4 (PR #75134)

2023-12-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-support @llvm/pr-subscribers-clang Author: Yeting Kuo (yetingk) Changes Bump to https://github.com/riscv/riscv-cfi/releases/tag/v0.4.0. Actually there is no functional change here. --- Full diff:

[clang] [llvm] [RISCV] Bump zicfilp to 0.4 (PR #75134)

2023-12-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Yeting Kuo (yetingk) Changes Bump to https://github.com/riscv/riscv-cfi/releases/tag/v0.4.0. Actually there is no functional change here. --- Full diff: https://github.com/llvm/llvm-project/pull/75134.diff 6 Files Affected: -

[llvm] [clang] [RISCV] Bump zicfilp to 0.4 (PR #75134)

2023-12-11 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk created https://github.com/llvm/llvm-project/pull/75134 Bump to https://github.com/riscv/riscv-cfi/releases/tag/v0.4.0. Actually there is no functional change here. >From ec87b87a67acdcb8faedec327e0938476ddb0893 Mon Sep 17 00:00:00 2001 From: Yeting Kuo Date: Tue,

[compiler-rt] [clang-tools-extra] [clang] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-11 Thread Teresa Johnson via cfe-commits
@@ -0,0 +1,115 @@ +// This is a regression test for ThinLTO indirect-call-promotion when candidate +// callees need to be imported from another IR module. In the C++ test case, +// `main` calls `global_func` which is defined in another module. `global_func` +// has two indirect

[compiler-rt] [clang-tools-extra] [clang] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-11 Thread Teresa Johnson via cfe-commits
@@ -1,39 +0,0 @@ -; Do setup work for all below tests: generate bitcode and combined index teresajohnson wrote: Without use of the raw profile, this test would not have caught the regression. If we think the new compiler-rt test is enough to catch this case in

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-11 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/72078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-11 Thread Fangrui Song via cfe-commits
@@ -4841,6 +4841,19 @@ CodeGenModule::GetOrCreateLLVMGlobal(StringRef MangledName, llvm::Type *Ty, isExternallyVisible(D->getLinkageAndVisibility().getLinkage())) GV->setSection(".cp.rodata"); +// Handle code model attribute +if (D->hasAttr()) { +

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-11 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,37 @@ +// RUN: %clang_cc1 -emit-llvm -triple loongarch64 %s -o - | FileCheck %s + +// CHECK: @_ZL2v1 ={{.*}} global i32 0, code_model "small" +static int v1 __attribute__((model("normal"))); + +void use1() { + v1 = 1; +} + +// CHECK: @v2 ={{.*}} global i32 0,

[clang] [Sema] atomic_compare_exchange: check failure memory order (PR #74959)

2023-12-11 Thread Fangrui Song via cfe-commits
MaskRay wrote: > PR description needs to be updated after changes. Otherwise LGTM. Thanks. Updated the description. https://github.com/llvm/llvm-project/pull/74959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Sema] atomic_compare_exchange: check failure memory order (PR #74959)

2023-12-11 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/74959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] atomic_compare_exchange: check failure memory order (PR #74959)

2023-12-11 Thread James Y Knight via cfe-commits
jyknight wrote: PR description needs to be updated after changes. Otherwise LGTM. https://github.com/llvm/llvm-project/pull/74959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [CodeGen][arm64e] Add methods and data members to Address, which are needed to authenticate signed pointers (PR #67454)

2023-12-11 Thread Akira Hatanaka via cfe-commits
@@ -232,19 +232,19 @@ static Value *MakeBinaryAtomicValue( static Value *EmitNontemporalStore(CodeGenFunction , const CallExpr *E) { Value *Val = CGF.EmitScalarExpr(E->getArg(0)); - Value *Address = CGF.EmitScalarExpr(E->getArg(1)); + Address Addr =

[clang] [clang] Fix logic in APValue::LValueBase::getType() (PR #75131)

2023-12-11 Thread Chenyang Gao via cfe-commits
https://github.com/cygao90 closed https://github.com/llvm/llvm-project/pull/75131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix logic in APValue::LValueBase::getType() (PR #75131)

2023-12-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chenyang Gao (cygao90) Changes See #69468. --- Full diff: https://github.com/llvm/llvm-project/pull/75131.diff 1 Files Affected: - (modified) clang/lib/AST/APValue.cpp (+3-1) ``diff diff --git a/clang/lib/AST/APValue.cpp

[clang] [Clang][AST] Fix crash in APValue::LValueBase::getType when we have invalid decl (PR #75130)

2023-12-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shafik Yaghmour (shafik) Changes In some cases when calling APValue::LValueBase::getType() when we have a ValueDecl in some cases we don't handle invalid decls. We iterating over redeclarations we reset the current decl to the current

[clang] [clang] Fix logic in APValue::LValueBase::getType() (PR #75131)

2023-12-11 Thread Chenyang Gao via cfe-commits
https://github.com/cygao90 created https://github.com/llvm/llvm-project/pull/75131 See #69468. >From ffc9b634427a117cacfd06d9247fdb98cb6bbb30 Mon Sep 17 00:00:00 2001 From: Chenyang Gao Date: Tue, 12 Dec 2023 03:22:31 +0800 Subject: [PATCH] [clang] Fix logic in APValue::LValueBase::getType()

[clang] [Clang][AST] Fix crash in APValue::LValueBase::getType when we have invalid decl (PR #75130)

2023-12-11 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik created https://github.com/llvm/llvm-project/pull/75130 In some cases when calling APValue::LValueBase::getType() when we have a ValueDecl in some cases we don't handle invalid decls. We iterating over redeclarations we reset the current decl to the current most

[clang] [llvm] [compiler-rt] [clang-tools-extra] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-11 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/74008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add test for GH75115 (PR #75116)

2023-12-11 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/75116 >From 7c18785d74556001cf19d9ae84c8f32f8d95801e Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Mon, 11 Dec 2023 17:36:44 -0300 Subject: [PATCH] [clangd] Add test for GH75115 Add test for

[clang] [clang-tools-extra] [llvm] [compiler-rt] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-11 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. LGTM once these changes are made. * unused `%clangxx_pgouse=` * profraw => proftext for the PGOProfile test * lld-available -fuse-ld=lld and windows triple simplification for the compiler-rt test It seems useful to wait for others'

[clang] [clang-tools-extra] [llvm] [compiler-rt] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-11 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,97 @@ +// This is a regression test for ThinLTO indirect-call-promotion when candidate +// callees need to be imported from another IR module. In the C++ test case, +// `main` calls `global_func` which is defined in another module. `global_func` +// has two indirect

[clang] [clang-tools-extra] [llvm] [compiler-rt] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-11 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/74008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [compiler-rt] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-11 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/74008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [compiler-rt] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-11 Thread Fangrui Song via cfe-commits
@@ -1,39 +0,0 @@ -; Do setup work for all below tests: generate bitcode and combined index MaskRay wrote: It looks like that we had 3 precanned profraw files and this patch is adding another one. Since the raw profile isn't stable, this is going to add some

[clang] [clang] Add size filter for stack auto init (PR #74777)

2023-12-11 Thread Vitaly Buka via cfe-commits
@@ -1759,20 +1759,29 @@ void CodeGenFunction::emitZeroOrPatternForAutoVarInit(QualType type, const VarDecl , Address Loc) { auto trivialAutoVarInit =

  1   2   3   4   >