[clang] [PAC] Authenticate function pointers in UBSan type checks (PR #99590)

2024-07-18 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak created https://github.com/llvm/llvm-project/pull/99590 The function pointer needs to be authenticated before doing the type checks. >From c44fbc480f8632a178633637010ab6953ed3e50d Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Thu, 18 Jul 2024 16:54:09 -0700 Su

[clang] [llvm] [PowerPC] Add support for -mcpu=pwr11 / -mtune=pwr11 (PR #99511)

2024-07-18 Thread Chen Zheng via cfe-commits
https://github.com/chenzheng1030 edited https://github.com/llvm/llvm-project/pull/99511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Add support for -mcpu=pwr11 / -mtune=pwr11 (PR #99511)

2024-07-18 Thread Chen Zheng via cfe-commits
@@ -672,6 +685,8 @@ def : ProcessorModel<"pwr7", P7Model, ProcessorFeatures.P7Features>; def : ProcessorModel<"pwr8", P8Model, ProcessorFeatures.P8Features>; def : ProcessorModel<"pwr9", P9Model, ProcessorFeatures.P9Features>; def : ProcessorModel<"pwr10", P10Model, ProcessorF

[clang] [llvm] [PowerPC] Add support for -mcpu=pwr11 / -mtune=pwr11 (PR #99511)

2024-07-18 Thread Chen Zheng via cfe-commits
https://github.com/chenzheng1030 commented: Basically you need to handle P11 for all the places where P10 is handled, seems you are missing below places: 1: we need handling in `LoadOpcodesForSpill` and `StoreOpcodesForSpill` for P11. Even for now P11 may already use the model of P10, we need a

[clang] [llvm] [PowerPC] Add support for -mcpu=pwr11 / -mtune=pwr11 (PR #99511)

2024-07-18 Thread Chen Zheng via cfe-commits
https://github.com/chenzheng1030 commented: We also need more tests like: 1: `llvm/test/CodeGen/PowerPC/check-cpu.ll` 2: at least one test in the backend like `llvm/test/CodeGen/PowerPC/p10-constants.ll`? https://github.com/llvm/llvm-project/pull/99511 __

[clang] [ExprConstant] Handle shift overflow the same way as other kinds of overflow (PR #99579)

2024-07-18 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/99579 >From 1137011c51285b083cab6c15de670e64337d3de0 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Thu, 18 Jul 2024 14:51:13 -0700 Subject: [PATCH 1/3] [ExprConstant] Handle shift overflow the same way as ot

[clang] [llvm] [PowerPC] Add builtin_cpu_is P11 support (PR #99550)

2024-07-18 Thread Chen Zheng via cfe-commits
@@ -84,6 +85,7 @@ #define AIX_PPC8_VALUE 0x0001 #define AIX_PPC9_VALUE 0x0002 #define AIX_PPC10_VALUE 0x0004 +#define AIX_PPC11_VALUE 0x0008 chenzheng1030 wrote: Where did you get this value? Is it documented somewhere? From the latest AIX 7.3

[clang] [llvm] [PowerPC] Add builtin_cpu_is P11 support (PR #99550)

2024-07-18 Thread Chen Zheng via cfe-commits
@@ -103,6 +105,7 @@ PPC_CPU("ppc476",SYS_CALL,44,BUILTIN_PPC_FALSE,0) PPC_CPU("power8",SYS_CALL,45,USE_SYS_CONF,AIX_PPC8_VALUE) PPC_CPU("power9",SYS_CALL,46,USE_SYS_CONF,AIX_PPC9_VALUE) PPC_CPU("power10",SYS_CALL,47,USE_SYS_CONF,AIX_PPC10_VALUE) +PPC_CPU("power11",SYS_CALL,48,U

[clang] [PAC] Fix a crash when signing a pointer to a function with an incomplete enum parameter (PR #99595)

2024-07-18 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak created https://github.com/llvm/llvm-project/pull/99595 Use type int as the underlying type when the enum type is incomplete. >From 14612f84704edbcc3b3bcb20d6e114890e1c3998 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Thu, 18 Jul 2024 17:59:46 -0700 Subject:

[clang] [ExprConstant] Handle shift overflow the same way as other kinds of overflow (PR #99579)

2024-07-18 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Pushed new version with an update to make Sema::VerifyIntegerConstantExpression slightly more strict. That handles the cases where the errors were getting dropped. The tradeoff is that we're more strict about arithmetic overflow in certain integer constant expressions (c

[clang] [llvm] [PowerPC] add TargetParser for PPC target (PR #97541)

2024-07-18 Thread Chen Zheng via cfe-commits
chenzheng1030 wrote: ping : ) Sorry, I may commit this directly if I don't get any further comments. I have follow up patches based on this one. Thanks. https://github.com/llvm/llvm-project/pull/97541 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang] Fix assertion failure during conversion function overload resolution. (PR #98671)

2024-07-18 Thread Shafik Yaghmour via cfe-commits
@@ -1519,7 +1519,8 @@ bool Sema::IsAtLeastAsConstrained(NamedDecl *D1, auto IsExpectedEntity = [](const FunctionDecl *FD) { FunctionDecl::TemplatedKind Kind = FD->getTemplatedKind(); return Kind == FunctionDecl::TK_NonTemplate || - Kind == FunctionDe

[clang] [clang codegen] Emit int TBAA metadata on FP math libcall expf (PR #96025)

2024-07-18 Thread via cfe-commits
https://github.com/vfdff updated https://github.com/llvm/llvm-project/pull/96025 >From ece0662e3ca7086bbe4950660ad5b04be5a82055 Mon Sep 17 00:00:00 2001 From: zhongyunde 00443407 Date: Tue, 18 Jun 2024 09:21:07 -0400 Subject: [PATCH 1/2] [clang codegen] Emit int TBAA metadata on FP math libcall

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-18 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: No more comments from me. https://github.com/llvm/llvm-project/pull/90574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang codegen] Emit int TBAA metadata on FP math libcall expf (PR #96025)

2024-07-18 Thread via cfe-commits
@@ -688,7 +688,34 @@ static RValue emitLibraryCall(CodeGenFunction &CGF, const FunctionDecl *FD, const CallExpr *E, llvm::Constant *calleeValue) { CodeGenFunction::CGFPOptionsRAII FPOptsRAII(CGF, E); CGCallee callee = CGCallee::forDirect(calle

[clang] 962d018 - [clang] [hexagon] handle --unwindlib arg (#99552)

2024-07-18 Thread via cfe-commits
Author: Brian Cain Date: 2024-07-18T21:12:21-05:00 New Revision: 962d018234cb8c94e387fe3950cd030658850541 URL: https://github.com/llvm/llvm-project/commit/962d018234cb8c94e387fe3950cd030658850541 DIFF: https://github.com/llvm/llvm-project/commit/962d018234cb8c94e387fe3950cd030658850541.diff LO

[clang] [clang] [hexagon] handle --unwindlib arg (PR #99552)

2024-07-18 Thread Brian Cain via cfe-commits
https://github.com/androm3da closed https://github.com/llvm/llvm-project/pull/99552 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Preserve ContainsUnexpandedParameterPack in TransformLambdaExpr (PR #86265)

2024-07-18 Thread Younan Zhang via cfe-commits
@@ -14636,6 +14645,20 @@ TreeTransform::TransformLambdaExpr(LambdaExpr *E) { /*IsInstantiation*/ true); SavedContext.pop(); + // Parts other than the capture e.g. the lambda body might still contain a + // pattern that an outer fold exp

[clang] [Sema] Preserve ContainsUnexpandedParameterPack in TransformLambdaExpr (PR #86265)

2024-07-18 Thread Younan Zhang via cfe-commits
@@ -23,3 +23,104 @@ namespace PR41576 { } static_assert(f(3, 4) == 6); // expected-note {{instantiation}} } + +namespace PR85667 { + +template +struct identity { + using type = T; +}; + +template void f() { + + static_assert([](Is... x) { +return ([I(x)] { + re

[clang] [Sema] Preserve ContainsUnexpandedParameterPack in TransformLambdaExpr (PR #86265)

2024-07-18 Thread Younan Zhang via cfe-commits
@@ -14636,6 +14645,20 @@ TreeTransform::TransformLambdaExpr(LambdaExpr *E) { /*IsInstantiation*/ true); SavedContext.pop(); + // Parts other than the capture e.g. the lambda body might still contain a + // pattern that an outer fold exp

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

2024-07-18 Thread via cfe-commits
https://github.com/h-vetinari updated https://github.com/llvm/llvm-project/pull/96171 >From 1df587efeb71fb1929667f008d7e9b251863d9d8 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Thu, 20 Jun 2024 21:43:31 +1100 Subject: [PATCH 1/4] [cmake] switch to CMake's native check_linker_flag, delet

[clang] [PAC] Authenticate function pointers in UBSan type checks (PR #99590)

2024-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Akira Hatanaka (ahatanak) Changes The function pointer needs to be authenticated before doing the type checks. --- Full diff: https://github.com/llvm/llvm-project/pull/99590.diff 4 Files Affected: - (modified) clang/lib/CodeGen/Address.

[clang] [PAC] Fix a crash when signing a pointer to a function with an incomplete enum parameter (PR #99595)

2024-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Akira Hatanaka (ahatanak) Changes Use type int as the underlying type when the enum type is incomplete. --- Full diff: https://github.com/llvm/llvm-project/pull/99595.diff 2 Files Affected: - (modified) clang/lib/AST/ASTContext.cpp (+4-

[clang] [Clang] Refactor uses of `Cand->Function` in SemaOverload.cpp (PR #98965)

2024-07-18 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 87ca6386f9389f9d929d660e37701590092cefab ef007ca0c0119298767bbc9f1a345969fe6e8c03 --e

[clang] [lldb] [clang] Split ObjectFilePCHContainerReader from ObjectFilePCHContainerWriter (PR #99599)

2024-07-18 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/99599 Close https://github.com/llvm/llvm-project/issues/99479 See https://github.com/llvm/llvm-project/issues/99479 for details >From 36e24bd88649e9d5771f1dbb668632d33ffe52d7 Mon Sep 17 00:00:00 2001 From: Chuanqi

[clang] [lldb] [clang] Split ObjectFilePCHContainerReader from ObjectFilePCHContainerWriter (PR #99599)

2024-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Chuanqi Xu (ChuanqiXu9) Changes Close https://github.com/llvm/llvm-project/issues/99479 See https://github.com/llvm/llvm-project/issues/99479 for details --- Full diff: https://github.com/llvm/llvm-project/pull/99599.diff 16 Fil

[clang] [lldb] [clang] Split ObjectFilePCHContainerReader from ObjectFilePCHContainerWriter (PR #99599)

2024-07-18 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 962d018234cb8c94e387fe3950cd030658850541 36e24bd88649e9d5771f1dbb668632d33ffe52d7 --e

[clang] 1df2e0c - [clang codegen] Emit int TBAA metadata on FP math libcall expf (#96025)

2024-07-18 Thread via cfe-commits
Author: Allen Date: 2024-07-19T11:19:21+08:00 New Revision: 1df2e0c344f0ddf7e09a9c89eba6bbee52142344 URL: https://github.com/llvm/llvm-project/commit/1df2e0c344f0ddf7e09a9c89eba6bbee52142344 DIFF: https://github.com/llvm/llvm-project/commit/1df2e0c344f0ddf7e09a9c89eba6bbee52142344.diff LOG: [c

[clang] [clang codegen] Emit int TBAA metadata on FP math libcall expf (PR #96025)

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

[clang] [clang codegen] Emit int TBAA metadata on FP math libcall expf (PR #96025)

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

[clang] [clang][test] Add function type discrimination tests to static destructor tests (PR #99604)

2024-07-18 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt created https://github.com/llvm/llvm-project/pull/99604 I accidentally did not include tests for the setting up runtime calls when compiling with -fptrauth-function-pointer-type-discrimination >From 640779f0327c3b3773ff055923c59a82ae6c7f30 Mon Sep 17 00:00:00 2001 Fro

[clang] [clang][test] Add function type discrimination tests to static destructor tests (PR #99604)

2024-07-18 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt ready_for_review https://github.com/llvm/llvm-project/pull/99604 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][test] Add function type discrimination tests to static destructor tests (PR #99604)

2024-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oliver Hunt (ojhunt) Changes I accidentally did not include tests for the setting up runtime calls when compiling with -fptrauth-function-pointer-type-discrimination --- Full diff: https://github.com/llvm/llvm-project/pull/99604.diff 1

[clang] [PAC] Fix a crash when signing a pointer to a function with an incomplete enum parameter (PR #99595)

2024-07-18 Thread Anton Korobeynikov via cfe-commits
https://github.com/asl approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/99595 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC] Authenticate function pointers in UBSan type checks (PR #99590)

2024-07-18 Thread Anton Korobeynikov via cfe-commits
https://github.com/asl approved this pull request. https://github.com/llvm/llvm-project/pull/99590 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC] Authenticate function pointers in UBSan type checks (PR #99590)

2024-07-18 Thread Anton Korobeynikov via cfe-commits
@@ -13,6 +15,8 @@ void fun() {} // ARM: ptrtoint ptr {{.*}} to i32, !nosanitize !5 // ARM: and i32 {{.*}}, -2, !nosanitize !5 // ARM: inttoptr i32 {{.*}} to ptr, !nosanitize !5 +// 64e: %[[STRIPPED:.*]] = ptrtoint ptr {{.*}} to i64, !nosanitize +// 64e: call i64 @llvm

[clang] 88e9bd8 - [X86][Driver] Enable feature zu for -mapxf

2024-07-18 Thread Shengchen Kan via cfe-commits
Author: Shengchen Kan Date: 2024-07-19T12:34:41+08:00 New Revision: 88e9bd822fe088eff74f49081b890071538fa40c URL: https://github.com/llvm/llvm-project/commit/88e9bd822fe088eff74f49081b890071538fa40c DIFF: https://github.com/llvm/llvm-project/commit/88e9bd822fe088eff74f49081b890071538fa40c.diff

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-07-18 Thread Pranav Bhandarkar via cfe-commits
@@ -5229,13 +5362,288 @@ static void emitTargetOutlinedFunction( OMPBuilder.emitTargetRegionFunction(EntryInfo, GenerateOutlinedFunction, true, OutlinedFn, OutlinedFnID); } +OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::emitTargetTask(

[clang] 2f0910d - [C++20] [Modules] Skip ODR checks if either declaration comes from GMF

2024-07-18 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-07-19T13:38:57+08:00 New Revision: 2f0910d2d74419ef1ebf814b471af721ee78b464 URL: https://github.com/llvm/llvm-project/commit/2f0910d2d74419ef1ebf814b471af721ee78b464 DIFF: https://github.com/llvm/llvm-project/commit/2f0910d2d74419ef1ebf814b471af721ee78b464.diff LO

[clang] [Doc] Update documentation for no-transitive-change (PR #96453)

2024-07-18 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/96453 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6f710fe - [Doc] Update documentation for no-transitive-change (#96453)

2024-07-18 Thread via cfe-commits
Author: Chuanqi Xu Date: 2024-07-19T14:20:48+08:00 New Revision: 6f710fef838185cbbe11193b30d6adc354b08b28 URL: https://github.com/llvm/llvm-project/commit/6f710fef838185cbbe11193b30d6adc354b08b28 DIFF: https://github.com/llvm/llvm-project/commit/6f710fef838185cbbe11193b30d6adc354b08b28.diff LO

[clang] [PAC] Fix a crash when signing a pointer to a function with an incomplete enum parameter (PR #99595)

2024-07-18 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 approved this pull request. https://github.com/llvm/llvm-project/pull/99595 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5