[clang] Fix analyzer crash on 'StructuralValue' (PR #79764)

2024-01-30 Thread Balazs Benics via cfe-commits
steakhal wrote: > Thanks! Thanks for the quick workaround! FYI Backport proposed in issue #79992, that refers to PR #79997 actually doing the backport. https://github.com/llvm/llvm-project/pull/79764 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang] Fix analyzer crash on 'StructuralValue' (PR #79764)

2024-01-30 Thread Andrey Ali Khan Bolshakov via cfe-commits
bolshakov-a wrote: Thanks! https://github.com/llvm/llvm-project/pull/79764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix analyzer crash on 'StructuralValue' (PR #79764)

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

[clang] Fix analyzer crash on 'StructuralValue' (PR #79764)

2024-01-30 Thread Andrey Ali Khan Bolshakov via cfe-commits
bolshakov-a wrote: I'm just waiting for someone who would do it instead of me... I don't have commit access. https://github.com/llvm/llvm-project/pull/79764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] Fix analyzer crash on 'StructuralValue' (PR #79764)

2024-01-30 Thread Balazs Benics via cfe-commits
steakhal wrote: > Thanks! It would be great to get this landed as soon as possible to unbreak > trunk. (I believe we need it for the 18.x branch too?) I'll take care of the backport, after this PR is merged by @bolshakov-a https://github.com/llvm/llvm-project/pull/79764 ___

[clang] Fix analyzer crash on 'StructuralValue' (PR #79764)

2024-01-30 Thread via cfe-commits
zmodem wrote: Thanks! It would be great to get this landed as soon as possible to unbreak trunk. (I believe we need it for the 18.x branch too?) https://github.com/llvm/llvm-project/pull/79764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] Fix analyzer crash on 'StructuralValue' (PR #79764)

2024-01-29 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/79764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix analyzer crash on 'StructuralValue' (PR #79764)

2024-01-29 Thread Andrey Ali Khan Bolshakov via cfe-commits
https://github.com/bolshakov-a updated https://github.com/llvm/llvm-project/pull/79764 >From b3debeb88fdc3d50f257be56f3e60ae7bf83cc07 Mon Sep 17 00:00:00 2001 From: Bolshakov Date: Sun, 28 Jan 2024 21:12:10 +0300 Subject: [PATCH] Fix crashes on 'StructuralValue' `OpaqueValueExpr` doesn't neces

[clang] Fix analyzer crash on 'StructuralValue' (PR #79764)

2024-01-29 Thread via cfe-commits
zmodem wrote: > Shouldn't we add a regression test for the crash on that part too? +1 that would be good to have. https://github.com/llvm/llvm-project/pull/79764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] Fix analyzer crash on 'StructuralValue' (PR #79764)

2024-01-29 Thread Balazs Benics via cfe-commits
steakhal wrote: > LGTM for the Static Analyzer. Actually, the other hunk also makes sense. LGTM. https://github.com/llvm/llvm-project/pull/79764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] Fix analyzer crash on 'StructuralValue' (PR #79764)

2024-01-29 Thread Balazs Benics via cfe-commits
@@ -40,8 +40,12 @@ static const Expr *ignoreTransparentExprs(const Expr *E) { switch (E->getStmtClass()) { case Stmt::OpaqueValueExprClass: -E = cast(E)->getSourceExpr(); -break; +if (const clang::Expr *SE = cast(E)->getSourceExpr()) { + E = SE; + bre

[clang] Fix analyzer crash on 'StructuralValue' (PR #79764)

2024-01-29 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. LGTM for the Static Analyzer. Thanks for fixing this crash. https://github.com/llvm/llvm-project/pull/79764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] Fix analyzer crash on 'StructuralValue' (PR #79764)

2024-01-29 Thread Andrey Ali Khan Bolshakov via cfe-commits
https://github.com/bolshakov-a updated https://github.com/llvm/llvm-project/pull/79764 >From 474f86604c35bea7041bcf3e6f8e2103d180902f Mon Sep 17 00:00:00 2001 From: Bolshakov Date: Sun, 28 Jan 2024 21:12:10 +0300 Subject: [PATCH] Fix crashes on 'StructuralValue' `OpaqueValueExpr` doesn't neces

[clang] Fix analyzer crash on 'StructuralValue' (PR #79764)

2024-01-29 Thread Andrey Ali Khan Bolshakov via cfe-commits
@@ -40,8 +40,12 @@ static const Expr *ignoreTransparentExprs(const Expr *E) { switch (E->getStmtClass()) { case Stmt::OpaqueValueExprClass: -E = cast(E)->getSourceExpr(); -break; +if (const clang::Expr *SE = cast(E)->getSourceExpr()) { + E = SE; + bre

[clang] Fix analyzer crash on 'StructuralValue' (PR #79764)

2024-01-29 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. Approved with nits. This works around the crash. https://github.com/llvm/llvm-project/pull/79764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] Fix analyzer crash on 'StructuralValue' (PR #79764)

2024-01-29 Thread Balazs Benics via cfe-commits
@@ -40,8 +40,12 @@ static const Expr *ignoreTransparentExprs(const Expr *E) { switch (E->getStmtClass()) { case Stmt::OpaqueValueExprClass: -E = cast(E)->getSourceExpr(); -break; +if (const clang::Expr *SE = cast(E)->getSourceExpr()) { + E = SE; + bre

[clang] Fix analyzer crash on 'StructuralValue' (PR #79764)

2024-01-29 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/79764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix analyzer crash on 'StructuralValue' (PR #79764)

2024-01-29 Thread via cfe-commits
zmodem wrote: I think a similar fix may be needed in `clang::IgnoreParensSingleStep`, see my comment here: https://github.com/llvm/llvm-project/pull/78041#issuecomment-1914407300 https://github.com/llvm/llvm-project/pull/79764 ___ cfe-commits mailing

[clang] Fix analyzer crash on 'StructuralValue' (PR #79764)

2024-01-28 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/79764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix analyzer crash on 'StructuralValue' (PR #79764)

2024-01-28 Thread Andrey Ali Khan Bolshakov via cfe-commits
bolshakov-a wrote: @steakhal, @cor3ntin, @erichkeane https://github.com/llvm/llvm-project/pull/79764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix analyzer crash on 'StructuralValue' (PR #79764)

2024-01-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Andrey Ali Khan Bolshakov (bolshakov-a) Changes `OpaqueValueExpr` doesn't necessarily contain a source expression. Particularly, after #78041, it is used to carry the type and the value kind of a non-type template argume

[clang] Fix analyzer crash on 'StructuralValue' (PR #79764)

2024-01-28 Thread Andrey Ali Khan Bolshakov via cfe-commits
https://github.com/bolshakov-a created https://github.com/llvm/llvm-project/pull/79764 `OpaqueValueExpr` doesn't necessarily contain a source expression. Particularly, after #78041, it is used to carry the type and the value kind of a non-type template argument of floating-point type or referr