[clang] [analyzer] Fix stores through label locations (PR #89265)

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

[clang] [analyzer] Fix stores through label locations (PR #89265)

2024-04-19 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/89265 >From 50964bf4f694ae21c2ba86b648b241b335e5d6e8 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Thu, 18 Apr 2024 18:36:29 +0200 Subject: [PATCH 1/2] [analyzer] Fix stores through label locations

[clang] [analyzer] Fix stores through label locations (PR #89265)

2024-04-19 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/89265 >From 50964bf4f694ae21c2ba86b648b241b335e5d6e8 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Thu, 18 Apr 2024 18:36:29 +0200 Subject: [PATCH 1/2] [analyzer] Fix stores through label locations

[clang] [analyzer] Fix stores through label locations (PR #89265)

2024-04-19 Thread Balazs Benics via cfe-commits
@@ -2358,11 +2358,12 @@ StoreRef RegionStoreManager::killBinding(Store ST, Loc L) { RegionBindingsRef RegionStoreManager::bind(RegionBindingsConstRef B, Loc L, SVal V) { - if (L.getAs()) + // We only care about region locations. + auto MemRegVal = L.getAs(); + if

[clang] [analyzer] Fix stores through label locations (PR #89265)

2024-04-19 Thread via cfe-commits
https://github.com/NagyDonat approved this pull request. LGTM nice quickfix :) https://github.com/llvm/llvm-project/pull/89265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix stores through label locations (PR #89265)

2024-04-19 Thread via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/89265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix stores through label locations (PR #89265)

2024-04-19 Thread via cfe-commits
@@ -2358,11 +2358,12 @@ StoreRef RegionStoreManager::killBinding(Store ST, Loc L) { RegionBindingsRef RegionStoreManager::bind(RegionBindingsConstRef B, Loc L, SVal V) { - if (L.getAs()) + // We only care about region locations. + auto MemRegVal = L.getAs(); + if

[clang] [analyzer] Fix stores through label locations (PR #89265)

2024-04-18 Thread Balazs Benics via cfe-commits
steakhal wrote: #89264 Will implement a diagnostic for storing to label addresses. In this patch, I only focus on resolving the crash. https://github.com/llvm/llvm-project/pull/89265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [analyzer] Fix stores through label locations (PR #89265)

2024-04-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes Interestingly, this case crashed from the very beginning of the project, at least starting by clang-3. As a "fix" I just do the same thing as we do for concrete integers. It might not

[clang] [analyzer] Fix stores through label locations (PR #89265)

2024-04-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/89265 Interestingly, this case crashed from the very beginning of the project, at least starting by clang-3. As a "fix" I just do the same thing as we do for concrete integers. It might not be the best we could do,