Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1
# cd11f55a 20-Mar-2023 Dmitri Gribenko <gribozavr@gmail.com>

[clang][dataflow] Fix indentation in a test


Revision tags: llvmorg-16.0.0, llvmorg-16.0.0-rc4
# 73c98831 28-Feb-2023 Yitzhak Mandelbaum <yitzhakm@google.com>

[clang][dataflow] Fix missed fields in field set construction.

When building the set of referenced fields for the `DataflowAnalysisContext`,
include fields referenced only in default member initiali

[clang][dataflow] Fix missed fields in field set construction.

When building the set of referenced fields for the `DataflowAnalysisContext`,
include fields referenced only in default member initializers. These
initializers are visited in the CFGs of constructors and so the fields must be
included when analysing constructor bodies.

Differential Revision: https://reviews.llvm.org/D144987

show more ...


Revision tags: llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7
# 3ce03c42 09-Jan-2023 Yitzhak Mandelbaum <yitzhakm@google.com>

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

There were two (small) bugs causing crashes in the analysis. This patch fixes both of them.

1. An enum value was accessed as a class me

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

There were two (small) bugs causing crashes in the analysis. This patch fixes both of them.

1. An enum value was accessed as a class member. Now, the engine gracefully
ignores such member expressions.

2. Field access in `MemberExpr` of struct/class-typed global variables. Analysis
didn't interpret fields of global vars, because the vars were initialized before
the fields were added to the "allowlist". Now, the allowlist is set _before_
init of globals.

Differential Revision: https://reviews.llvm.org/D141384

show more ...


# 01ccf7b3 06-Jan-2023 Yitzhak Mandelbaum <yitzhakm@google.com>

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

This reverts commit 2b1a517a92bfdfa3b692a660e19a2bb22513a567. It's a fix forward
with two m

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

This reverts commit 2b1a517a92bfdfa3b692a660e19a2bb22513a567. It's a fix forward
with two memory errors fixed, one of which was the cause of the build breakage
in the buildbots.

Original message:

Previously, the model for structs modeled all fields in a struct when
`createValue` was called for that type. This patch adds a prepass on the
function under analysis to discover the fields referenced in the scope and then
limits modeling to only those fields. This reduces wasted memory usage
(modeling unused fields) which can be important for programs that use large
structs.

Note: This patch obviates the need for https://reviews.llvm.org/D123032.

show more ...


# 2b1a517a 06-Jan-2023 Yitzhak Mandelbaum <yitzhakm@google.com>

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

This reverts commit 5e8f597c2fedc740b71f07dfdb1ef3c2d348b193. It caused msan and ubsan breakages.


# 5e8f597c 27-Dec-2022 Yitzhak Mandelbaum <yitzhakm@google.com>

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

Previously, the model for structs modeled all fields in a struct when
`createValue` was called for that type.

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

Previously, the model for structs modeled all fields in a struct when
`createValue` was called for that type. This patch adds a prepass on the
function under analysis to discover the fields referenced in the scope and then
limits modeling to only those fields. This reduces wasted memory usage
(modeling unused fields) which can be important for programss that use large
structs.

Note: This patch obviates the need for https://reviews.llvm.org/D123032.

Differential Revision: https://reviews.llvm.org/D140694

show more ...


# f3700bdb 21-Dec-2022 Yitzhak Mandelbaum <yitzhakm@google.com>

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

Previously, the analysis modeled global variables appearing in the _body_ of
any function (including constructors). But, t

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

Previously, the analysis modeled global variables appearing in the _body_ of
any function (including constructors). But, that misses those appearing in
constructor _initializers_. This patch adds the initializers to the set of
expressions used to determine which globals to model.

Differential Revision: https://reviews.llvm.org/D140501

show more ...


Revision tags: llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init
# 32dcb759 22-Jul-2022 Sam Estep <sam@samestep.com>

[clang][dataflow] Move NoopAnalysis from unittests to include

This patch moves `Analysis/FlowSensitive/NoopAnalysis.h` from `clang/unittests/` to `clang/include/clang/`, so that we can use it for do

