[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-21 Thread Balazs Benics via cfe-commits
steakhal wrote: @NagyDonat Thank you for the excellent feedback. Great recommendations, with fixes. Thanks! All applied. https://github.com/llvm/llvm-project/pull/85211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

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

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-21 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/85211 >From bde85e0d145049a6661afba6f4585865c5630792 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Thu, 14 Mar 2024 12:38:12 +0100 Subject: [PATCH 1/4] [analyzer] Wrap SymbolicRegions by ElementRegions before

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-18 Thread via cfe-commits
@@ -226,6 +226,20 @@ ProgramStateRef ProgramState::killBinding(Loc LV) const { return makeWithStore(newStore); } +/// FieldRegions are expected to be wrapped by an ElementRegion as a canonical +/// representation. See f8643a9b31c4029942f67d4534c9139b45173504 why.

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-18 Thread via cfe-commits
@@ -226,6 +226,20 @@ ProgramStateRef ProgramState::killBinding(Loc LV) const { return makeWithStore(newStore); } +/// FieldRegions are expected to be wrapped by an ElementRegion as a canonical +/// representation. See f8643a9b31c4029942f67d4534c9139b45173504 why. +SVal

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-18 Thread via cfe-commits
https://github.com/NagyDonat approved this pull request. Thanks for the update! Unfortunately I have some additional minor remarks (sorry for not catching them in the first round). https://github.com/llvm/llvm-project/pull/85211 ___ cfe-commits

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

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

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/85211 >From bde85e0d145049a6661afba6f4585865c5630792 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Thu, 14 Mar 2024 12:38:12 +0100 Subject: [PATCH 1/3] [analyzer] Wrap SymbolicRegions by ElementRegions before

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-18 Thread Balazs Benics via cfe-commits
steakhal wrote: > I think it's good that we're moving towards establishing the invariant that > the parent of a FieldRegion should always be a typed value region (of a > suitable type) for the sake of consistency. Do I understand it correctly that > this is not too far away? Would it be

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-18 Thread Balazs Benics via cfe-commits
@@ -451,6 +451,38 @@ void ProgramState::setStore(const StoreRef ) { store = newStoreStore; } +/// FieldRegions are expected to be wrapped by an ElementRegion as a canonical +/// representation. See f8643a9b31c4029942f67d4534c9139b45173504 why. +static SVal

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/85211 >From bde85e0d145049a6661afba6f4585865c5630792 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Thu, 14 Mar 2024 12:38:12 +0100 Subject: [PATCH 1/2] [analyzer] Wrap SymbolicRegions by ElementRegions before

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-18 Thread via cfe-commits
@@ -451,6 +451,38 @@ void ProgramState::setStore(const StoreRef ) { store = newStoreStore; } +/// FieldRegions are expected to be wrapped by an ElementRegion as a canonical +/// representation. See f8643a9b31c4029942f67d4534c9139b45173504 why. +static SVal

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-18 Thread via cfe-commits
https://github.com/NagyDonat approved this pull request. Looks good overall, my only inline comment is a minor stylistic question. I think it's good that we're moving towards establishing the invariant that the parent of a FieldRegion should always be a typed value region (of a suitable type)

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

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

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes Inside the ExprEngine when we process the initializers, we create a PostInitializer program-point, which will refer to the field being initialized, see `FieldLoc` inside

[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

2024-03-14 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/85211 Inside the ExprEngine when we process the initializers, we create a PostInitializer program-point, which will refer to the field being initialized, see `FieldLoc` inside `ExprEngine::ProcessInitializer`. When