History log of /llvm-project/clang/unittests/Analysis/FlowSensitive/TestingSupportTest.cpp (Results 1 – 14 of 14)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4
# 37458c66 31-Aug-2023 Martin Braenne <mboehme@google.com>

[clang][dataflow] Eliminate deprecated `DataflowAnalysis` constructor.

Reviewed By: ymandel, xazax.hun

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


Revision tags: llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init
# c8b31da1 21-Jan-2023 Dmitri Gribenko <gribozavr@gmail.com>

[clang][dataflow] Allow analyzing multiple functions in unit tests

In unit tests for concrete dataflow analyses we typically use the
testonly `checkDataflow()` helper to analyse a free function call

[clang][dataflow] Allow analyzing multiple functions in unit tests

In unit tests for concrete dataflow analyses we typically use the
testonly `checkDataflow()` helper to analyse a free function called
"target". This pattern allows our tests to be uniform and focused on
specific statement- or expression-level C++ features.

As we expand our feature coverage, we want to analyze functions whose
names we don't fully control, like constructors, destructors, operators
etc. In such tests it is often convenient to analyze all functions
defined in the input code, to avoid having to carefully craft an AST
matcher that finds the exact function we're interested in. That can be
easily done by providing `checkDataflow()` with a catch-all matcher like
`functionDecl()`.

It is also often convenient to define multiple special member functions
in a single unit test, for example, multiple constructors, and share the
rest of the class definition code between constructors. As a result, it
makes sense to analyze multiple functions in one unit test.

This change allows `checkDataflow()` to correctly handle AST matchers
that match more than one function. Previously, it would only ever
analyze the first matched function, and silently ignore the rest. Now it
runs dataflow analysis in a loop, and calls `VerifyResults` for each
function that was found in the input and analyzed.

Reviewed By: ymandel, sgatev

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

show more ...


Revision tags: llvmorg-15.0.7, 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
# 9cbdef61 16-Sep-2022 Wei Yi Tee <wyt@google.com>

[clang][dataflow] Replace usage of the deprecated overload of `checkDataflow`.

Updated files:
- `ChromiumCheckModelTest.cpp`.
- `MatchSwitchTest.cpp`.
- `MultiVarConstantPropagationTest.cpp`.
- `Sin

[clang][dataflow] Replace usage of the deprecated overload of `checkDataflow`.

Updated files:
- `ChromiumCheckModelTest.cpp`.
- `MatchSwitchTest.cpp`.
- `MultiVarConstantPropagationTest.cpp`.
- `SingleVarConstantPropagationTest.cpp`.
- `TestingSupportTest.cpp`.
- `TransferTest.cpp`.

Reviewed By: gribozavr2, sgatev

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

show more ...


Revision tags: 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 ...


# 1d83a16b 30-Jun-2022 Sam Estep <sam@samestep.com>

[clang][dataflow] Replace TEST_F with TEST where possible

Many of our tests are currently written using `TEST_F` where the test fixture class doesn't have any `SetUp` or `TearDown` methods, and just

[clang][dataflow] Replace TEST_F with TEST where possible

Many of our tests are currently written using `TEST_F` where the test fixture class doesn't have any `SetUp` or `TearDown` methods, and just one helper method. In those cases, this patch deletes the class and pulls its method out into a standalone function, using `TEST` instead of `TEST_F`.

There are still a few test files leftover in `clang/unittests/Analysis/FlowSensitive/` that use `TEST_F`:

- `DataflowAnalysisContextTest.cpp` because the class contains a `Context` field which is used
- `DataflowEnvironmentTest.cpp` because the class contains an `Environment` field which is used
- `SolverTest.cpp` because the class contains a `Vals` field which is used
- `TypeErasedDataflowAnalysisTest.cpp` because there are several different classes which all share the same method name

Reviewed By: ymandel, sgatev

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

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.


# 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 ...


Revision tags: llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init
# 35951892 25-Jan-2022 Yitzhak Mandelbaum <yitzhakm@google.com>

[clang][dataflow] Allow clients to disable built-in transfer functions.

These built-in functions build the (sophisticated) model of the code's
memory. This model isn't used by all analyses, so we pr

[clang][dataflow] Allow clients to disable built-in transfer functions.

These built-in functions build the (sophisticated) model of the code's
memory. This model isn't used by all analyses, so we provide for disabling it to
avoid incurring the costs associated with its construction.

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

show more ...


Revision tags: llvmorg-13.0.1, llvmorg-13.0.1-rc3
# 875117ae 14-Jan-2022 Yitzhak Mandelbaum <yitzhakm@google.com>

[clang][dataflow] Remove TestingSupport's dependency on gtest

Users outside of the clang repo may use different googletest versions. So, it's
better not to depend on llvm's googletest. This patch re

[clang][dataflow] Remove TestingSupport's dependency on gtest

Users outside of the clang repo may use different googletest versions. So, it's
better not to depend on llvm's googletest. This patch removes the dependency by
having `checkDataflow` return an `llvm::Error` instead of calling googletest's
`FAIL` or `ASSERT...` macros.

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

show more ...


Revision tags: llvmorg-13.0.1-rc2
# af7bc39b 29-Dec-2021 Stanislav Gatev <sgatev@google.com>

[clang][dataflow] Add transfer function for VarDecl statements

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

[clang][dataflow] Add transfer function for VarDecl statements

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: xazax.hun

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

show more ...


# 93fbaa46 10-Dec-2021 Yitzhak Mandelbaum <yitzhakm@google.com>

Revert "Revert "[clang][dataflow] Add framework for testing analyses.""

This reverts commit 78ff12da1115abcaf4cbf50b605a197011505646 and fixes the initial cause of the revert.


Revision tags: llvmorg-13.0.1-rc1
# 5a40df63 16-Nov-2021 Yitzhak Mandelbaum <yitzhakm@google.com>

[clang][dataflow] Add framework for testing analyses.

Adds a general-purpose framework to support testing of dataflow analyses.

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


# 47d526d6 16-Nov-2021 Yitzhak Mandelbaum <yitzhakm@google.com>

[clang][dataflow] Add framework for testing analyses.

Adds a general-purpose framework to support testing of dataflow analyses.

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