[clang] [analyzer] `canReasonAbout` does not support `nonloc::LazyCompoundVal` (PR #87521)

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

[clang] [analyzer] `canReasonAbout` does not support `nonloc::LazyCompoundVal` (PR #87521)

2024-04-13 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_analyze_cc1 %s \ steakhal wrote: I think you should put this test without the RUN lines into the `clang/test/Analysis/invalidated-iterator.cpp` to have them at one place. https://github.com/llvm/llvm-project/pull/87521

[clang] [analyzer] `canReasonAbout` does not support `nonloc::LazyCompoundVal` (PR #87521)

2024-04-13 Thread Balazs Benics via cfe-commits
@@ -57,10 +57,14 @@ ProgramStateRef SimpleConstraintManager::assumeAux(ProgramStateRef State, // We cannot reason about SymSymExprs, and can only reason about some // SymIntExprs. if (!canReasonAbout(Cond)) { -// Just add the constraint to the expression without

[clang] [analyzer] `canReasonAbout` does not support `nonloc::LazyCompoundVal` (PR #87521)

2024-04-13 Thread Balazs Benics via cfe-commits
@@ -2836,6 +2836,10 @@ bool RangeConstraintManager::canReasonAbout(SVal X) const { return false; } + // Non-integer types are not supported. + if (X.getAs()) +return false; + steakhal wrote: My problem with this is that I think LCVs shouldn't

[clang] [analyzer] `canReasonAbout` does not support `nonloc::LazyCompoundVal` (PR #87521)

2024-04-13 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_analyze_cc1 %s \ +// RUN: -analyzer-checker=alpha.cplusplus.InvalidatedIterator \ +// RUN: -analyzer-config aggressive-binary-operation-simplification=true \ +// RUN: 2>&1 + +struct node {}; +struct prop : node {}; +struct bitvec : node { +

[clang] [analyzer] `canReasonAbout` does not support `nonloc::LazyCompoundVal` (PR #87521)

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

[clang] [analyzer] `canReasonAbout` does not support `nonloc::LazyCompoundVal` (PR #87521)

2024-04-10 Thread Andrew V. Teylu via cfe-commits
aytey wrote: @steakhal @haoNoQ how's this looking to you? anything further for me to do? https://github.com/llvm/llvm-project/pull/87521 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [analyzer] `canReasonAbout` does not support `nonloc::LazyCompoundVal` (PR #87521)

2024-04-10 Thread Andrew V. Teylu via cfe-commits
https://github.com/aytey updated https://github.com/llvm/llvm-project/pull/87521 >From 1f70839ea1607f151c9f7eb390fcb974b32a54ca Mon Sep 17 00:00:00 2001 From: "Andrew V. Teylu" Date: Wed, 3 Apr 2024 17:18:08 +0100 Subject: [PATCH 1/3] [analyzer] `canReasonAbout` does not support

[clang] [analyzer] `canReasonAbout` does not support `nonloc::LazyCompoundVal` (PR #87521)

2024-04-08 Thread Andrew V. Teylu via cfe-commits
https://github.com/aytey updated https://github.com/llvm/llvm-project/pull/87521 >From 1f70839ea1607f151c9f7eb390fcb974b32a54ca Mon Sep 17 00:00:00 2001 From: "Andrew V. Teylu" Date: Wed, 3 Apr 2024 17:18:08 +0100 Subject: [PATCH 1/3] [analyzer] `canReasonAbout` does not support

[clang] [analyzer] `canReasonAbout` does not support `nonloc::LazyCompoundVal` (PR #87521)

2024-04-05 Thread Andrew V. Teylu via cfe-commits
https://github.com/aytey updated https://github.com/llvm/llvm-project/pull/87521 >From 1f70839ea1607f151c9f7eb390fcb974b32a54ca Mon Sep 17 00:00:00 2001 From: "Andrew V. Teylu" Date: Wed, 3 Apr 2024 17:18:08 +0100 Subject: [PATCH 1/3] [analyzer] `canReasonAbout` does not support

[clang] [analyzer] `canReasonAbout` does not support `nonloc::LazyCompoundVal` (PR #87521)

2024-04-05 Thread Andrew V. Teylu via cfe-commits
aytey wrote: > I suspect that you're loading checkers as clang plugins and one of them is > causing it. So here's how I'm invoking `clang` for those crashes: * `./bin/clang -cc1 -analyze -analyzer-checker=nullability.NullPassedToNonnull -analyzer-config

[clang] [analyzer] `canReasonAbout` does not support `nonloc::LazyCompoundVal` (PR #87521)

2024-04-05 Thread Andrew V. Teylu via cfe-commits
https://github.com/aytey updated https://github.com/llvm/llvm-project/pull/87521 >From 1f70839ea1607f151c9f7eb390fcb974b32a54ca Mon Sep 17 00:00:00 2001 From: "Andrew V. Teylu" Date: Wed, 3 Apr 2024 17:18:08 +0100 Subject: [PATCH] [analyzer] `canReasonAbout` does not support

[clang] [analyzer] `canReasonAbout` does not support `nonloc::LazyCompoundVal` (PR #87521)

2024-04-05 Thread Andrew V. Teylu via cfe-commits
@@ -0,0 +1,17 @@ +// REQUIRES: crash-recovery, asserts aytey wrote: Actually, that's a good point. I added that bit because the only way I can *guarantee* it will crash (with main) is if we have asserts on. I'll remove this, but if someone wants to check the

[clang] [analyzer] `canReasonAbout` does not support `nonloc::LazyCompoundVal` (PR #87521)

2024-04-04 Thread Artem Dergachev via cfe-commits
haoNoQ wrote: > Here's the traceback for the second set: The constraint manager doesn't even exist yet at the moment of time represented by this backtrace. There's something else going on. I suspect that you're loading checkers as clang plugins and one of them is causing it.

[clang] [analyzer] `canReasonAbout` does not support `nonloc::LazyCompoundVal` (PR #87521)

2024-04-04 Thread Artem Dergachev via cfe-commits
@@ -0,0 +1,17 @@ +// REQUIRES: crash-recovery, asserts haoNoQ wrote: You probably don't need this. There's no need to disable a perfectly normal test just because it didn't crash before the patch in that configuration. It's still nice to know that it doesn't