[clang] [libclang/python] Fix get_exception_specification_kind (PR #101548)

2024-08-02 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/101548 >From e7e66f0f90d7fb9adf3d3f546becd87c7527fa4c Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Thu, 1 Aug 2024 20:01:34 +0100 Subject: [PATCH 1/2] [libclang/python] Fix get_exception_specification_kind

[clang] [libclang/python] Fix get_exception_specification_kind (PR #101548)

2024-08-02 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: I can't think of any more genereal approach that prevents this sort of problem. Type checking would help with this (e.g. giving an error when an unknown attribute is called on an object) though it wouldn't have worked in this specific case... otherwise nothing to do but add

[clang] [compiler-rt] [llvm] Reland "[X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (#101452)" (PR #101616)

2024-08-02 Thread Shengchen Kan via cfe-commits
@@ -223,6 +227,10 @@ InstructionContext RecognizableInstr::insnContext() const { insnContext = EVEX_KB_U(IC_EVEX_XD); else if (OpPrefix == X86Local::PS) insnContext = EVEX_KB_U(IC_EVEX); +else { + errs() << "Instruction does not use

[clang] [clang] Support -Wa, options -mmsa and -mno-msa (PR #99615)

2024-08-02 Thread via cfe-commits
@@ -5337,7 +5337,9 @@ def mmadd4 : Flag<["-"], "mmadd4">, Group, def mno_madd4 : Flag<["-"], "mno-madd4">, Group, HelpText<"Disable the generation of 4-operand madd.s, madd.d and related instructions.">; def mmsa : Flag<["-"], "mmsa">, Group, - HelpText<"Enable MSA ASE (MI

[clang] [clang] Support -Wa, options -mmsa and -mno-msa (PR #99615)

2024-08-02 Thread via cfe-commits
yingopq wrote: > Can you add driver tests? `#97378` `-Wa,--crel` is a good example. OK, Thanks. https://github.com/llvm/llvm-project/pull/99615 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] Fixing Clang HIP inconsistent order for template functions (PR #101627)

2024-08-02 Thread via cfe-commits
https://github.com/Ritanya-B-Bharadwaj created https://github.com/llvm/llvm-project/pull/101627 Fixing the issue - [#101458 ](https://github.com/llvm/llvm-project/issues/101458) As mentioned in the issue, the order of the functions in the asm output from clang is non-deterministic. Here is the

[clang] Fixing Clang HIP inconsistent order for template functions (PR #101627)

2024-08-02 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] Fixing Clang HIP inconsistent order for template functions (PR #101627)

2024-08-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Ritanya-B-Bharadwaj) Changes Fixing the issue - [#101458 ](https://github.com/llvm/llvm-project/issues/101458) As mentioned in the issue, the order of the functions in the asm output from clang is non-deterministic. Here is the repr

[clang] [clang] Fixing Clang HIP inconsistent order for template functions (PR #101627)

2024-08-02 Thread via cfe-commits
https://github.com/Ritanya-B-Bharadwaj edited https://github.com/llvm/llvm-project/pull/101627 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle parenthesized list in RemoveParentheses (PR #100852)

2024-08-02 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/100852 >From f06f3ab5e59217348e72179c9581be338efa8789 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 26 Jul 2024 19:17:33 -0700 Subject: [PATCH] [clang-format] Handle parenthesized list in RemoveParentheses Also, r

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2024-08-02 Thread Daniil Kovalev via cfe-commits
@@ -2196,6 +2196,58 @@ Value *ScalarExprEmitter::VisitInitListExpr(InitListExpr *E) { return V; } +static bool isDeclRefKnownNonNull(CodeGenFunction &CGF, const ValueDecl *D) { + return !D->isWeak(); +} + +static bool isLValueKnownNonNull(CodeGenFunction &CGF, const Expr *

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2024-08-02 Thread Daniil Kovalev via cfe-commits
@@ -956,6 +956,25 @@ def err_ptrauth_indirect_goto_addrlabel_arithmetic : Error< "%select{subtraction|addition}0 of address-of-label expressions is not " "supported with ptrauth indirect gotos">; +// __ptrauth qualifier +def err_ptrauth_qualifier_invalid : Error< + "%sele

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2024-08-02 Thread Daniil Kovalev via cfe-commits
@@ -166,6 +193,92 @@ CGPointerAuthInfo CodeGenModule::getPointerAuthInfoForType(QualType T) { return ::getPointerAuthInfoForType(*this, T); } +static std::pair +emitLoadOfOrigPointerRValue(CodeGenFunction &CGF, const LValue &LV, +SourceLocation L

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2024-08-02 Thread Daniil Kovalev via cfe-commits
@@ -2190,6 +2198,15 @@ RValue CodeGenFunction::EmitLoadOfAnyValue(LValue LV, AggValueSlot Slot, /// method emits the address of the lvalue, then loads the result as an rvalue, /// returning the rvalue. RValue CodeGenFunction::EmitLoadOfLValue(LValue LV, SourceLocation Loc) { +

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2024-08-02 Thread Daniil Kovalev via cfe-commits
@@ -2196,6 +2196,58 @@ Value *ScalarExprEmitter::VisitInitListExpr(InitListExpr *E) { return V; } +static bool isDeclRefKnownNonNull(CodeGenFunction &CGF, const ValueDecl *D) { + return !D->isWeak(); +} + +static bool isLValueKnownNonNull(CodeGenFunction &CGF, const Expr *

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2024-08-02 Thread Daniil Kovalev via cfe-commits
@@ -166,6 +193,92 @@ CGPointerAuthInfo CodeGenModule::getPointerAuthInfoForType(QualType T) { return ::getPointerAuthInfoForType(*this, T); } +static std::pair +emitLoadOfOrigPointerRValue(CodeGenFunction &CGF, const LValue &LV, +SourceLocation L

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2024-08-02 Thread Daniil Kovalev via cfe-commits
@@ -2196,6 +2196,58 @@ Value *ScalarExprEmitter::VisitInitListExpr(InitListExpr *E) { return V; } +static bool isDeclRefKnownNonNull(CodeGenFunction &CGF, const ValueDecl *D) { + return !D->isWeak(); +} + +static bool isLValueKnownNonNull(CodeGenFunction &CGF, const Expr *

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2024-08-02 Thread Daniil Kovalev via cfe-commits
@@ -1460,6 +1467,12 @@ class QualType { return getQualifiers().getPointerAuth(); } + bool hasAddressDiscriminatedPointerAuth() const { +if (PointerAuthQualifier ptrauth = getPointerAuth()) kovdan01 wrote: Nit ```suggestion if (PointerAuthQuali

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2024-08-02 Thread Daniil Kovalev via cfe-commits
@@ -166,6 +193,92 @@ CGPointerAuthInfo CodeGenModule::getPointerAuthInfoForType(QualType T) { return ::getPointerAuthInfoForType(*this, T); } +static std::pair +emitLoadOfOrigPointerRValue(CodeGenFunction &CGF, const LValue &LV, +SourceLocation L

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2024-08-02 Thread Daniil Kovalev via cfe-commits
@@ -166,6 +193,92 @@ CGPointerAuthInfo CodeGenModule::getPointerAuthInfoForType(QualType T) { return ::getPointerAuthInfoForType(*this, T); } +static std::pair +emitLoadOfOrigPointerRValue(CodeGenFunction &CGF, const LValue &LV, +SourceLocation L

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-08-02 Thread Jeremy Bennett via cfe-commits
@@ -59,16 +59,26 @@ let TargetPrefix = "riscv" in { [IntrNoMem, IntrWillReturn, IntrSpeculatable, ImmArg>, ImmArg>]>; + def int_riscv_cv_alu_slet : ScalarCoreVAluGprGprIntrinsic; jeremybennett wrote: H

[clang] [compiler-rt] [llvm] [RISCV] Support new groupid/bitmask for cpu_model (PR #101632)

2024-08-02 Thread Piyou Chen via cfe-commits
https://github.com/BeMg created https://github.com/llvm/llvm-project/pull/101632 1. Add the new extension GroupID/Bitmask with latest hwprobe key. 2. Update the `initRISCVFeature ` 3. Update `EmitRISCVCpuSupports` due to not only group0 now. >From 91ebb0568f28015006e3443221ae51f92c159dfb Mon S

[clang] [compiler-rt] [llvm] [RISCV] Support new groupid/bitmask for cpu_model (PR #101632)

2024-08-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Piyou Chen (BeMg) Changes 1. Add the new extension GroupID/Bitmask with latest hwprobe key. 2. Update the `initRISCVFeature ` 3. Update `EmitRISCVCpuSupports` due to not only group0 now. --- Full diff: https://github.com/llvm/llv

[clang] [compiler-rt] [llvm] [RISCV] Support new groupid/bitmask for cpu_model (PR #101632)

2024-08-02 Thread Piyou Chen via cfe-commits
https://github.com/BeMg edited https://github.com/llvm/llvm-project/pull/101632 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Support `vrgather` and `vcompress` for `zvfhmin` and `zvfbfmin` (PR #101633)

2024-08-02 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat edited https://github.com/llvm/llvm-project/pull/101633 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86_64] Fix empty field error in vaarg of C++. (PR #90389)

2024-08-02 Thread Longsheng Mou via cfe-commits
https://github.com/CoTinker closed https://github.com/llvm/llvm-project/pull/90389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle parenthesized list in RemoveParentheses (PR #100852)

2024-08-02 Thread via cfe-commits
llvmbot wrote: Failed to cherry-pick: 9fa17fea3c2edb5903250b0da8f67861b81527b3 https://github.com/llvm/llvm-project/actions/runs/10212708496 Please manually backport the fix and push it to your github fork. Once this is done, please create a [pull request](https://github.com/llvm/llvm-proje

[clang] [Clang] Implement CWG2351 `void{}` (PR #78060)

2024-08-02 Thread Mital Ashok via cfe-commits
MitalAshok wrote: Ping @cor3ntin (This missed Clang 19 but could you merge it for Clang 20?) https://github.com/llvm/llvm-project/pull/78060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [X86_64] Fix empty field error in vaarg of C++. (PR #101639)

2024-08-02 Thread Longsheng Mou via cfe-commits
https://github.com/CoTinker created https://github.com/llvm/llvm-project/pull/101639 Such struct types: ``` struct { struct{} a; long long b; }; stuct { struct{} a; double b; }; ``` For such structures, Lo is NoClass and Hi is Integer/SSE. And when this structure argument is passed, th

[clang] [X86_64] Fix empty field error in vaarg of C++. (PR #101639)

2024-08-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-x86 Author: Longsheng Mou (CoTinker) Changes Such struct types: ``` struct { struct{} a; long long b; }; stuct { struct{} a; double b; }; ``` For such structures, Lo is NoClass and Hi is Integer/SSE. And when t

[clang] [clang][dataflow] Fix casting in `ChromiumCheckModel`. (PR #101640)

2024-08-02 Thread Pasquale Riello via cfe-commits
https://github.com/Pask00 created https://github.com/llvm/llvm-project/pull/101640 `getDirectCallee()` may return a null pointer if the callee is not a `FunctionDecl` (for example when using function pointers), this requires to use `dyn_cast_or_null` instead of `dyn_cast`. >From 7d1263ad9c72b

[clang] [clang][dataflow] Fix casting in `ChromiumCheckModel`. (PR #101640)

2024-08-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Pasquale Riello (Pask00) Changes `getDirectCallee()` may return a null pointer if the callee is not a `FunctionDecl` (for example when using function pointers), this requires to use `dyn_cast_or_null` instead of `dyn_cast`. --- Full diff

[clang] [analyzer] Restore recognition of mutex methods (PR #101511)

2024-08-02 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/101511 From 8700f803c5191e5bb266797e0d130ea27776101f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Thu, 1 Aug 2024 18:07:53 +0200 Subject: [PATCH 1/2] [analyzer] Restore recognition of mutex meth

[clang] [clang][dataflow] Fix casting in `ChromiumCheckModel`. (PR #101640)

2024-08-02 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 270f5e42b8daab586ffcd2b46ff41486199f6626 7d1263ad9c72b638d4624173b128d24b1a4317a1 --e

[clang] [Clang] Implement CWG2351 `void{}` (PR #78060)

2024-08-02 Thread via cfe-commits
cor3ntin wrote: @AaronBallman https://github.com/llvm/llvm-project/pull/78060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent assertion failure by avoiding required literal type checking in C context (PR #101426)

2024-08-02 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/101426 >From 314766a02c096bd5c867383b55e75451961af231 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 1 Aug 2024 13:00:04 +0300 Subject: [PATCH] [Clang] prevent assertion failure by avoiding required literal

[clang] [clang][dataflow] Fix casting in `ChromiumCheckModel`. (PR #101640)

2024-08-02 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/101640 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent assertion failure by avoiding required literal type checking in C context (PR #101426)

2024-08-02 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk deleted https://github.com/llvm/llvm-project/pull/101426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent assertion failure by avoiding required literal type checking in C context (PR #101426)

2024-08-02 Thread Oleksandr T. via cfe-commits
@@ -9267,14 +9267,14 @@ bool Sema::RequireLiteralType(SourceLocation Loc, QualType T, if (!RT) return true; - const CXXRecordDecl *RD = cast(RT->getDecl()); - // A partially-defined class type can't be a literal type, because a literal // class type must have a t

[clang] [clang][dataflow] Fix casting in `ChromiumCheckModel`. (PR #101640)

2024-08-02 Thread Pasquale Riello via cfe-commits
https://github.com/Pask00 updated https://github.com/llvm/llvm-project/pull/101640 >From 7d1263ad9c72b638d4624173b128d24b1a4317a1 Mon Sep 17 00:00:00 2001 From: Pasquale Riello Date: Fri, 2 Aug 2024 08:59:07 + Subject: [PATCH 1/2] [clang][dataflow] Fix casting in `ChromiumCheckModel`. `get

[clang] [RISCV][NFC] Remove unneeded defining name of `vundefined` (PR #101643)

2024-08-02 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat created https://github.com/llvm/llvm-project/pull/101643 `vundefined` doesn't have corresponding named IR, instead it generates `poison` value, we already define the `Name` for C intrinsics, so we don't need the defining name at all. >From df6b40a85ca89259751583b6642

[clang] [RISCV][NFC] Remove unneeded defining name of `vundefined` (PR #101643)

2024-08-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Brandon Wu (4vtomat) Changes `vundefined` doesn't have corresponding named IR, instead it generates `poison` value, we already define the `Name` for C intrinsics, so we don't need the defining name at all. --- Full diff: https://github.co

[clang] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-08-02 Thread via cfe-commits
https://github.com/SpencerAbson deleted https://github.com/llvm/llvm-project/pull/100278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CLANG][AArch64]Add Neon vectors for mfloat8_t (PR #99865)

2024-08-02 Thread via cfe-commits
https://github.com/CarolineConcatto edited https://github.com/llvm/llvm-project/pull/99865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Fix `get_exception_specification_kind` (PR #101548)

2024-08-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/101548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Fix `get_exception_specification_kind` (PR #101548)

2024-08-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. https://github.com/llvm/llvm-project/pull/101548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CLANG]Add Scalable vectors for mfloat8_t (PR #101644)

2024-08-02 Thread via cfe-commits
https://github.com/CarolineConcatto created https://github.com/llvm/llvm-project/pull/101644 This patch adds these new vector sizes for sve: svmfloat8_t According to the ARM ACLE PR#323[1]. [1] ARM-software/acle#323 >From de397fb733bfbbe6d8ca14773c02768239bf0a48 Mon Sep 17 00:00:00 2001

[clang-tools-extra] Create a new check to look for mis-use in calls that take iterators (PR #99917)

2024-08-02 Thread Nathan James via cfe-commits
https://github.com/njames93 updated https://github.com/llvm/llvm-project/pull/99917 >From d0cf6a5250f78d03eaf793035c58e3afc37e0788 Mon Sep 17 00:00:00 2001 From: Nathan James Date: Tue, 23 Jul 2024 10:59:45 +0100 Subject: [PATCH] Create a new check to look for mis-use in calls that take iterat

[clang] [CLANG]Add Scalable vectors for mfloat8_t (PR #101644)

2024-08-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: None (CarolineConcatto) Changes This patch adds these new vector sizes for sve: svmfloat8_t According to the ARM ACLE PR#323[1]. [1] ARM-software/acle#323 --- Patch is 57.30 KiB, truncated to 20.00 KiB below, full version:

[clang] [CLANG]Add Scalable vectors for mfloat8_t (PR #101644)

2024-08-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-debuginfo @llvm/pr-subscribers-clang Author: None (CarolineConcatto) Changes This patch adds these new vector sizes for sve: svmfloat8_t According to the ARM ACLE PR#323[1]. [1] ARM-software/acle#323 --- Patch is 57.30 KiB, truncated to 20.00 Ki

[clang] [clang][OpenMP] Diagnose badly-formed collapsed imperfect loop nests (#60678) (PR #101305)

2024-08-02 Thread Julian Brown via cfe-commits
https://github.com/jtb20 updated https://github.com/llvm/llvm-project/pull/101305 >From 0d9ee78eb214135b10ecb5258358728e0fc626e1 Mon Sep 17 00:00:00 2001 From: Julian Brown Date: Wed, 26 Jun 2024 11:21:01 -0500 Subject: [PATCH] [clang][OpenMP] Diagnose badly-formed collapsed imperfect loop nes

[clang] [RISCV][clang] Remove unused base type in `vfncvt` (PR #101646)

2024-08-02 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat created https://github.com/llvm/llvm-project/pull/101646 We don't have `fp8` type supported yet. >From ff5083431d41d22c50725638b084bfb2532dad74 Mon Sep 17 00:00:00 2001 From: Brandon Wu Date: Fri, 2 Aug 2024 03:04:18 -0700 Subject: [PATCH] [RISCV][clang] Remove unus

[clang] [RISCV][clang] Remove unused base type in `vfncvt` (PR #101646)

2024-08-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v @llvm/pr-subscribers-clang Author: Brandon Wu (4vtomat) Changes We don't have `fp8` type supported yet. --- Full diff: https://github.com/llvm/llvm-project/pull/101646.diff 1 Files Affected: - (modified) clang/include/clang/Basic/risc

[clang] [clang][Static analyzer] fix crash on using `bitcast(, )` as array subscript (PR #101647)

2024-08-02 Thread Pavel Skripkin via cfe-commits
https://github.com/pskrgag created https://github.com/llvm/llvm-project/pull/101647 Current CSA logic does not expect `LazyCompoundValKind` as array index. This may happen if array is used as subscript to another, in case of bitcast to integer type. Catch such cases and return `UnknownVal`,

[clang] [clang][Static analyzer] fix crash on using `bitcast(, )` as array subscript (PR #101647)

2024-08-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Pavel Skripkin (pskrgag) Changes Current CSA logic does not expect `LazyCompoundValKind` as array index. This may happen if array is used as subscript to another, in case of bitcast to integer type. Catch such cases and return `UnknownV

[clang] [clang][Static analyzer] fix crash on using `bitcast(, )` as array subscript (PR #101647)

2024-08-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Pavel Skripkin (pskrgag) Changes Current CSA logic does not expect `LazyCompoundValKind` as array index. This may happen if array is used as subscript to another, in case of bitcast to integer type. Catch such cases an

[clang] [llvm] [NVPTX] Support __usAtomicCAS builtin (PR #99646)

2024-08-02 Thread via cfe-commits
https://github.com/DenisGZM updated https://github.com/llvm/llvm-project/pull/99646 >From 0786e5bf48a5b638b99a666c282a5191e4a3c956 Mon Sep 17 00:00:00 2001 From: Denis Gerasimov Date: Fri, 19 Jul 2024 15:47:57 +0300 Subject: [PATCH 1/6] [NVPTX] Support __usAtomicCAS builtin --- clang/include/

[clang] [clang][OpenMP] Diagnose badly-formed collapsed imperfect loop nests (#60678) (PR #101305)

2024-08-02 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/101305 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV][NFC] Remove unneeded defining name of `vundefined` (PR #101643)

2024-08-02 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp commented: I don't think this will be better. We may keep these names so that these code can be self-explanatory. https://github.com/llvm/llvm-project/pull/101643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [RISCV][clang] Remove unused base type in `vfncvt` (PR #101646)

2024-08-02 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp approved this pull request. Make sense to me. (Do we have a way to test these generated builtins?) https://github.com/llvm/llvm-project/pull/101646 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [clang][Static analyzer] fix crash on using `bitcast(, )` as array subscript (PR #101647)

2024-08-02 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. https://github.com/llvm/llvm-project/pull/101647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Static analyzer] fix crash on using `bitcast(, )` as array subscript (PR #101647)

2024-08-02 Thread Balazs Benics via cfe-commits
@@ -30,3 +30,10 @@ void f3(void *dest) { void *src = __builtin_alloca(5); memcpy(dest, src, 1); // expected-warning{{2nd function call argument is a pointer to uninitialized value}} } + +// Reproduce crash from GH#94496. When array is used as subcript to another array, CS

[clang] [clang][Static analyzer] fix crash on using `bitcast(, )` as array subscript (PR #101647)

2024-08-02 Thread Balazs Benics via cfe-commits
@@ -472,7 +472,19 @@ SVal StoreManager::getLValueElement(QualType elementType, NonLoc Offset, const auto *ElemR = dyn_cast(BaseRegion); // Convert the offset to the appropriate size and signedness. - Offset = svalBuilder.convertToArrayIndex(Offset).castAs(); + auto Off

[clang] [clang][Static analyzer] fix crash on using `bitcast(, )` as array subscript (PR #101647)

2024-08-02 Thread Balazs Benics via cfe-commits
@@ -472,7 +472,19 @@ SVal StoreManager::getLValueElement(QualType elementType, NonLoc Offset, const auto *ElemR = dyn_cast(BaseRegion); // Convert the offset to the appropriate size and signedness. - Offset = svalBuilder.convertToArrayIndex(Offset).castAs(); + auto Off

[clang] [analyzer] Restore recognition of mutex methods (PR #101511)

2024-08-02 Thread Balazs Benics via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. Let's merge this, and backport it into clang-19. I'll deal with that. https://github.com/llvm/llvm-project/pull/101511 ___ cfe-commits maili

[clang] [clang][OpenMP] Diagnose badly-formed collapsed imperfect loop nests (#60678) (PR #101305)

2024-08-02 Thread Julian Brown via cfe-commits
jtb20 wrote: Thank you! I don't have commit access, so do you mind committing it for me please? https://github.com/llvm/llvm-project/pull/101305 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [libclang/python] Fix `get_exception_specification_kind` (PR #101548)

2024-08-02 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: Could you merge this for me? On related note, do you think my contributions would count for "a track record of submitting high quality patches", i.e. should I apply for commit access? https://github.com/llvm/llvm-project/pull/101548 _

[clang] 99ae2ed - [analyzer] Restore recognition of mutex methods (#101511)

2024-08-02 Thread via cfe-commits
Author: Donát Nagy Date: 2024-08-02T12:43:06+02:00 New Revision: 99ae2edc2592e602b0eb5a287f4d003aa3902440 URL: https://github.com/llvm/llvm-project/commit/99ae2edc2592e602b0eb5a287f4d003aa3902440 DIFF: https://github.com/llvm/llvm-project/commit/99ae2edc2592e602b0eb5a287f4d003aa3902440.diff LO

[clang] [analyzer] Restore recognition of mutex methods (PR #101511)

2024-08-02 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/101511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Remove unused arg (PR #101650)

2024-08-02 Thread Dmitry Chestnykh via cfe-commits
https://github.com/chestnykh created https://github.com/llvm/llvm-project/pull/101650 `BuiltinID` is not used inside `CheckBuiltinTargetInSupported` >From 0f724e3aacde40f5d3d06c3e1082667dec36656b Mon Sep 17 00:00:00 2001 From: Dmitry Chestnykh Date: Fri, 2 Aug 2024 13:44:00 +0300 Subject: [PAT

[clang] [NFC][Clang] Remove unused arg (PR #101650)

2024-08-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Dmitry Chestnykh (chestnykh) Changes `BuiltinID` is not used inside `CheckBuiltinTargetInSupported` --- Full diff: https://github.com/llvm/llvm-project/pull/101650.diff 1 Files Affected: - (modified) clang/lib/Sema/SemaChecking.cpp (+5-

[clang] [NFC][Clang] Remove unused arg (PR #101650)

2024-08-02 Thread Dmitry Chestnykh via cfe-commits
https://github.com/chestnykh updated https://github.com/llvm/llvm-project/pull/101650 >From 0f724e3aacde40f5d3d06c3e1082667dec36656b Mon Sep 17 00:00:00 2001 From: Dmitry Chestnykh Date: Fri, 2 Aug 2024 13:44:00 +0300 Subject: [PATCH 1/2] [NFC][Clang] Remove unused arg BuiltinID is not used in

[clang] [clang][Static analyzer] fix crash on using `bitcast(, )` as array subscript (PR #101647)

2024-08-02 Thread Pavel Skripkin via cfe-commits
@@ -472,7 +472,19 @@ SVal StoreManager::getLValueElement(QualType elementType, NonLoc Offset, const auto *ElemR = dyn_cast(BaseRegion); // Convert the offset to the appropriate size and signedness. - Offset = svalBuilder.convertToArrayIndex(Offset).castAs(); + auto Off

[clang] [analyzer] Restore recognition of mutex methods (PR #101511)

2024-08-02 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > Let's merge this, and backport it into clang-19. I'll deal with that. Thanks! https://github.com/llvm/llvm-project/pull/101511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [analyzer] Restore recognition of mutex methods (PR #101511)

2024-08-02 Thread Balazs Benics via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy Message-ID: In-Reply-To: steakhal wrote: Backport PR in https://github.com/llvm/llvm-project/pull/101651 https://github.com/llvm/llvm-project/pull/101511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [clang][ExprConst] allow single element access of vector object to be constant expression (PR #101126)

2024-08-02 Thread Vikram Hegde via cfe-commits
https://github.com/vikramRH updated https://github.com/llvm/llvm-project/pull/101126 >From 690901f2370381285afa7cf7c2f7401d89e568f6 Mon Sep 17 00:00:00 2001 From: Vikram Date: Mon, 29 Jul 2024 08:56:07 -0400 Subject: [PATCH 1/2] [clang][ExprConst] allow single element access of vector object t

[clang] [clang][Static analyzer] fix crash on using `bitcast(, )` as array subscript (PR #101647)

2024-08-02 Thread Pavel Skripkin via cfe-commits
@@ -30,3 +30,10 @@ void f3(void *dest) { void *src = __builtin_alloca(5); memcpy(dest, src, 1); // expected-warning{{2nd function call argument is a pointer to uninitialized value}} } + +// Reproduce crash from GH#94496. When array is used as subcript to another array, CS

[clang] [clang][Static analyzer] fix crash on using `bitcast(, )` as array subscript (PR #101647)

2024-08-02 Thread Pavel Skripkin via cfe-commits
https://github.com/pskrgag updated https://github.com/llvm/llvm-project/pull/101647 >From d94748f76ca793bf40cb57dd904d487c51bdcd40 Mon Sep 17 00:00:00 2001 From: Pavel Skripkin Date: Fri, 2 Aug 2024 12:02:11 +0300 Subject: [PATCH 1/3] clang/csa: fix crash on using bitcast(, ) as array subscrip

[clang] [clang][Static analyzer] fix crash on using `bitcast(, )` as array subscript (PR #101647)

2024-08-02 Thread Pavel Skripkin via cfe-commits
@@ -30,3 +30,10 @@ void f3(void *dest) { void *src = __builtin_alloca(5); memcpy(dest, src, 1); // expected-warning{{2nd function call argument is a pointer to uninitialized value}} } + +// Reproduce crash from GH#94496. When array is used as subcript to another array, CS

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-08-02 Thread via cfe-commits
https://github.com/ivanaivanovska updated https://github.com/llvm/llvm-project/pull/100985 >From d35544d971f073f98fba047cfcbe3cfe92dd78c4 Mon Sep 17 00:00:00 2001 From: Ivana Ivanovska Date: Mon, 29 Jul 2024 08:08:00 + Subject: [PATCH 1/4] Surface error for plain return statement in corouti

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-08-02 Thread via cfe-commits
@@ -684,6 +684,19 @@ bool Sema::checkFinalSuspendNoThrow(const Stmt *FinalSuspend) { return ThrowingDecls.empty(); } +// [stmt.return.coroutine]p1: +// A coroutine shall not enclose a return statement ([stmt.return]). +static void checkReturnStmtInCoroutine(Sema &S, Funct

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-08-02 Thread via cfe-commits
@@ -694,6 +707,9 @@ bool Sema::ActOnCoroutineBodyStart(Scope *SC, SourceLocation KWLoc, auto *ScopeInfo = getCurFunction(); assert(ScopeInfo->CoroutinePromise); + if (ScopeInfo->FirstCoroutineStmtLoc == KWLoc) ivanaivanovska wrote: Done. https://github

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-08-02 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov approved this pull request. Thanks! The changes LG, I'll wait until premerge checks finish and merge it into mainline. https://github.com/llvm/llvm-project/pull/100985 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-08-02 Thread Julian Brown via cfe-commits
https://github.com/jtb20 updated https://github.com/llvm/llvm-project/pull/92731 >From b3d00ab3f6457094a8ccf4df03b72976e96cd307 Mon Sep 17 00:00:00 2001 From: Julian Brown Date: Thu, 1 Aug 2024 14:49:28 -0500 Subject: [PATCH 1/8] [OpenMP][clang] Add 'holds' clause for 'omp assume' directive --

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-08-02 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov updated https://github.com/llvm/llvm-project/pull/100985 >From d35544d971f073f98fba047cfcbe3cfe92dd78c4 Mon Sep 17 00:00:00 2001 From: Ivana Ivanovska Date: Mon, 29 Jul 2024 08:08:00 + Subject: [PATCH 1/4] Surface error for plain return statement in coroutin

[clang] db1375f - Surface error for plain return statement in coroutine earlier (#100985)

2024-08-02 Thread via cfe-commits
Author: ivanaivanovska Date: 2024-08-02T13:49:11+02:00 New Revision: db1375f6d907f1af34c03b5174b7e0432f615d21 URL: https://github.com/llvm/llvm-project/commit/db1375f6d907f1af34c03b5174b7e0432f615d21 DIFF: https://github.com/llvm/llvm-project/commit/db1375f6d907f1af34c03b5174b7e0432f615d21.diff

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-08-02 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov closed https://github.com/llvm/llvm-project/pull/100985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-08-02 Thread via cfe-commits
github-actions[bot] wrote: @ivanaivanovska Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a

[clang] [llvm] [NVPTX] Support __usAtomicCAS builtin (PR #99646)

2024-08-02 Thread via cfe-commits
https://github.com/DenisGZM updated https://github.com/llvm/llvm-project/pull/99646 >From e2a39138a1e8a38a5c3f5c2a58cc8d009826c9a7 Mon Sep 17 00:00:00 2001 From: Denis Gerasimov Date: Fri, 19 Jul 2024 15:47:57 +0300 Subject: [PATCH 1/6] [NVPTX] Support __usAtomicCAS builtin --- clang/include/

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-08-02 Thread John Brawn via cfe-commits
https://github.com/john-brawn-arm milestoned https://github.com/llvm/llvm-project/pull/99335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-08-02 Thread John Brawn via cfe-commits
john-brawn-arm wrote: Sorry to pester you about this, but would it be possible to get this approved in time for LLVM19 RC2 on Monday? This is the last piece of GCS work and it would be nice to have it all in a single LLVM release. https://github.com/llvm/llvm-project/pull/99335 ___

[clang] [NFC][Clang] Remove unused arg (PR #101650)

2024-08-02 Thread Sergei Barannikov via cfe-commits
https://github.com/s-barannikov approved this pull request. https://github.com/llvm/llvm-project/pull/101650 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP] Diagnostic check for imperfect loop collapse (PR #96087)

2024-08-02 Thread Julian Brown via cfe-commits
jtb20 wrote: ping? https://github.com/llvm/llvm-project/pull/96087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Ofast deprecation clarifications (PR #101005)

2024-08-02 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, let's go ahead and merge this and get it backported to 19.x, thank you! https://github.com/llvm/llvm-project/pull/101005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] cb58294 - [C11] Claim conformance to WG14 N1396 (#101214)

2024-08-02 Thread via cfe-commits
Author: Aaron Ballman Date: 2024-08-02T08:17:40-04:00 New Revision: cb58294f86212aeff45f4a303767fcf4ac7d82ba URL: https://github.com/llvm/llvm-project/commit/cb58294f86212aeff45f4a303767fcf4ac7d82ba DIFF: https://github.com/llvm/llvm-project/commit/cb58294f86212aeff45f4a303767fcf4ac7d82ba.diff

[clang] [C11] Claim conformance to WG14 N1396 (PR #101214)

2024-08-02 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/101214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0fd980e - [NFC][Clang] Remove unused arg (#101650)

2024-08-02 Thread via cfe-commits
Author: Dmitry Chestnykh Date: 2024-08-02T15:24:49+03:00 New Revision: 0fd980e1dbed1018c77e7c7c258a08a5bca61955 URL: https://github.com/llvm/llvm-project/commit/0fd980e1dbed1018c77e7c7c258a08a5bca61955 DIFF: https://github.com/llvm/llvm-project/commit/0fd980e1dbed1018c77e7c7c258a08a5bca61955.di

[clang] [NFC][Clang] Remove unused arg (PR #101650)

2024-08-02 Thread Dmitry Chestnykh via cfe-commits
https://github.com/chestnykh closed https://github.com/llvm/llvm-project/pull/101650 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Ofast deprecation clarifications (PR #101005)

2024-08-02 Thread Sjoerd Meijer via cfe-commits
https://github.com/sjoerdmeijer closed https://github.com/llvm/llvm-project/pull/101005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Ofast deprecation clarifications (PR #101005)

2024-08-02 Thread Sjoerd Meijer via cfe-commits
sjoerdmeijer wrote: > LGTM, let's go ahead and merge this and get it backported to 19.x, thank you! Thanks for your help with this. I am mostly unfamiliar with the release process. Do you know how we can achieve this? Do we suggest this commit to the release manager for a backport and cherry

  1   2   3   4   5   >