[clang][dataflow] Move NoopAnalysis from unittests to include

This patch moves `Analysis/FlowSensitive/NoopAnalysis.h` from `clang/unittests/` to `clang/include/clang/`, so that we can use it for doing context-sensitive analysis.

Reviewed By: ymandel, gribozavr2, sgatev

Differential Revision: https://reviews.llvm.org/D130304

show more ...


# 00e9d534 24-Jun-2022 Wei Yi Tee <wyt@google.com>

[clang][dataflow] Move logic for creating implication and iff expressions into `DataflowAnalysisContext` from `DataflowEnvironment`.

To keep functionality of creating boolean expressions in a consis

[clang][dataflow] Move logic for creating implication and iff expressions into `DataflowAnalysisContext` from `DataflowEnvironment`.

To keep functionality of creating boolean expressions in a consistent location.

Depends On D128357

Reviewed By: gribozavr2, sgatev, xazax.hun

Differential Revision: https://reviews.llvm.org/D128519

show more ...


Revision tags: llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3
# 3dd7877b 09-Mar-2022 Stanislav Gatev <sgatev@google.com>

Revert "[clang][dataflow] Move dataflow testing support out of unittests"

This reverts commit 26bbde2612b2042c3a8a31aed7f45e065c3dd413.


# 26bbde26 09-Mar-2022 Stanislav Gatev <sgatev@google.com>

[clang][dataflow] Move dataflow testing support out of unittests

This enables tests out of clang/unittests/Analysis/FlowSensitive to
use the testing support utilities.

Reviewed-by: ymandel, griboza

[clang][dataflow] Move dataflow testing support out of unittests

This enables tests out of clang/unittests/Analysis/FlowSensitive to
use the testing support utilities.

Reviewed-by: ymandel, gribozavr2

Differential Revision: https://reviews.llvm.org/D121285

show more ...


# e0cc28df 09-Mar-2022 Stanislav Gatev <sgatev@google.com>

Revert "[clang][dataflow] Add analysis that detects unsafe accesses to optionals"

This reverts commit ce205cffdfa0f16ce9441ba46fa43e23cecf8be7.


# ce205cff 08-Mar-2022 Stanislav Gatev <sgatev@google.com>

[clang][dataflow] Add analysis that detects unsafe accesses to optionals

Adds a dataflow analysis that detects unsafe accesses to values of type
`std::optional`, `absl::optional`, or `base::Optional

[clang][dataflow] Add analysis that detects unsafe accesses to optionals

Adds a dataflow analysis that detects unsafe accesses to values of type
`std::optional`, `absl::optional`, or `base::Optional`.

Reviewed-by: ymandel, xazax.hun

Differential Revision: https://reviews.llvm.org/D121197

show more ...


# 18c84e2d 07-Mar-2022 Yitzhak Mandelbaum <yitzhakm@google.com>

[clang][dataflow] Fix nullptr dereferencing error.

When pre-initializing fields in the environment, the code assumed that all
fields of a struct would be initialized. However, given limits on value

[clang][dataflow] Fix nullptr dereferencing error.

When pre-initializing fields in the environment, the code assumed that all
fields of a struct would be initialized. However, given limits on value
construction, that assumption is incorrect. This patch changes the code to drop
that assumption and thereby avoid dereferencing a nullptr.

Differential Revision: https://reviews.llvm.org/D121158

show more ...


Revision tags: llvmorg-14.0.0-rc2
# ae60884d 01-Mar-2022 Stanislav Gatev <sgatev@google.com>

[clang][dataflow] Add flow condition constraints to Environment

This is part of the implementation of the dataflow analysis framework.
See "[RFC] A dataflow analysis framework for Clang AST" on cfe-

[clang][dataflow] Add flow condition constraints to Environment

This is part of the implementation of the dataflow analysis framework.
See "[RFC] A dataflow analysis framework for Clang AST" on cfe-dev.

Reviewed-by: ymandel, xazax.hun

Differential Revision: https://reviews.llvm.org/D120711

show more ...


12