[clang] [clang][dataflow] Rewrite `getReferencedDecls()` with a `RecursiveASTVisitor`. (PR #93461)

2024-05-29 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand edited https://github.com/llvm/llvm-project/pull/93461 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Rewrite `getReferencedDecls()` with a `RecursiveASTVisitor`. (PR #93461)

2024-05-29 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/93461 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Fix crash when `operator=` result type is not destination type. (PR #90898)

2024-05-03 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/90898 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Don't propagate result objects in unevaluated contexts (reland #90438) (PR #91172)

2024-05-06 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/91172 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Strengthen pointer comparison. (PR #75170)

2024-05-06 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/75170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Add `reachedLimit()` to the `Solver` interface. (PR #91320)

2024-05-07 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/91320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Allow `DataflowAnalysisContext` to use a non-owned `Solver`. (PR #91316)

2024-05-07 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand edited https://github.com/llvm/llvm-project/pull/91316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Allow `DataflowAnalysisContext` to use a non-owned `Solver`. (PR #91316)

2024-05-07 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/91316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Allow `DataflowAnalysisContext` to use a non-owned `Solver`. (PR #91316)

2024-05-07 Thread Yitzhak Mandelbaum via cfe-commits
@@ -209,6 +221,9 @@ class DataflowAnalysisContext { using DenseMapInfo::isEqual; }; + DataflowAnalysisContext(Solver &S, std::unique_ptr OwnedSolver, ymand wrote: Please add comments either here or on the fields relating S and OwnedSolver. https://git

[clang] [clang][dataflow] Allow `DataflowAnalysisContext` to use a non-owned `Solver`. (PR #91316)

2024-05-07 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/91316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][dataflow] Make `SolverTest` a type-parameterized test. (PR #91455)

2024-05-08 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/91455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Fully support Environment construction for Stmt analysis. (PR #91616)

2024-05-10 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand commented: I think we can do this without resorting to a pointer union and templating of the initialization functions, but it will take a little refactoring. First, notice that `stmt` doesn't make sense for the CallStack. The call stack serves two purposes -- to avoid

[clang] [clang][dataflow] Fully support Environment construction for Stmt analysis. (PR #91616)

2024-05-10 Thread Yitzhak Mandelbaum via cfe-commits
ymand wrote: > I agree with the usefulness of storing the initial target separately, > reducing checks and branching based on whether the current target is a `Stmt` > or `Function`. Since I was touching everywhere `CallStack` was used anyway, I > went ahead with not pushing the starting `Funct

[clang] [clang][dataflow] Fully support Environment construction for Stmt analysis. (PR #91616)

2024-05-10 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand edited https://github.com/llvm/llvm-project/pull/91616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Fully support Environment construction for Stmt analysis. (PR #91616)

2024-05-10 Thread Yitzhak Mandelbaum via cfe-commits
@@ -718,29 +730,46 @@ class Environment { void pushCallInternal(const FunctionDecl *FuncDecl, ArrayRef Args); + // FIXME: Add support for resetting globals after function calls to enable + // the implementation of sound analyses. + /// Assigns st

[clang] [clang][dataflow] Fully support Environment construction for Stmt analysis. (PR #91616)

2024-05-10 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. Nice! https://github.com/llvm/llvm-project/pull/91616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Fully support Environment construction for Stmt analysis. (PR #91616)

2024-05-10 Thread Yitzhak Mandelbaum via cfe-commits
@@ -476,7 +476,7 @@ runTypeErasedDataflowAnalysis( PrettyStackTraceAnalysis CrashInfo(ACFG, "runTypeErasedDataflowAnalysis"); std::optional MaybeStartingEnv; - if (InitEnv.callStackSize() == 1) { + if (InitEnv.callStackSize() == 0) { ymand wrote: aside:

[clang] [clang][nullability] Propagate storage location / value of `++`/`--` operators. (PR #94217)

2024-06-03 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/94217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Propagate storage location of compound assignment operators. (PR #94332)

2024-06-04 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/94332 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Handle `AtomicExpr` in `ResultObjectVisitor`. (PR #94963)

2024-06-10 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/94963 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Teach `AnalysisASTVisitor` that `typeid()` can be evaluated. (PR #96731)

2024-06-26 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/96731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][transformer] Introduce a `constructExprArgs` range selector. (PR #95901)

2024-06-26 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/95901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] abc16c7 - [NFC] Remove a FIXME fixed by an earlier patch.

2022-09-09 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2022-09-09T17:13:52Z New Revision: abc16c7a5b0a63d14172262153608b3d24de957f URL: https://github.com/llvm/llvm-project/commit/abc16c7a5b0a63d14172262153608b3d24de957f DIFF: https://github.com/llvm/llvm-project/commit/abc16c7a5b0a63d14172262153608b3d24de957f.diff

[clang] 0b12efc - [clang][dataflow] Add support for nested method calls.

2022-09-22 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2022-09-22T19:16:31Z New Revision: 0b12efc7a42c187400f7df18d5fd629d92d2747e URL: https://github.com/llvm/llvm-project/commit/0b12efc7a42c187400f7df18d5fd629d92d2747e DIFF: https://github.com/llvm/llvm-project/commit/0b12efc7a42c187400f7df18d5fd629d92d2747e.diff

[clang] 692e030 - [clang][dataflow] Add cache of `ControlFlowContext`s for function decls.

2022-08-03 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2022-08-03T15:17:49Z New Revision: 692e03039d1ee57c06c0cfae68b91bc5bfd99f6e URL: https://github.com/llvm/llvm-project/commit/692e03039d1ee57c06c0cfae68b91bc5bfd99f6e DIFF: https://github.com/llvm/llvm-project/commit/692e03039d1ee57c06c0cfae68b91bc5bfd99f6e.diff

[clang] 39b9d4f - [clang][dataflow] Add support for a Top value in boolean formulas.

2022-10-14 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2022-10-14T17:41:53Z New Revision: 39b9d4f188ca1f99515658334d57c2961db33289 URL: https://github.com/llvm/llvm-project/commit/39b9d4f188ca1f99515658334d57c2961db33289 DIFF: https://github.com/llvm/llvm-project/commit/39b9d4f188ca1f99515658334d57c2961db33289.diff

[clang] 13cd184 - [clang-dataflow][NFC] Mark test analysis classes as `final`.

2022-10-14 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2022-10-14T17:51:57Z New Revision: 13cd184ef7fa9d76deaffb1924521fa914edba5e URL: https://github.com/llvm/llvm-project/commit/13cd184ef7fa9d76deaffb1924521fa914edba5e DIFF: https://github.com/llvm/llvm-project/commit/13cd184ef7fa9d76deaffb1924521fa914edba5e.diff

[clang] 7da0879 - [clang][dataflow][NFC] Fix reachability warning.

2022-10-14 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2022-10-14T19:35:11Z New Revision: 7da087974f9491855eea0087c657851a84c67b75 URL: https://github.com/llvm/llvm-project/commit/7da087974f9491855eea0087c657851a84c67b75 DIFF: https://github.com/llvm/llvm-project/commit/7da087974f9491855eea0087c657851a84c67b75.diff

[clang] 8cadac4 - [clang][dataflow] Add equivalence relation `Value` type.

2022-10-19 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2022-10-19T12:23:09Z New Revision: 8cadac41e9f63b2494805042573792cc2cc2a8ea URL: https://github.com/llvm/llvm-project/commit/8cadac41e9f63b2494805042573792cc2cc2a8ea DIFF: https://github.com/llvm/llvm-project/commit/8cadac41e9f63b2494805042573792cc2cc2a8ea.diff

[clang] c072586 - [clang][dataflow] Generalize custom comparison to return tri-value result.

2022-11-03 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2022-11-03T23:31:20Z New Revision: c0725865b188f71f904ecd4dac56ef37268b30d2 URL: https://github.com/llvm/llvm-project/commit/c0725865b188f71f904ecd4dac56ef37268b30d2 DIFF: https://github.com/llvm/llvm-project/commit/c0725865b188f71f904ecd4dac56ef37268b30d2.diff

[clang-tools-extra] f3afd16 - [clang-tidy] Ignore overriden methods in `readability-const-return-type`.

2022-11-15 Thread Yitzhak Mandelbaum via cfe-commits
Author: Thomas Etter Date: 2022-11-15T14:24:05Z New Revision: f3afd16b65ebda19e417120acf3c3793c171cf5e URL: https://github.com/llvm/llvm-project/commit/f3afd16b65ebda19e417120acf3c3793c171cf5e DIFF: https://github.com/llvm/llvm-project/commit/f3afd16b65ebda19e417120acf3c3793c171cf5e.diff LOG:

[clang-tools-extra] a49fcca - [clang-tidy] Optionally ignore findings in macros in `readability-const-return-type`.

2022-11-15 Thread Yitzhak Mandelbaum via cfe-commits
Author: Thomas Etter Date: 2022-11-15T14:28:03Z New Revision: a49fcca9e3ec9e310312416599405d26c189a81b URL: https://github.com/llvm/llvm-project/commit/a49fcca9e3ec9e310312416599405d26c189a81b DIFF: https://github.com/llvm/llvm-project/commit/a49fcca9e3ec9e310312416599405d26c189a81b.diff LOG:

[clang-tools-extra] 9a4e52e - [clang-tidy] Add an IgnoreMacros option to readability-avoid-const-params-in-decls

2022-09-30 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2022-09-30T14:27:02Z New Revision: 9a4e52ebeb6dd8527bc1ee944a9466d68a95b6f1 URL: https://github.com/llvm/llvm-project/commit/9a4e52ebeb6dd8527bc1ee944a9466d68a95b6f1 DIFF: https://github.com/llvm/llvm-project/commit/9a4e52ebeb6dd8527bc1ee944a9466d68a95b6f1.diff

[clang-tools-extra] 40f5c63 - [NFC] Fix for doc typo in commit 9a4e52ebeb6d

2022-09-30 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2022-09-30T14:53:18Z New Revision: 40f5c634bc991510427e274ba49d4c56f29ef593 URL: https://github.com/llvm/llvm-project/commit/40f5c634bc991510427e274ba49d4c56f29ef593 DIFF: https://github.com/llvm/llvm-project/commit/40f5c634bc991510427e274ba49d4c56f29ef593.diff

[clang] a18cf8d - [clang][dataflow] Remove stray lines from `Environment::join`

2022-12-19 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2022-12-19T15:28:30Z New Revision: a18cf8d14f5552c13bd1cef112ba5b88a7fc75ff URL: https://github.com/llvm/llvm-project/commit/a18cf8d14f5552c13bd1cef112ba5b88a7fc75ff DIFF: https://github.com/llvm/llvm-project/commit/a18cf8d14f5552c13bd1cef112ba5b88a7fc75ff.diff

[clang] d2e4aaf - [clang][dataflow][NFC] Fix comments related to widening.

2022-12-19 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2022-12-19T21:01:27Z New Revision: d2e4aaf6ac3bc7c72a81f050512afa17a9ceb54b URL: https://github.com/llvm/llvm-project/commit/d2e4aaf6ac3bc7c72a81f050512afa17a9ceb54b DIFF: https://github.com/llvm/llvm-project/commit/d2e4aaf6ac3bc7c72a81f050512afa17a9ceb54b.diff

[clang] 0e8d4a6 - [clang][dataflow] Simplify handling of nullopt-optionals.

2022-12-22 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2022-12-22T14:19:49Z New Revision: 0e8d4a6df9598cf0d654c24bbd3901bfb77d91bb URL: https://github.com/llvm/llvm-project/commit/0e8d4a6df9598cf0d654c24bbd3901bfb77d91bb DIFF: https://github.com/llvm/llvm-project/commit/0e8d4a6df9598cf0d654c24bbd3901bfb77d91bb.diff

[clang] f3700bd - [clang][dataflow] Account for global variables in constructor initializers.

2022-12-22 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2022-12-22T14:20:50Z New Revision: f3700bdb7f00d4f2652a7bdc6a99130e8a1b3c59 URL: https://github.com/llvm/llvm-project/commit/f3700bdb7f00d4f2652a7bdc6a99130e8a1b3c59 DIFF: https://github.com/llvm/llvm-project/commit/f3700bdb7f00d4f2652a7bdc6a99130e8a1b3c59.diff

[clang] 38404df - [clang][dataflow] Fix bug in handling of `return` statements.

2022-12-22 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2022-12-22T14:42:17Z New Revision: 38404df9d879483784a7024b2b4a366388d6d476 URL: https://github.com/llvm/llvm-project/commit/38404df9d879483784a7024b2b4a366388d6d476 DIFF: https://github.com/llvm/llvm-project/commit/38404df9d879483784a7024b2b4a366388d6d476.diff

[clang] 0086a35 - [clang][dataflow] Fix bug in optional-checker's handling of nullopt constructor.

2023-01-03 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2023-01-03T21:57:39Z New Revision: 0086a3555ac6cd76bb637252a0ba17c06c9b869b URL: https://github.com/llvm/llvm-project/commit/0086a3555ac6cd76bb637252a0ba17c06c9b869b DIFF: https://github.com/llvm/llvm-project/commit/0086a3555ac6cd76bb637252a0ba17c06c9b869b.diff

[clang] 5e8f597 - [clang][dataflow] Only model struct fields that are used in the function being analyzed.

2023-01-05 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2023-01-05T21:46:39Z New Revision: 5e8f597c2fedc740b71f07dfdb1ef3c2d348b193 URL: https://github.com/llvm/llvm-project/commit/5e8f597c2fedc740b71f07dfdb1ef3c2d348b193 DIFF: https://github.com/llvm/llvm-project/commit/5e8f597c2fedc740b71f07dfdb1ef3c2d348b193.diff

[clang] 2b1a517 - Revert "[clang][dataflow] Only model struct fields that are used in the function being analyzed."

2023-01-05 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2023-01-06T01:07:28Z New Revision: 2b1a517a92bfdfa3b692a660e19a2bb22513a567 URL: https://github.com/llvm/llvm-project/commit/2b1a517a92bfdfa3b692a660e19a2bb22513a567 DIFF: https://github.com/llvm/llvm-project/commit/2b1a517a92bfdfa3b692a660e19a2bb22513a567.diff

[clang] 01ccf7b - Revert "Revert "[clang][dataflow] Only model struct fields that are used in the function being analyzed.""

2023-01-09 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2023-01-09T19:32:10Z New Revision: 01ccf7b3cee58dbe02fd97696cae1781746b6137 URL: https://github.com/llvm/llvm-project/commit/01ccf7b3cee58dbe02fd97696cae1781746b6137 DIFF: https://github.com/llvm/llvm-project/commit/01ccf7b3cee58dbe02fd97696cae1781746b6137.diff

[clang] 264976d - [clang][dataflow] Unify `TransferOptions` and `DataflowAnalysisContext::Options`.

2023-01-10 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2023-01-10T14:17:25Z New Revision: 264976d98e785fa061ce6ac06db4a9bda2590506 URL: https://github.com/llvm/llvm-project/commit/264976d98e785fa061ce6ac06db4a9bda2590506 DIFF: https://github.com/llvm/llvm-project/commit/264976d98e785fa061ce6ac06db4a9bda2590506.diff

[clang] 089a544 - [clang][dataflow][NFC] Refine names and comments for field filtering.

2023-01-10 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2023-01-10T14:28:45Z New Revision: 089a54469f63c2f3c4b9d79fb9694f21bef0d071 URL: https://github.com/llvm/llvm-project/commit/089a54469f63c2f3c4b9d79fb9694f21bef0d071 DIFF: https://github.com/llvm/llvm-project/commit/089a54469f63c2f3c4b9d79fb9694f21bef0d071.diff

[clang] 3ce03c4 - [clang][dataflow] Fix 2 bugs in `MemberExpr` interpretation.

2023-01-10 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2023-01-10T15:48:00Z New Revision: 3ce03c42dbb46531968c527d80c0243c2db7bc0e URL: https://github.com/llvm/llvm-project/commit/3ce03c42dbb46531968c527d80c0243c2db7bc0e DIFF: https://github.com/llvm/llvm-project/commit/3ce03c42dbb46531968c527d80c0243c2db7bc0e.diff

[clang] 390029b - [clang][dataflow] Support (in)equality operators in `optional` model.

2022-12-07 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2022-12-07T16:24:49Z New Revision: 390029be8946cac807e8fc978b9cf3790e7456cc URL: https://github.com/llvm/llvm-project/commit/390029be8946cac807e8fc978b9cf3790e7456cc DIFF: https://github.com/llvm/llvm-project/commit/390029be8946cac807e8fc978b9cf3790e7456cc.diff

[clang] ef46354 - [clang][dataflow] Add support for structured bindings of tuple-like types.

2022-12-09 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2022-12-09T18:58:00Z New Revision: ef4635452f3a23ee29f7586148e19e8c84471a59 URL: https://github.com/llvm/llvm-project/commit/ef4635452f3a23ee29f7586148e19e8c84471a59 DIFF: https://github.com/llvm/llvm-project/commit/ef4635452f3a23ee29f7586148e19e8c84471a59.diff

[clang] 5d22d1f - [clang][dataflow] Improve optional model's support for ignoring smart pointers.

2022-12-15 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2022-12-15T15:39:52Z New Revision: 5d22d1f54836263ead1971ef8128f5128290dfa7 URL: https://github.com/llvm/llvm-project/commit/5d22d1f54836263ead1971ef8128f5128290dfa7 DIFF: https://github.com/llvm/llvm-project/commit/5d22d1f54836263ead1971ef8128f5128290dfa7.diff

[clang-tools-extra] 98550df - [clang-tidy] Add configuration option to bugprone-unchecked-optional-access check.

2022-12-15 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2022-12-15T15:43:21Z New Revision: 98550df7b7bbce0e38a1ec558287d759163c64ba URL: https://github.com/llvm/llvm-project/commit/98550df7b7bbce0e38a1ec558287d759163c64ba DIFF: https://github.com/llvm/llvm-project/commit/98550df7b7bbce0e38a1ec558287d759163c64ba.diff

[clang-tools-extra] 8003c1d - [clang-tidy] Fix misc-unused-using-decls for user-defined literals

2022-11-17 Thread Yitzhak Mandelbaum via cfe-commits
Author: v1nh1shungry Date: 2022-11-17T22:47:15Z New Revision: 8003c1d61e69142cb6e87df719c17f3c4ad86c98 URL: https://github.com/llvm/llvm-project/commit/8003c1d61e69142cb6e87df719c17f3c4ad86c98 DIFF: https://github.com/llvm/llvm-project/commit/8003c1d61e69142cb6e87df719c17f3c4ad86c98.diff LOG:

[clang] 84dd12b - [clang][dataflow] Add widening API and implement it for built-in boolean model.

2022-11-22 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2022-11-22T16:09:28Z New Revision: 84dd12b29064095cdef3949e8fd5c91b93f36004 URL: https://github.com/llvm/llvm-project/commit/84dd12b29064095cdef3949e8fd5c91b93f36004 DIFF: https://github.com/llvm/llvm-project/commit/84dd12b29064095cdef3949e8fd5c91b93f36004.diff

[clang] [dataflow] Add global condition to DataflowAnalysisContext (PR #65949)

2023-09-11 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand review_requested https://github.com/llvm/llvm-project/pull/65949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dataflow] Add global condition to DataflowAnalysisContext (PR #65949)

2023-09-11 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand edited https://github.com/llvm/llvm-project/pull/65949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dataflow] Add global condition to DataflowAnalysisContext (PR #65949)

2023-09-11 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/65949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dataflow] Add global condition to DataflowAnalysisContext (PR #65949)

2023-09-11 Thread Yitzhak Mandelbaum via cfe-commits
@@ -172,27 +179,33 @@ bool DataflowAnalysisContext::equivalentFormulas(const Formula &Val1, } void DataflowAnalysisContext::addTransitiveFlowConditionConstraints( -Atom Token, llvm::SetVector &Constraints, -llvm::DenseSet &VisitedTokens) { - auto Res = VisitedTokens.

[clang] [dataflow] Add global condition to DataflowAnalysisContext (PR #65949)

2023-09-11 Thread Yitzhak Mandelbaum via cfe-commits
@@ -172,27 +179,33 @@ bool DataflowAnalysisContext::equivalentFormulas(const Formula &Val1, } void DataflowAnalysisContext::addTransitiveFlowConditionConstraints( -Atom Token, llvm::SetVector &Constraints, -llvm::DenseSet &VisitedTokens) { - auto Res = VisitedTokens.

[clang] [clang][dataflow] Change `diagnoseFunction` to take type of diagnostic list instead of diagnostic itself. (PR #66014)

2023-09-11 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand created https://github.com/llvm/llvm-project/pull/66014: The template is agnostic as to the type used by the list, as long as it is compatible with `llvm::move` and `std::back_inserter`. In practice, we've encountered analyses which use different types (`llvm::SmallVect

[clang-tools-extra] [clang][dataflow] Change `diagnoseFunction` to take type of diagnostic list instead of diagnostic itself. (PR #66014)

2023-09-11 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand review_requested https://github.com/llvm/llvm-project/pull/66014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang][dataflow] Change `diagnoseFunction` to take type of diagnostic list instead of diagnostic itself. (PR #66014)

2023-09-11 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand review_requested https://github.com/llvm/llvm-project/pull/66014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang][dataflow] Change `diagnoseFunction` to take type of diagnostic list instead of diagnostic itself. (PR #66014)

2023-09-11 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand review_requested https://github.com/llvm/llvm-project/pull/66014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang][dataflow] Change `diagnoseFunction` to take type of diagnostic list instead of diagnostic itself. (PR #66014)

2023-09-11 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand review_requested https://github.com/llvm/llvm-project/pull/66014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Change `diagnoseFunction` to take type of diagnostic list instead of diagnostic itself. (PR #66014)

2023-09-11 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand review_requested https://github.com/llvm/llvm-project/pull/66014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang][dataflow] Change `diagnoseFunction` to take type of diagnostic list instead of diagnostic itself. (PR #66014)

2023-09-11 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand review_requested https://github.com/llvm/llvm-project/pull/66014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Change `diagnoseFunction` to take type of diagnostic list instead of diagnostic itself. (PR #66014)

2023-09-11 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand review_requested https://github.com/llvm/llvm-project/pull/66014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang][dataflow] Change `diagnoseFunction` to take type of diagnostic list instead of diagnostic itself. (PR #66014)

2023-09-12 Thread Yitzhak Mandelbaum via cfe-commits
@@ -245,10 +245,10 @@ runDataflowAnalysis( /// iterations. /// - This limit is still low enough to keep runtimes acceptable (on typical /// machines) in cases where we hit the limit. -template -llvm::Expected> diagnoseFunction( +template +llvm::Expected diagnoseFunction(

[clang-tools-extra] [clang][dataflow] Change `diagnoseFunction` to take type of diagnostic list instead of diagnostic itself. (PR #66014)

2023-09-12 Thread Yitzhak Mandelbaum via cfe-commits
ymand wrote: > I think `llvm::SmallVector` makes sense for both callsites that currently > exist (and ones that we might add in the future). This patch currently lets > `UncheckedOptionalAccessCheck::check()` continue to use `std::vector`, but I > think `llvm::SmallVector` makes sense there as

[clang-tools-extra] [clang][dataflow] Change `diagnoseFunction` to take type of diagnostic list instead of diagnostic itself. (PR #66014)

2023-09-12 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand updated https://github.com/llvm/llvm-project/pull/66014: >From 6eda5a1fc6200027d6ae99dc5eff69aa88962c81 Mon Sep 17 00:00:00 2001 From: Yitzhak Mandelbaum Date: Mon, 11 Sep 2023 21:34:00 + Subject: [PATCH 1/2] [clang][dataflow] Change `diagnoseFunction` to take type

[clang-tools-extra] [clang][dataflow] Change `diagnoseFunction` to take type of diagnostic list instead of diagnostic itself. (PR #66014)

2023-09-12 Thread Yitzhak Mandelbaum via cfe-commits
ymand wrote: Updated to enforce `llvm::SmallVector`, per Martin's recommendation. PTAL. https://github.com/llvm/llvm-project/pull/66014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang][dataflow] Change `diagnoseFunction` to take type of diagnostic list instead of diagnostic itself. (PR #66014)

2023-09-13 Thread Yitzhak Mandelbaum via cfe-commits
@@ -245,10 +245,10 @@ runDataflowAnalysis( /// iterations. /// - This limit is still low enough to keep runtimes acceptable (on typical /// machines) in cases where we hit the limit. -template -llvm::Expected> diagnoseFunction( +template +llvm::Expected diagnoseFunction(

[clang-tools-extra] [clang][dataflow] Change `diagnoseFunction` to take type of diagnostic list instead of diagnostic itself. (PR #66014)

2023-09-13 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand resolved https://github.com/llvm/llvm-project/pull/66014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang][dataflow] Change `diagnoseFunction` to use `llvm::SmallVector` instead of `std::vector`. (PR #66014)

2023-09-13 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand edited https://github.com/llvm/llvm-project/pull/66014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dataflow] Add global condition to DataflowAnalysisContext (PR #65949)

2023-09-13 Thread Yitzhak Mandelbaum via cfe-commits
@@ -108,6 +108,16 @@ class DataflowAnalysisContext { /// A null `PointeeType` can be used for the pointee of `std::nullptr_t`. PointerValue &getOrCreateNullPointerValue(QualType PointeeType); + /// Adds `Constraint` to current and future flow conditions in this context. +

[clang] [dataflow] Add global condition to DataflowAnalysisContext (PR #65949)

2023-09-13 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand resolved https://github.com/llvm/llvm-project/pull/65949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dataflow] Add global condition to DataflowAnalysisContext (PR #65949)

2023-09-13 Thread Yitzhak Mandelbaum via cfe-commits
@@ -172,27 +179,33 @@ bool DataflowAnalysisContext::equivalentFormulas(const Formula &Val1, } void DataflowAnalysisContext::addTransitiveFlowConditionConstraints( -Atom Token, llvm::SetVector &Constraints, -llvm::DenseSet &VisitedTokens) { - auto Res = VisitedTokens.

[clang] [clang][dataflow] Change `diagnoseFunction` to use `llvm::SmallVector` instead of `std::vector`. (PR #66014)

2023-09-13 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand updated https://github.com/llvm/llvm-project/pull/66014: >From 335f12e897d8d776dc476b468bc0dc1e7b8019df Mon Sep 17 00:00:00 2001 From: Yitzhak Mandelbaum Date: Mon, 11 Sep 2023 21:34:00 + Subject: [PATCH 1/2] [clang][dataflow] Change `diagnoseFunction` to take type

[clang] [clang-transformer] Allow stencils to read from system headers. (PR #66480)

2023-09-15 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand edited https://github.com/llvm/llvm-project/pull/66480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-transformer] Allow stencils to read from system headers. (PR #66480)

2023-09-15 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand requested changes to this pull request. https://github.com/llvm/llvm-project/pull/66480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-transformer] Allow stencils to read from system headers. (PR #66480)

2023-09-15 Thread Yitzhak Mandelbaum via cfe-commits
@@ -91,6 +91,10 @@ StringRef getExtendedText(const T &Node, tok::TokenKind Next, llvm::Error validateEditRange(const CharSourceRange &Range, const SourceManager &SM); +/// Determines whether \p Range is one that can be read from. +llvm::Error vali

[clang] [clang-transformer] Allow stencils to read from system headers. (PR #66480)

2023-09-15 Thread Yitzhak Mandelbaum via cfe-commits
@@ -230,7 +230,7 @@ class SelectorStencil : public StencilInterface { // message. If it's valid, then something else is the cause and we just // return the generic failure message. if (auto Err = - tooling::validateEditRange(*RawRange, *Match.Sour

[clang] [dataflow] Parse formulas from text (PR #66424)

2023-09-15 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand edited https://github.com/llvm/llvm-project/pull/66424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dataflow] Parse formulas from text (PR #66424)

2023-09-15 Thread Yitzhak Mandelbaum via cfe-commits
@@ -87,6 +87,9 @@ class alignas(const Formula *) Formula { ArrayRef Operands, unsigned Value = 0); + // Parse Formulas using Arena rather than caling this function directly. ymand wrote: nit: Maybe prefix wit

[clang] [dataflow] Parse formulas from text (PR #66424)

2023-09-15 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/66424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-transformer] Allow stencils to read from system headers. (PR #66480)

2023-09-15 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/66480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Reorder checks to protect against a null pointer dereference. (PR #66764)

2023-09-19 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/66764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1defa78 - [clang][dataflow] Add function to `WatchedLiteralsSolver` that reports whether the iteration limit has been reached.

2023-07-18 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2023-07-18T21:43:55Z New Revision: 1defa781243f9d0bc66719465e4de33e9fb7a243 URL: https://github.com/llvm/llvm-project/commit/1defa781243f9d0bc66719465e4de33e9fb7a243 DIFF: https://github.com/llvm/llvm-project/commit/1defa781243f9d0bc66719465e4de33e9fb7a243.diff

[clang] 1429240 - [clang][dataflow] Add convenience function for analysing and `FunctionDecl` and diagnosing it.

2023-07-26 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2023-07-26T17:12:29Z New Revision: 1429240ed63b05991e175e623b3fa5b72e59dc5b URL: https://github.com/llvm/llvm-project/commit/1429240ed63b05991e175e623b3fa5b72e59dc5b DIFF: https://github.com/llvm/llvm-project/commit/1429240ed63b05991e175e623b3fa5b72e59dc5b.diff

[clang] e9570d1 - [clang-tidy] Update unchecked-optiona-access-check to use convenience function for diagnosing `FunctionDecl`s.

2023-07-26 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2023-07-26T17:12:29Z New Revision: e9570d1e59ba381ea55327b5cbed0b5bc05677fe URL: https://github.com/llvm/llvm-project/commit/e9570d1e59ba381ea55327b5cbed0b5bc05677fe DIFF: https://github.com/llvm/llvm-project/commit/e9570d1e59ba381ea55327b5cbed0b5bc05677fe.diff

Re: [PATCH] D156254: [clang][dataflow] Add convenience function for analysing and `FunctionDecl` and diagnosing it.

2023-07-26 Thread Yitzhak Mandelbaum via cfe-commits
This broke one of the builds. https://lab.llvm.org/buildbot/#/builders/121/builds/32939/steps/4/logs/stdio. Working on a fix now. On Wed, Jul 26, 2023 at 1:12 PM Yitzhak Mandelbaum via Phabricator < revi...@reviews.llvm.org> wrote: > This revision was landed with ongoing or failed builds. > This

[clang] 75abfa2 - Fix build breakages in rG1429240ed63b.

2023-07-26 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2023-07-26T17:37:05Z New Revision: 75abfa2474da663f22e33e63d34bb843ef01d12b URL: https://github.com/llvm/llvm-project/commit/75abfa2474da663f22e33e63d34bb843ef01d12b DIFF: https://github.com/llvm/llvm-project/commit/75abfa2474da663f22e33e63d34bb843ef01d12b.diff

[clang] 26db5e6 - [clang][CFG] Support construction of a weak topological ordering of the CFG.

2023-07-27 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2023-07-27T18:40:59Z New Revision: 26db5e651bb65287b57a9ca84388d61d8b3305c9 URL: https://github.com/llvm/llvm-project/commit/26db5e651bb65287b57a9ca84388d61d8b3305c9 DIFF: https://github.com/llvm/llvm-project/commit/26db5e651bb65287b57a9ca84388d61d8b3305c9.diff

[clang] f4cf51c - [clang][CFG] Add support for partitioning CFG into intervals.

2023-06-27 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2023-06-27T17:07:54Z New Revision: f4cf51c99c74f46a490e0ae265da8fba298d800b URL: https://github.com/llvm/llvm-project/commit/f4cf51c99c74f46a490e0ae265da8fba298d800b DIFF: https://github.com/llvm/llvm-project/commit/f4cf51c99c74f46a490e0ae265da8fba298d800b.diff

[clang] [clang][dataflow] Add support for lambda captures (PR #68558)

2023-10-10 Thread Yitzhak Mandelbaum via cfe-commits
@@ -5987,4 +6018,204 @@ TEST(TransferTest, EvaluateBlockWithUnreachablePreds) { ASTContext &ASTCtx) {}); } +TEST(TransferTest, LambdaCaptureByCopy) { + std::string Code = R"( +void target(int Foo, int Bar) { + [Foo]() { +(void)0; +// [[p]] +

[clang] [clang][dataflow] Add support for lambda captures (PR #68558)

2023-10-10 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand requested changes to this pull request. https://github.com/llvm/llvm-project/pull/68558 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Add support for lambda captures (PR #68558)

2023-10-10 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand edited https://github.com/llvm/llvm-project/pull/68558 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Add support for lambda captures (PR #68558)

2023-10-10 Thread Yitzhak Mandelbaum via cfe-commits
@@ -3214,6 +3220,117 @@ TEST_P(UncheckedOptionalAccessTest, Bitfield) { } )"); } + +TEST_P(UncheckedOptionalAccessTest, Lambda) { ymand wrote: Please split these into individual tests. https://github.com/llvm/llvm-project/pull/68558

[clang-tools-extra] [clang][dataflow]Use cast_or_null instead cast to prevent crash (PR #68510)

2023-10-10 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand edited https://github.com/llvm/llvm-project/pull/68510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow]Use cast_or_null instead cast to prevent crash (PR #68510)

2023-10-10 Thread Yitzhak Mandelbaum via cfe-commits
@@ -180,3 +180,44 @@ void std_forward_rvalue_ref_safe(absl::optional&& opt) { std::forward>(opt).value(); } + +namespace std { + +template +class optional { +public: + template + optional& operator=(const U &u){ + data = u; + } +private: + T dat

[clang] [clang][dataflow]Use cast_or_null instead cast to prevent crash (PR #68510)

2023-10-10 Thread Yitzhak Mandelbaum via cfe-commits
@@ -180,3 +180,44 @@ void std_forward_rvalue_ref_safe(absl::optional&& opt) { std::forward>(opt).value(); } + +namespace std { + +template +class optional { +public: + template + optional& operator=(const U &u){ + data = u; + } +private: + T dat

[clang] [clang][dataflow]Use cast_or_null instead cast to prevent crash (PR #68510)

2023-10-10 Thread Yitzhak Mandelbaum via cfe-commits
@@ -180,3 +180,44 @@ void std_forward_rvalue_ref_safe(absl::optional&& opt) { std::forward>(opt).value(); } + +namespace std { + +template +class optional { +public: + template + optional& operator=(const U &u){ ymand wrote: The issue isn't specifi

<    1   2   3   4   5   6   7   >