[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

[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] [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] 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] [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] 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] [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] [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] 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] [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] [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 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 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 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] 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] [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] [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 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] [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] [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] [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] [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] [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] [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] 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 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] [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
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] 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] [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] [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] [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] [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] [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] [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 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] [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
@@ -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 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] [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] [ExprConstant] Handle shift overflow the same way as other kinds of overflow (PR #99579)

2024-07-18 Thread Eli Friedman via cfe-commits
@@ -2849,19 +2849,23 @@ static bool handleIntIntBinOp(EvalInfo &Info, const BinaryOperator *E, if (SA != RHS) { Info.CCEDiag(E, diag::note_constexpr_large_shift) << RHS << E->getType() << LHS.getBitWidth(); + if (!Info.noteUndefinedBehavior()) +r

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

2024-07-18 Thread Eli Friedman via cfe-commits
@@ -142,7 +142,7 @@ constexpr int arb(int n) { // expected-note {{declared here}} expected-note {{function parameter 'n' with unknown value cannot be used in a constant expression}} } constexpr long Overflow[(1 << 30) << 2]{}; // expected-warning {{requires 34

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

2024-07-18 Thread Eli Friedman via cfe-commits
@@ -200,14 +200,7 @@ namespace LongInt { }; enum shiftof { -X = (1<<-29), // all-error {{expression is not an integral constant expression}} \ - // all-note {{negative shift count -29}} - -X2 = (-1<<29), // cxx17-error {{expression is not an integral

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-18 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/99360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Loop over FieldDecls instead of all Decls (PR #99574)

2024-07-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux` running on `sanitizer-buildbot8` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/51/builds/1493 Here is the relevant piece of the b

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

2024-07-18 Thread Richard Smith via cfe-commits
zygoloid wrote: As noted in one of the inline comments, it doesn't seem good to be losing a diagnostic for ill-formed code. But this all makes sense to me as a step to make our behavior more consistent. I wonder if it'd make sense to make our folding behavior stricter by default as a prerequis

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

2024-07-18 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/99579 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-18 Thread Richard Smith via cfe-commits
@@ -2849,19 +2849,23 @@ static bool handleIntIntBinOp(EvalInfo &Info, const BinaryOperator *E, if (SA != RHS) { Info.CCEDiag(E, diag::note_constexpr_large_shift) << RHS << E->getType() << LHS.getBitWidth(); + if (!Info.noteUndefinedBehavior()) +r

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

2024-07-18 Thread Richard Smith via cfe-commits
@@ -200,14 +200,7 @@ namespace LongInt { }; enum shiftof { -X = (1<<-29), // all-error {{expression is not an integral constant expression}} \ - // all-note {{negative shift count -29}} - -X2 = (-1<<29), // cxx17-error {{expression is not an integral

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

2024-07-18 Thread Richard Smith via cfe-commits
@@ -142,7 +142,7 @@ constexpr int arb(int n) { // expected-note {{declared here}} expected-note {{function parameter 'n' with unknown value cannot be used in a constant expression}} } constexpr long Overflow[(1 << 30) << 2]{}; // expected-warning {{requires 34

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-18 Thread Thurston Dang via cfe-commits
@@ -2498,6 +2499,15 @@ struct MemorySanitizerVisitor : public InstVisitor { MSV->setOrigin(I, Origin); } } + +/// Store the current combined value at the specified origin +/// location. +void DoneAndStoreOrigin(TypeSize TS, Value *OriginPtr) { +

[clang] [clang-scan-deps] Ignore import/include directives with missing filenames (PR #99520)

2024-07-18 Thread Michael Spencer via cfe-commits
@@ -544,7 +544,7 @@ Scanner::lexIncludeFilename(const char *&First, const char *const End) { void Scanner::lexPPDirectiveBody(const char *&First, const char *const End) { while (true) { const dependency_directives_scan::Token &Tok = lexToken(First, End); -if (Tok.is(

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-18 Thread Thurston Dang via cfe-commits
@@ -2498,6 +2499,15 @@ struct MemorySanitizerVisitor : public InstVisitor { MSV->setOrigin(I, Origin); } } + +/// Store the current combined value at the specified origin +/// location. +void DoneAndStoreOrigin(TypeSize TS, Value *OriginPtr) { +

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-18 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/99360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-18 Thread Vitaly Buka via cfe-commits
@@ -2498,6 +2499,15 @@ struct MemorySanitizerVisitor : public InstVisitor { MSV->setOrigin(I, Origin); } } + +/// Store the current combined value at the specified origin +/// location. +void DoneAndStoreOrigin(TypeSize TS, Value *OriginPtr) { +

[clang] [test][PAC][clang] Add missing tests against linux triples (PR #99482)

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/99482 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Improve BlockIndent at ColumnLimit (PR #93140)

2024-07-18 Thread Gedare Bloom via cfe-commits
gedare wrote: I have another PR lined up to submit but it depends on this one. It would be great if we can get some forward progress @owenca https://github.com/llvm/llvm-project/pull/93140 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-18 Thread Vitaly Buka via cfe-commits
@@ -2498,6 +2499,15 @@ struct MemorySanitizerVisitor : public InstVisitor { MSV->setOrigin(I, Origin); } } + +/// Store the current combined value at the specified origin +/// location. +void DoneAndStoreOrigin(TypeSize TS, Value *OriginPtr) { +

[clang] [PAC] Implement authentication for C++ member function pointers (PR #99576)

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

[clang] [clang] Implement authentication for C++ member function pointers (PR #99576)

2024-07-18 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/99576 >From 547ce3e9c7fe7e046b20f51f2f0d370a683659d1 Mon Sep 17 00:00:00 2001 From: Ahmed Bougacha Date: Fri, 10 May 2024 15:58:57 -0700 Subject: [PATCH] [PAC] Implement pointer authentication for C++ member function p

[clang] [clang] Implement authentication for C++ member function pointers (PR #99576)

2024-07-18 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/99576 >From c2bc964341fb4d0738e94d4afa6abc84eed0113c Mon Sep 17 00:00:00 2001 From: Ahmed Bougacha Date: Fri, 10 May 2024 15:58:57 -0700 Subject: [PATCH] [clang] Implement pointer authentication for C++ member function

[clang] Fix diagnostics-dsym.test on mac-arm64 (PR #99399)

2024-07-18 Thread via cfe-commits
zeroomega wrote: @cyndyishida I updated the patch to use CHECK-DAG and confirm the test now pass under both XCode toolchain and our in house one. Please take a look. Thx. https://github.com/llvm/llvm-project/pull/99399 ___ cfe-commits mailing list cfe

[clang] Fix diagnostics-dsym.test on mac-arm64 (PR #99399)

2024-07-18 Thread via cfe-commits
https://github.com/zeroomega updated https://github.com/llvm/llvm-project/pull/99399 >From 15ac1fc1d3e2ca29e5b7b18a794f8ad036f95368 Mon Sep 17 00:00:00 2001 From: Haowei Wu Date: Wed, 17 Jul 2024 15:45:53 -0700 Subject: [PATCH] Fix diagnostics-dsym.test on mac-arm64 The output ordering of diag

[clang] [lldb] [HLSL] Implement intangible AST type (PR #97362)

2024-07-18 Thread Joshua Batista via cfe-commits
bob80905 wrote: Just an FYI, the syntax for adding a resource_class attribute as currently implemented looks like this: `[[hlsl::resource_class(SRV)]]` In your description, you may want to update this and other similar attributes. https://github.com/llvm/llvm-project/pull/97362

[clang] [Clang] Loop over FieldDecls instead of all Decls (PR #99574)

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

[clang] 1f6f97e - [Clang] Loop over FieldDecls instead of all Decls (#99574)

2024-07-18 Thread via cfe-commits
Author: Bill Wendling Date: 2024-07-18T22:11:56Z New Revision: 1f6f97e2b64a9c4c51712d32b53e07d2a20e0cc0 URL: https://github.com/llvm/llvm-project/commit/1f6f97e2b64a9c4c51712d32b53e07d2a20e0cc0 DIFF: https://github.com/llvm/llvm-project/commit/1f6f97e2b64a9c4c51712d32b53e07d2a20e0cc0.diff LOG:

[clang-tools-extra] [clangd] fix crash in include cleaner (PR #99514)

2024-07-18 Thread Yuxuan Shui via cfe-commits
yshui wrote: Good question. I will try to add one once I figure out how this test system works https://github.com/llvm/llvm-project/pull/99514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [clang codegen] Fix the ci fail for PR98704 (PR #99267)

2024-07-18 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: This seems fine. https://github.com/llvm/llvm-project/pull/99267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Loop over FieldDecls instead of all Decls (PR #99574)

2024-07-18 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/99574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix diagnostics-dsym.test on mac-arm64 (PR #99399)

2024-07-18 Thread via cfe-commits
zeroomega wrote: > Thank you @zeroomega ! I am also running on arm64-mac and that test is > passing. What is your `cmake` invocation? I'd like to dig into the underlying > cause of non-stable ordering. It looks like the darwin-aarch64 is passing the > test as well https://lab.llvm.org/buildbot

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

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 49b2c30feb3730ccb1ba075dd37e68d47095bb23 1137011c51285b083cab6c15de670e64337d3de0 --e

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-07-18 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Posted #99579. https://github.com/llvm/llvm-project/pull/70307 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Eli Friedman (efriedma-quic) Changes We have a mechanism to allow folding expressions that aren't ICEs as an extension; use it more consistently. This ends up causing bad effects on diagnostics in a few cases, but that's not specific to

[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 created https://github.com/llvm/llvm-project/pull/99579 We have a mechanism to allow folding expressions that aren't ICEs as an extension; use it more consistently. This ends up causing bad effects on diagnostics in a few cases, but that's not specific to shif

[clang-tools-extra] [libc] clang-tidy: readability-redundant-smartptr-get does not remove -> (#97964) (PR #98757)

2024-07-18 Thread Nathan James via cfe-commits
@@ -235,3 +276,13 @@ void Negative() { if (MACRO(x) == nullptr) ; } + +void test_redundant_get() { + std::vector> v; + auto f = [](int) {}; + for (auto i = v.begin(); i != v.end(); ++i) { +f(*i->get()); njames93 wrote: I think he is saying have a

[clang] [clang] Implement authentication for C++ member function pointers (PR #99576)

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 4afdcd98c5e28e0b353b21bf01c5cd3568878e41 571ab7b4f78cd2e4f89afcd9c35da1c07848742b --e

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

2024-07-18 Thread Brian Cain via cfe-commits
https://github.com/androm3da updated https://github.com/llvm/llvm-project/pull/99552 >From c7fae87eadc5931902d8b0adb555f7ce4b0b99c1 Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Wed, 17 Jul 2024 08:08:30 -0500 Subject: [PATCH] [clang] [hexagon] handle --unwindlib arg Signed-off-by: Brian Cai

[clang] 6c6baf0 - Revert "[clang][test] Split AArch64 target feature checks across multiple lines. NFC (#99365)"

2024-07-18 Thread Jon Roelofs via cfe-commits
Author: Jon Roelofs Date: 2024-07-18T14:48:11-07:00 New Revision: 6c6baf019a25710cdc3c3971b09cd6332d0379c0 URL: https://github.com/llvm/llvm-project/commit/6c6baf019a25710cdc3c3971b09cd6332d0379c0 DIFF: https://github.com/llvm/llvm-project/commit/6c6baf019a25710cdc3c3971b09cd6332d0379c0.diff L

[clang] [clang] Implement authentication for C++ member function pointers (PR #99576)

2024-07-18 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt created https://github.com/llvm/llvm-project/pull/99576 Introduces type based signing of member function pointers. To support this discrimination schema we no longer emit member function pointer to virtual methods and indices into a vtable but migrate to using thunks.

[clang] [Clang] [docs] [MSVC] Add sections on `__forceinline` and intrinsic behaviour differences between Clang and MSVC (PR #99426)

2024-07-18 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. https://github.com/llvm/llvm-project/pull/99426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [docs] [MSVC] Add sections on `__forceinline` and intrinsic behaviour differences between Clang and MSVC (PR #99426)

2024-07-18 Thread Reid Kleckner via cfe-commits
@@ -154,3 +154,133 @@ a hint suggesting how to fix the problem. As of this writing, Clang is able to compile a simple ATL hello world application. There are still issues parsing WRL headers for modern Windows 8 apps, but they should be addressed soon. + +__forceinline behavior

[clang] [Clang] [docs] [MSVC] Add sections on `__forceinline` and intrinsic behaviour differences between Clang and MSVC (PR #99426)

2024-07-18 Thread Reid Kleckner via cfe-commits
@@ -154,3 +154,133 @@ a hint suggesting how to fix the problem. As of this writing, Clang is able to compile a simple ATL hello world application. There are still issues parsing WRL headers for modern Windows 8 rnk wrote: "modern Windows 8" is obviously stale

[clang] [Clang] Loop over FieldDecls instead of all Decls (PR #99574)

2024-07-18 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/99574 >From f907be4ed6189729dd2546d597dd003a5edb1006 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Thu, 18 Jul 2024 14:32:41 -0700 Subject: [PATCH 1/2] [Clang] Loop over FieldDecls instead of all Decls Only Fie

[clang] [Clang] Loop over FieldDecls instead of all Decls (PR #99574)

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 4afdcd98c5e28e0b353b21bf01c5cd3568878e41 f907be4ed6189729dd2546d597dd003a5edb1006 --e

[clang-tools-extra] [clangd] fix crash in include cleaner (PR #99514)

2024-07-18 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Is there a bug report this is fixing? Or a test case? https://github.com/llvm/llvm-project/pull/99514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Loop over FieldDecls instead of all Decls (PR #99574)

2024-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Bill Wendling (bwendling) Changes Only FieldDecls are important when determining GEP indices. A struct defined within another struct has the same semantics as if it were defined outside of the struct. So there's no need to look in

[clang] [Clang] Loop over FieldDecls instead of all Decls (PR #99574)

2024-07-18 Thread Bill Wendling via cfe-commits
https://github.com/bwendling created https://github.com/llvm/llvm-project/pull/99574 Only FieldDecls are important when determining GEP indices. A struct defined within another struct has the same semantics as if it were defined outside of the struct. So there's no need to look into RecordDecl

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

2024-07-18 Thread Brian Cain via cfe-commits
@@ -156,6 +156,8 @@ def err_drv_unsupported_rtlib_for_platform : Error< "unsupported runtime library '%0' for platform '%1'">; def err_drv_invalid_unwindlib_name : Error< "invalid unwind library name in argument '%0'">; +def err_drv_unsupported_unwind_for_platform : Error<

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

2024-07-18 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. 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] [clang] [hexagon] handle --unwindlib arg (PR #99552)

2024-07-18 Thread Fangrui Song via cfe-commits
@@ -156,6 +156,8 @@ def err_drv_unsupported_rtlib_for_platform : Error< "unsupported runtime library '%0' for platform '%1'">; def err_drv_invalid_unwindlib_name : Error< "invalid unwind library name in argument '%0'">; +def err_drv_unsupported_unwind_for_platform : Error<

[clang-tools-extra] [libc] clang-tidy: readability-redundant-smartptr-get does not remove -> (#97964) (PR #98757)

2024-07-18 Thread via cfe-commits
@@ -235,3 +276,13 @@ void Negative() { if (MACRO(x) == nullptr) ; } + +void test_redundant_get() { + std::vector> v; + auto f = [](int) {}; + for (auto i = v.begin(); i != v.end(); ++i) { +f(*i->get()); akshaykumars614 wrote: Can I add a member to

[clang] [test][PAC][clang] Add missing tests against linux triples (PR #99482)

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

[clang] [test][PAC][clang] Add missing tests against linux triples (PR #99482)

2024-07-18 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/99482 >From f2709fc1530537974a7fe8036f28558b9fb30bb5 Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Thu, 18 Jul 2024 15:26:30 +0300 Subject: [PATCH 1/2] [test][PAC][clang] Add missing tests against linux triples

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-18 Thread Thurston Dang via cfe-commits
@@ -3742,6 +3751,124 @@ struct MemorySanitizerVisitor : public InstVisitor { setOriginForNaryOp(I); } + // Given two shadows ..., ..., return the interleaved value + // ABABABAB ... + // + // Width == number of elements in A == number of elements in B + Val

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/99360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-18 Thread Thurston Dang via cfe-commits
@@ -3865,6 +3866,42 @@ struct MemorySanitizerVisitor : public InstVisitor { setOriginForNaryOp(I); } + /// Handle Arm NEON vector store intrinsics (vst{2,3,4}). + /// + /// Arm NEON vector store intrinsics have the output address (pointer) as the + /// last argument

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-18 Thread Thurston Dang via cfe-commits
@@ -3865,6 +3866,42 @@ struct MemorySanitizerVisitor : public InstVisitor { setOriginForNaryOp(I); } + /// Handle Arm NEON vector store intrinsics (vst{2,3,4}). + /// + /// Arm NEON vector store intrinsics have the output address (pointer) as the + /// last argument

[clang] [Clang][Sema] Disallow applying `onwership_returns` to functions that return non-pointers (PR #99564)

2024-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Pavel Skripkin (pskrgag) Changes `onwership_returns` works only with pointers, since it models user-defined memory allocation functions. Make semantics more clear and report an error if attribute is attached to wrong function. Closes #9

  1   2   3   4   5   >