[clang] [Clang][Sema] Fix lookup of dependent operator= named by using-declaration (PR #91503)

2024-06-28 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @pawosm-arm Could you provide some examples? Barring an issue with `operator=` which has been addressed, builds should only fail in the presence of accesses to non-existent members. Addressing such issues is the responsibility of users. https://github.com/llvm/llvm-project/p

[clang-tools-extra] e697943 - [clang-tidy] improve messages when auto-fix does not work (#96917)

2024-06-28 Thread via cfe-commits
Author: Congcong Cai Date: 2024-06-28T21:35:05+08:00 New Revision: e69794323338c5279011e6f01c12254da8dff10d URL: https://github.com/llvm/llvm-project/commit/e69794323338c5279011e6f01c12254da8dff10d DIFF: https://github.com/llvm/llvm-project/commit/e69794323338c5279011e6f01c12254da8dff10d.diff

[clang-tools-extra] [clang-tidy] improve messages when auto-fix does not work (PR #96917)

2024-06-28 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/96917 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Fix a bug when instantiating a lambda with requires clause (PR #65193)

2024-06-28 Thread via cfe-commits
@@ -2296,33 +2296,55 @@ ExprResult Sema::BuildBlockForLambdaConversion(SourceLocation CurrentLocation, return BuildBlock; } +static FunctionDecl *getPatternFunctionDecl(FunctionDecl *FD) { + if (FD->getTemplatedKind() == FunctionDecl::TK_MemberSpecialization) { +while

[clang] [analyzer][NFC] Use ArrayRef for input parameters (PR #93203)

2024-06-28 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/93203 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5997ebd - [analyzer][NFC] Use ArrayRef for input parameters (#93203)

2024-06-28 Thread via cfe-commits
Author: Balazs Benics Date: 2024-06-28T15:38:03+02:00 New Revision: 5997ebdb4feae22e83ec23cc9ee14e3eb7a39e10 URL: https://github.com/llvm/llvm-project/commit/5997ebdb4feae22e83ec23cc9ee14e3eb7a39e10 DIFF: https://github.com/llvm/llvm-project/commit/5997ebdb4feae22e83ec23cc9ee14e3eb7a39e10.diff

[clang] [CUDA][NFC] CudaArch to OffloadArch rename (PR #97028)

2024-06-28 Thread Jakub Chlanda via cfe-commits
https://github.com/jchlanda updated https://github.com/llvm/llvm-project/pull/97028 >From 2d61a382fa66d9cc23cd6c78657a6161edf5b5c2 Mon Sep 17 00:00:00 2001 From: Jakub Chlanda Date: Fri, 28 Jun 2024 09:25:56 + Subject: [PATCH] [CUDA][NFC] CudaArch to OffloadArch rename Rename CudaArch to O

[clang] [llvm] [AArch64][NEON] Add intrinsics for LUTI (PR #96883)

2024-06-28 Thread via cfe-commits
https://github.com/Lukacma updated https://github.com/llvm/llvm-project/pull/96883 >From cb2ebe232013576f57f8f26b9156fccd75d7d38f Mon Sep 17 00:00:00 2001 From: Marian Lukac Date: Thu, 27 Jun 2024 09:38:17 + Subject: [PATCH 1/2] [AArch64][NEON] Add intrinsics for LUTI --- clang/include/cl

[clang] [llvm] [AARCH64][SVE] Add intrinsics for SVE LUTI instructions (PR #97058)

2024-06-28 Thread via cfe-commits
https://github.com/Lukacma created https://github.com/llvm/llvm-project/pull/97058 This patch adds intrinsics for LUTI2 and LUTI4 instructions, which use SVE registers, as specified in the https://github.com/ARM-software/acle/pull/324 >From 4a6c4033f7deddcd4094ebde81402960de85bd80 Mon Sep 17 0

[clang] [llvm] [AARCH64][SVE] Add intrinsics for SVE LUTI instructions (PR #97058)

2024-06-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: None (Lukacma) Changes This patch adds intrinsics for LUTI2 and LUTI4 instructions, which use SVE registers, as specified in the https://github.com/ARM-software/acle/pull/324 --- Patch is 39.37 KiB, truncated to 20.00 KiB below, full v

[clang] f425db8 - [clang][docs] Add preliminary documentation for SPIR-V support in the HIPAMD ToolChain (#96657)

2024-06-28 Thread via cfe-commits
Author: Alex Voicu Date: 2024-06-28T14:57:27+01:00 New Revision: f425db8732770c8abe1f18f7b3606a4aba45b7d8 URL: https://github.com/llvm/llvm-project/commit/f425db8732770c8abe1f18f7b3606a4aba45b7d8 DIFF: https://github.com/llvm/llvm-project/commit/f425db8732770c8abe1f18f7b3606a4aba45b7d8.diff LO

[clang] [llvm] [clang][docs] Add preliminary documentation for SPIR-V support in the HIPAMD ToolChain (PR #96657)

2024-06-28 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx closed https://github.com/llvm/llvm-project/pull/96657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] [clang][SPIR-V] Use AMDGPU prefix to avoid confusion (PR #96962)

2024-06-28 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx approved this pull request. LTGM, thanks! Also, apologies for any inconvenience caused. https://github.com/llvm/llvm-project/pull/96962 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-06-28 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/95728 >From 2b500ad9ef2baf27da29146b5a4123dcb75e Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Mon, 17 Jun 2024 02:15:00 +0100 Subject: [PATCH 1/3] Add interface for exposing a target's flat address space, if it

[clang] [llvm] [X86][CodeGen] security check cookie execute only when needed (PR #95904)

2024-06-28 Thread via cfe-commits
mahesh-attarde wrote: @RKSimon do you have any more comments ? https://github.com/llvm/llvm-project/pull/95904 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-06-28 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx edited https://github.com/llvm/llvm-project/pull/95728 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-06-28 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx commented: @jrtc27 @arsenm any additional comments? Are things more palatable in this form? Should this be turned into an RFC? Thanks. https://github.com/llvm/llvm-project/pull/95728 ___ cfe-commits mailing list cfe-commits@

[clang] [Sema] LambdaScopeForCallOperatorInstantiationRAII - fix typo in early out logic (PR #96888)

2024-06-28 Thread via cfe-commits
0x59616e wrote: This is indeed a typo. https://github.com/llvm/llvm-project/pull/96888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] LambdaScopeForCallOperatorInstantiationRAII - fix typo in early out logic (PR #96888)

2024-06-28 Thread via cfe-commits
https://github.com/0x59616e approved this pull request. https://github.com/llvm/llvm-project/pull/96888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] LambdaScopeForCallOperatorInstantiationRAII - fix typo in early out logic (PR #96888)

2024-06-28 Thread via cfe-commits
0x59616e wrote: Thanks for this fix! https://github.com/llvm/llvm-project/pull/96888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix lookup of dependent operator= named by using-declaration (PR #91503)

2024-06-28 Thread Paul Osmialowski via cfe-commits
pawosm-arm wrote: I'm sorry, I didn't notice that there is more discussion after #90152 covering also my issue at hand. The obvious advice I can get from those is the 'this is not valid c++, fix your code' suggestion. Trouble starts when there is a lot of it to fix, even if it mostly involve d

[clang] 66f55a7 - [Flang] Re-enable -print-resource-dir compiler option (#96799)

2024-06-28 Thread via cfe-commits
Author: Michael Klemm Date: 2024-06-28T16:22:00+02:00 New Revision: 66f55a7f483deb05ce3067a2565c381daf1d0f52 URL: https://github.com/llvm/llvm-project/commit/66f55a7f483deb05ce3067a2565c381daf1d0f52 DIFF: https://github.com/llvm/llvm-project/commit/66f55a7f483deb05ce3067a2565c381daf1d0f52.diff

[clang] [flang] [Flang] Re-enable -print-resource-dir compiler option (PR #96799)

2024-06-28 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm closed https://github.com/llvm/llvm-project/pull/96799 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA][NFC] CudaArch to OffloadArch rename (PR #97028)

2024-06-28 Thread Jakub Chlanda via cfe-commits
https://github.com/jchlanda updated https://github.com/llvm/llvm-project/pull/97028 >From 7424d33961400546dfb142ec220e59bb78fe1c82 Mon Sep 17 00:00:00 2001 From: Jakub Chlanda Date: Fri, 28 Jun 2024 09:25:56 + Subject: [PATCH] [CUDA][NFC] CudaArch to OffloadArch rename Rename CudaArch to O

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-06-28 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/96475 >From 97d1b80680112c3fa271501427a18273aed61dbe Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 24 Jun 2024 10:58:53 +0200 Subject: [PATCH 1/2] [clang] Extend the existing lifetimebound check for assignments.

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-06-28 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/96475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-06-28 Thread Haojian Wu via cfe-commits
@@ -964,11 +966,26 @@ static bool pathOnlyInitializesGslPointer(IndirectLocalPath &Path) { return false; } -void checkExprLifetime(Sema &SemaRef, const InitializedEntity &Entity, +void checkExprLifetime(Sema &SemaRef, const CheckingEntity &CEntity, E

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-06-28 Thread Haojian Wu via cfe-commits
https://github.com/hokein commented: thanks for the review. https://github.com/llvm/llvm-project/pull/96475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-06-28 Thread Haojian Wu via cfe-commits
@@ -40,6 +40,12 @@ namespace usage_ok { int *p = A().class_member(); // expected-warning {{temporary whose address is used as value of local variable 'p' will be destroyed at the end of the full-expression}} int *q = A(); // expected-warning {{temporary whose address is us

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-06-28 Thread Haojian Wu via cfe-commits
@@ -964,11 +966,26 @@ static bool pathOnlyInitializesGslPointer(IndirectLocalPath &Path) { return false; } -void checkExprLifetime(Sema &SemaRef, const InitializedEntity &Entity, +void checkExprLifetime(Sema &SemaRef, const CheckingEntity &CEntity, E

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-06-28 Thread Haojian Wu via cfe-commits
@@ -1053,16 +1072,23 @@ void checkExprLifetime(Sema &SemaRef, const InitializedEntity &Entity, if (pathContainsInit(Path)) return false; -SemaRef.Diag(DiagLoc, diag::warn_dangling_variable) -<< RK << !Entity.getParent() -<< Ex

[clang] [Clang][Sema] fix assertion failure about invalid conversion when calling lambda (PR #96431)

2024-06-28 Thread Zhikai Zeng via cfe-commits
https://github.com/Backl1ght updated https://github.com/llvm/llvm-project/pull/96431 >From ce317e4c2f1bca3e81b81ac8909c576b14a16a6b Mon Sep 17 00:00:00 2001 From: Backl1ght Date: Sun, 23 Jun 2024 21:44:03 +0800 Subject: [PATCH] fix --- clang/docs/ReleaseNotes.rst| 1 + clang/lib/Sema

[clang] a139f84 - [Clang][Sema] fix assertion failure about invalid conversion when calling lambda (#96431)

2024-06-28 Thread via cfe-commits
Author: Zhikai Zeng Date: 2024-06-28T22:28:20+08:00 New Revision: a139f8480f200a673e184b1a7d1907a3e16cca56 URL: https://github.com/llvm/llvm-project/commit/a139f8480f200a673e184b1a7d1907a3e16cca56 DIFF: https://github.com/llvm/llvm-project/commit/a139f8480f200a673e184b1a7d1907a3e16cca56.diff L

[clang] [Clang][Sema] fix assertion failure about invalid conversion when calling lambda (PR #96431)

2024-06-28 Thread Zhikai Zeng via cfe-commits
https://github.com/Backl1ght closed https://github.com/llvm/llvm-project/pull/96431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-06-28 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/96475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-06-28 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/96475 >From 97d1b80680112c3fa271501427a18273aed61dbe Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 24 Jun 2024 10:58:53 +0200 Subject: [PATCH 1/3] [clang] Extend the existing lifetimebound check for assignments.

[clang] [Clang] improve RewriteModernObjC code quality by using const reference for function parameters (PR #93252)

2024-06-28 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/93252 >From d160eb6c869d41ac64ff27442d2f8d964beb3ebf Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 24 May 2024 01:39:35 +0300 Subject: [PATCH] [Clang] improve RewriteModernObjC code quality by using const r

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-06-28 Thread Haojian Wu via cfe-commits
hokein wrote: > You can also add "Fixes: #54492" to description to close this bug as this > only asks for pointer type support > > Please also add release notes. Done. https://github.com/llvm/llvm-project/pull/96475 ___ cfe-commits mailing list cfe

[clang] [Clang] use const references for function parameters in operator== and operator!= overloads in Redeclarable.h (PR #92963)

2024-06-28 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/92963 >From c94e7cbe04c0f23094a7f2a3d2a7cbd103750301 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Tue, 21 May 2024 22:56:06 +0300 Subject: [PATCH] [Clang] use const references for function parameters in operato

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-openmp @llvm/pr-subscribers-clang Author: Gheorghe-Teodor Bercea (doru1004) Changes This patch fixes the dynamic schedule tracking. --- Patch is 788.34 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/97

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-06-28 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. LGTM, with a nit. https://github.com/llvm/llvm-project/pull/96475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-06-28 Thread Gábor Horváth via cfe-commits
@@ -964,17 +966,34 @@ static bool pathOnlyInitializesGslPointer(IndirectLocalPath &Path) { return false; } -void checkExprLifetime(Sema &SemaRef, const InitializedEntity &Entity, +void checkExprLifetime(Sema &SemaRef, const CheckingEntity &CEntity, Xazax-hu

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-06-28 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/96475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 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 0f61ba679fa1942397c8d2661f3339c305cc101b 49e25086ca66074df97bd0f717783695eccf4bda --e

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/96992 >From cf22a4be007f7e6fdc6e4c17c1f32fa70440b123 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Wed, 26 Jun 2024 13:02:31 -0700 Subject: [PATCH 1/2] [clang] Implement function pointer type discrimination Giv

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak ready_for_review https://github.com/llvm/llvm-project/pull/96992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Fix use-after-free in header serialization (PR #96356)

2024-06-28 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: > My main concern with this approach is I'm not sure that after fixing the > memory issue we don't have a remaining logic bug. Because we are still > modifying `ModuleMap::Headers` during `ASTWriter::WriteHeaderSearch` > iteration and that looks suspicious. Need to think ho

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang Author: Akira Hatanaka (ahatanak) Changes Give users an option to sign a function pointer using a non-zero discrimiantor based on the type of the destination. --- Patch is 32.79 KiB, truncated to 20.00 KiB belo

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -4228,6 +4228,8 @@ defm ptrauth_vtable_pointer_address_discrimination : defm ptrauth_vtable_pointer_type_discrimination : OptInCC1FFlag<"ptrauth-vtable-pointer-type-discrimination", "Enable type discrimination of vtable pointers">; defm ptrauth_init_fini : OptInCC1FFlag<"

[clang] [clang] Implement function pointer type discrimination (PR #96992)

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

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 approved this pull request. LGTM with minor mostly cosmetic comments. I'm OK with fixing them in a separate PR if it's too time-consuming now. https://github.com/llvm/llvm-project/pull/96992 ___ cfe-commits mailing list cfe

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -1283,6 +1283,9 @@ class ASTContext : public RefCountedBase { uint16_t getPointerAuthVTablePointerDiscriminator(const CXXRecordDecl *RD); + /// Return the "other" type-specific discriminator for the given type. + uint16_t getPointerAuthTypeDiscriminator(QualType T); -

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -2220,6 +2220,11 @@ llvm::Constant *ConstantLValueEmitter::emitPointerAuthPointer(const Expr *E) { // The assertions here are all checked by Sema. assert(Result.Val.isLValue()); + auto *Base = Result.Val.getLValueBase().get(); kovdan01 wrote: nit ```

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -3140,6 +3140,269 @@ ASTContext::getPointerAuthVTablePointerDiscriminator(const CXXRecordDecl *RD) { return llvm::getPointerAuthStableSipHash(Str); } +/// Encode a function type for use in the discriminator of a function pointer +/// type. We can't use the itanium scheme

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -470,6 +470,9 @@ ENUM_LANGOPT(StrictFlexArraysLevel, StrictFlexArraysLevelKind, 2, COMPATIBLE_VALUE_LANGOPT(MaxTokens, 32, 0, "Max number of tokens per TU or 0") +BENIGN_LANGOPT(FunctionPointerTypeDiscrimination, 1, 0, kovdan01 wrote: Can we use `LANGOPT

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -3140,6 +3140,269 @@ ASTContext::getPointerAuthVTablePointerDiscriminator(const CXXRecordDecl *RD) { return llvm::getPointerAuthStableSipHash(Str); } +/// Encode a function type for use in the discriminator of a function pointer +/// type. We can't use the itanium scheme

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -5,55 +5,65 @@ // RUN: -fptrauth-vtable-pointer-address-discrimination \ // RUN: -fptrauth-vtable-pointer-type-discrimination \ // RUN: -fptrauth-init-fini | \ -// RUN: FileCheck %s --check-prefixes=INTRIN,CALLS,RETS,VPTR_ADDR_DISCR,VPTR_TYPE_DISCR,INITFINI +// RUN:

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -3140,6 +3140,269 @@ ASTContext::getPointerAuthVTablePointerDiscriminator(const CXXRecordDecl *RD) { return llvm::getPointerAuthStableSipHash(Str); } +/// Encode a function type for use in the discriminator of a function pointer +/// type. We can't use the itanium scheme

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -2220,6 +2220,11 @@ llvm::Constant *ConstantLValueEmitter::emitPointerAuthPointer(const Expr *E) { // The assertions here are all checked by Sema. assert(Result.Val.isLValue()); + auto *Base = Result.Val.getLValueBase().get(); + if (auto *Decl = dyn_cast_or_null(Base

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -3140,6 +3140,269 @@ ASTContext::getPointerAuthVTablePointerDiscriminator(const CXXRecordDecl *RD) { return llvm::getPointerAuthStableSipHash(Str); } +/// Encode a function type for use in the discriminator of a function pointer +/// type. We can't use the itanium scheme

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -4779,6 +4783,9 @@ bool CompilerInvocation::CreateFromArgsImpl( if (Res.getFrontendOpts().ProgramAction == frontend::RewriteObjC) LangOpts.ObjCExceptions = 1; + LangOpts.FunctionPointerTypeDiscrimination = kovdan01 wrote: Can we move this to `ParseP

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -15,6 +15,7 @@ #include "CodeGenModule.h" #include "clang/CodeGen/CodeGenABITypes.h" #include "clang/CodeGen/ConstantInitBuilder.h" +#include "llvm/Analysis/ValueTracking.h" kovdan01 wrote: Is this include needed? https://github.com/llvm/llvm-project/pull/

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -470,6 +470,9 @@ ENUM_LANGOPT(StrictFlexArraysLevel, StrictFlexArraysLevelKind, 2, COMPATIBLE_VALUE_LANGOPT(MaxTokens, 32, 0, "Max number of tokens per TU or 0") +BENIGN_LANGOPT(PointerAuthFunctionTypeDiscrimination, 1, 0, kovdan01 wrote: Can we use `LAN

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -3140,6 +3140,269 @@ ASTContext::getPointerAuthVTablePointerDiscriminator(const CXXRecordDecl *RD) { return llvm::getPointerAuthStableSipHash(Str); } +/// Encode a function type for use in the discriminator of a function pointer +/// type. We can't use the itanium scheme

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 commented: Could you provide a more descriptive summary? I thought we discussed that the dynamic support would just use the static scheduler, but this seems to implement it? I personally don't want to see more things in the OpenMP runtime relying on `malloc` if we ca

[clang] [clang][FMV] Do not omit explicit default target_version attribute. (PR #96628)

2024-06-28 Thread Tomas Matheson via cfe-commits
@@ -11465,6 +11465,10 @@ static bool CheckMultiVersionFirstFunction(Sema &S, FunctionDecl *FD) { // otherwise it is treated as a normal function. if (TA && !TA->isDefaultVersion()) return false; + // The target_version attribute only causes Multiversioning if this +

[clang] [clang][FMV] Do not omit explicit default target_version attribute. (PR #96628)

2024-06-28 Thread Tomas Matheson via cfe-commits
@@ -11523,10 +11525,17 @@ static bool CheckTargetCausesMultiVersioning(Sema &S, FunctionDecl *OldFD, const auto *OldTVA = OldFD->getAttr(); // If the old decl is NOT MultiVersioned yet, and we don't cause that // to change, this is a simple redeclaration. - if ((NewTA &

[clang] [clang][FMV] Do not omit explicit default target_version attribute. (PR #96628)

2024-06-28 Thread Tomas Matheson via cfe-commits
@@ -11576,22 +11584,6 @@ static bool CheckTargetCausesMultiVersioning(Sema &S, FunctionDecl *OldFD, } } - if (NewTVA) { tmatheson-arm wrote: If you are reasoning based on that, it might be good to add an assert checking it: ``` assert(!OldTVA || OldT

[clang] [clang][FMV] Do not omit explicit default target_version attribute. (PR #96628)

2024-06-28 Thread Tomas Matheson via cfe-commits
@@ -11523,10 +11525,17 @@ static bool CheckTargetCausesMultiVersioning(Sema &S, FunctionDecl *OldFD, const auto *OldTVA = OldFD->getAttr(); // If the old decl is NOT MultiVersioned yet, and we don't cause that // to change, this is a simple redeclaration. - if ((NewTA &

[clang] [clang][FMV] Do not omit explicit default target_version attribute. (PR #96628)

2024-06-28 Thread Tomas Matheson via cfe-commits
@@ -11947,24 +11939,8 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, FunctionDecl *OldFD = OldDecl->getAsFunction(); - if (!OldFD->isMultiVersion() && MVKind == MultiVersionKind::None) { -if (NewTVA || !OldFD->getAttr()) - return false; -

[clang] [clang-repl] Fix RuntimeInterfaceBuilder for 32-bit systems (PR #97071)

2024-06-28 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail created https://github.com/llvm/llvm-project/pull/97071 When generating runtime interface bindings, extend integral types to the native register size rather than 64-bit per se From ca2ab5f9e3470e87923c7b950b7b06e5ff21119e Mon Sep 17 00:00:00 2001 From: =?UTF-8

[clang] [clang-repl] Fix RuntimeInterfaceBuilder for 32-bit systems (PR #97071)

2024-06-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Stefan Gränitz (weliveindetail) Changes When generating runtime interface bindings, extend integral types to the native register size rather than 64-bit per se --- Full diff: https://github.com/llvm/llvm-project/pull/97071.diff 1 Files

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Gheorghe-Teodor Bercea via cfe-commits
doru1004 wrote: > Could you provide a more descriptive summary? > > I thought we discussed that the dynamic support would just use the static > scheduler, but this seems to implement it? I personally don't want to see > more things in the OpenMP runtime relying on `malloc` if we can avoid it.

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Malloc cannot be helped here if we want to have correctness. Currently it is > just broken and not even runnable. I figured that all this code would go away if we just made all schedules static. https://github.com/llvm/llvm-project/pull/97065 __

[clang] [OpenMP] [NFC] SemaOpenMP.cpp and StmtOpenMP.cpp spelling fixes (PR #96814)

2024-06-28 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm edited https://github.com/llvm/llvm-project/pull/96814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-06-28 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 approved this pull request. Thanks. LGTM. https://github.com/llvm/llvm-project/pull/96475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Extend -Wnonportable-include-path with a warning about trailing whitespace or dots (PR #96960)

2024-06-28 Thread Tobias Mayer via cfe-commits
@@ -361,7 +361,11 @@ class NonportablePath : Warning< "non-portable path to file '%0'; specified path differs in case from file" " name on disk">; def pp_nonportable_path : NonportablePath, - InGroup>; + InGroup; +def pp_nonportable_path_trailing_whitespace : Warning< +

[clang] [OpenMP] [NFC] SemaOpenMP.cpp and StmtOpenMP.cpp spelling fixes (PR #96814)

2024-06-28 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm approved this pull request. This looks good to me and should be NFC. https://github.com/llvm/llvm-project/pull/96814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [clang-repl] Fix unboxing of va_args Value on 32-bit ARM (#94994) (PR #96900)

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

[clang] [clang-repl] Fix unboxing of va_args Value on 32-bit ARM (#94994) (PR #96900)

2024-06-28 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: Superseded by https://github.com/llvm/llvm-project/pull/97071 https://github.com/llvm/llvm-project/pull/96900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Shilei Tian via cfe-commits
@@ -444,32 +444,81 @@ template struct omptarget_nvptx_LoopSupport { // KMP interface implementation (dyn loops) -// TODO: This is a stopgap. We probably want to expand the dispatch API to take

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Shilei Tian via cfe-commits
@@ -444,32 +444,81 @@ template struct omptarget_nvptx_LoopSupport { // KMP interface implementation (dyn loops) -// TODO: This is a stopgap. We probably want to expand the dispatch API to take

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -444,32 +444,81 @@ template struct omptarget_nvptx_LoopSupport { // KMP interface implementation (dyn loops) -// TODO: This is a stopgap. We probably want to expand the dispatch API to take

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -444,32 +444,81 @@ template struct omptarget_nvptx_LoopSupport { // KMP interface implementation (dyn loops) -// TODO: This is a stopgap. We probably want to expand the dispatch API to take

[clang] Extend -Wnonportable-include-path with a warning about trailing whitespace or dots (PR #96960)

2024-06-28 Thread Tobias Mayer via cfe-commits
@@ -0,0 +1,11 @@ +// REQUIRES: case-insensitive-filesystem tobias-mayer wrote: I wasn't sure about this but I think I could remove that. The behavior should be as follows: - Linux: You get the new warning and a file not found error. - Windows: You only get the ne

[clang] 5fd2af3 - [PGO][OpenMP] Instrumentation for GPU devices (#76587)

2024-06-28 Thread via cfe-commits
Author: Ethan Luis McDonough Date: 2024-06-28T10:42:19-05:00 New Revision: 5fd2af38e461445c583d7ffc2fe23858966eee76 URL: https://github.com/llvm/llvm-project/commit/5fd2af38e461445c583d7ffc2fe23858966eee76 DIFF: https://github.com/llvm/llvm-project/commit/5fd2af38e461445c583d7ffc2fe23858966eee7

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-06-28 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough closed https://github.com/llvm/llvm-project/pull/76587 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Improve PointerSubChecker (PR #96501)

2024-06-28 Thread Balázs Kéri via cfe-commits
balazske wrote: Even protobuf contains this type of code: https://codechecker-demo.eastus.cloudapp.azure.com/Default/report-detail?run=protobuf_v3.13.0_pointersub1&is-unique=on&diff-type=New&checker-name=alpha.core.PointerSub&report-id=5545776&report-hash=1bcd310fbaeccbcc13645b9b277239a2&report-f

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Shilei Tian via cfe-commits
@@ -34,6 +34,7 @@ inititializeRuntime(bool IsSPMD, KernelEnvironmentTy &KernelEnvironment, mapping::init(IsSPMD); state::init(IsSPMD, KernelEnvironment, KernelLaunchEnvironment); allocator::init(IsSPMD, KernelEnvironment); + __init_thread_dst(); shiltia

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Shilei Tian via cfe-commits
@@ -359,6 +359,10 @@ int32_t __kmpc_cancel(IdentTy *Loc, int32_t TId, int32_t CancelVal); ///{ int32_t __kmpc_shuffle_int32(int32_t val, int16_t delta, int16_t size); int64_t __kmpc_shuffle_int64(int64_t val, int16_t delta, int16_t size); + +/// Manage dynamic schedule data st

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Shilei Tian via cfe-commits
@@ -444,32 +444,81 @@ template struct omptarget_nvptx_LoopSupport { // KMP interface implementation (dyn loops) -// TODO: This is a stopgap. We probably want to expand the dispatch API to take

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Shilei Tian via cfe-commits
@@ -444,32 +444,81 @@ template struct omptarget_nvptx_LoopSupport { // KMP interface implementation (dyn loops) -// TODO: This is a stopgap. We probably want to expand the dispatch API to take

[clang] 061e3aa - [clang] require arg list in type specifiers using template kw (#94674)

2024-06-28 Thread via cfe-commits
Author: Erick Velez Date: 2024-06-28T08:49:46-07:00 New Revision: 061e3aa08e35d2714f8bcda87aacf08e9e21771b URL: https://github.com/llvm/llvm-project/commit/061e3aa08e35d2714f8bcda87aacf08e9e21771b DIFF: https://github.com/llvm/llvm-project/commit/061e3aa08e35d2714f8bcda87aacf08e9e21771b.diff L

[clang] [clang] require arg list in type specifiers using template kw (PR #94674)

2024-06-28 Thread Erick Velez via cfe-commits
https://github.com/evelez7 closed https://github.com/llvm/llvm-project/pull/94674 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -444,32 +444,81 @@ template struct omptarget_nvptx_LoopSupport { // KMP interface implementation (dyn loops) -// TODO: This is a stopgap. We probably want to expand the dispatch API to take

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-06-28 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime` running on `omp-vega20-0` while building `clang,llvm,offload` at step 7 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/30/builds/934 Here is

[clang] [clang] Default to -fno-sized-deallocation for AIX (PR #97076)

2024-06-28 Thread Xing Xue via cfe-commits
https://github.com/xingxue-ibm created https://github.com/llvm/llvm-project/pull/97076 Some `libc++` LIT test cases and user code define their own version of `operator delete` that are not sized. With `-fno-sized-deallocation`, destructors call the non-sized `operator delete` and it will be re

[clang] [clang] Default to -fno-sized-deallocation for AIX (PR #97076)

2024-06-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Xing Xue (xingxue-ibm) Changes Some `libc++` LIT test cases and user code define their own version of `operator delete` that are not sized. With `-fno-sized-deallocation`, destructors call the non-sized `operator delete` and it will be re

[clang] [clang][analyzer] MmapWriteExecChecker improvements (PR #97078)

2024-06-28 Thread Balázs Kéri via cfe-commits
https://github.com/balazske created https://github.com/llvm/llvm-project/pull/97078 Read the 'mmap' flags from macro values and use a better test for the error situation. From 1f04ce794a3aefc0f5622a9dea0a92a1e2b50be9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Tue

[clang] [clang][analyzer] MmapWriteExecChecker improvements (PR #97078)

2024-06-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Balázs Kéri (balazske) Changes Read the 'mmap' flags from macro values and use a better test for the error situation. --- Full diff: https://github.com/llvm/llvm-project/pull/97078.diff 2 Files Affected: - (modified) clang/lib/StaticAn

<    1   2   3   4   5   >