| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[clang][dataflow] Generate readable form of boolean values. Differential Revision: https://reviews.llvm.org/D129547 | 3 年前 | |
[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 | 3 年前 | |
[clang][dataflow] Add explicit "AST" nodes for implications and iff Previously we used to desugar implications and biconditionals into equivalent CNF/DNF as soon as possible. However, this desugaring makes debug output (Environment::dump()) less readable than it could be. Therefore, it makes sense to keep the sugared representation of a boolean formula, and desugar it in the solver. Reviewed By: sgatev, xazax.hun, wyt Differential Revision: https://reviews.llvm.org/D130519 | 3 年前 | |
[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 | 3 年前 | |
[clang][dataflow] Add explicit "AST" nodes for implications and iff Previously we used to desugar implications and biconditionals into equivalent CNF/DNF as soon as possible. However, this desugaring makes debug output (Environment::dump()) less readable than it could be. Therefore, it makes sense to keep the sugared representation of a boolean formula, and desugar it in the solver. Reviewed By: sgatev, xazax.hun, wyt Differential Revision: https://reviews.llvm.org/D130519 | 3 年前 | |
[clang][dataflow] Fix MapLattice::insert() to not drop return value Fix MapLattice API to return std::pair<iterator, bool>, allowing users to detect when an element has been inserted without performing a redundant map lookup. Differential Revision: https://reviews.llvm.org/D130497 | 3 年前 | |
[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 | 3 年前 | |
[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 | 3 年前 | |
[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 | 3 年前 | |
[clang][dataflow] Add explicit "AST" nodes for implications and iff Previously we used to desugar implications and biconditionals into equivalent CNF/DNF as soon as possible. However, this desugaring makes debug output (Environment::dump()) less readable than it could be. Therefore, it makes sense to keep the sugared representation of a boolean formula, and desugar it in the solver. Reviewed By: sgatev, xazax.hun, wyt Differential Revision: https://reviews.llvm.org/D130519 | 3 年前 | |
[clang] Don't use Optional::hasValue (NFC) This patch replaces x.hasValue() with x where x is contextually convertible to bool. | 3 年前 | |
[clang][dataflow] Add explicit "AST" nodes for implications and iff Previously we used to desugar implications and biconditionals into equivalent CNF/DNF as soon as possible. However, this desugaring makes debug output (Environment::dump()) less readable than it could be. Therefore, it makes sense to keep the sugared representation of a boolean formula, and desugar it in the solver. Reviewed By: sgatev, xazax.hun, wyt Differential Revision: https://reviews.llvm.org/D130519 | 3 年前 | |
[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 | 3 年前 | |
[clang][dataflow] Analyze calls to in-TU functions This patch adds initial support for context-sensitive analysis of simple functions whose definition is available in the translation unit, guarded by the ContextSensitive flag in the new TransferOptions struct. When this option is true, the VisitCallExpr case in the builtin transfer function has a fallthrough case which checks for a direct callee with a body. In that case, it constructs a CFG from that callee body, uses the new pushCall method on the Environment to make an environment to analyze the callee, and then calls runDataflowAnalysis with a NoopAnalysis (disabling context-sensitive analysis on that sub-analysis, to avoid problems with recursion). After the sub-analysis completes, the Environment from its exit block is simply assigned back to the environment at the callsite. The pushCall method (which currently only supports non-method functions with some restrictions) maps the SourceLocations for all the parameters to the existing source locations for the corresponding arguments from the callsite. This patch adds a few tests to check that this context-sensitive analysis works on simple functions. More sophisticated functionality will be added later; the most important next step is to explicitly model context in some fields of the DataflowAnalysisContext class, as mentioned in a FIXME comment in the pushCall implementation. Reviewed By: ymandel, xazax.hun Differential Revision: https://reviews.llvm.org/D130306 | 3 年前 | |
[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 | 3 年前 | |
[clang][dataflow] Add API to separate analysis from diagnosis This patch adds an optional PostVisitStmt parameter to the runTypeErasedDataflowAnalysis function, which does one more pass over all statements in the CFG after a fixpoint is reached. It then defines a diagnose method for the optional model in a new UncheckedOptionalAccessDiagnosis class, but only integrates that into the tests and not the actual optional check for clang-tidy. That will be done in a followup patch. The primary motivation is to separate the implementation of the unchecked optional access check into two parts, to allow for further refactoring of just the model part later, while leaving the checking part alone. Currently there is duplication between the transferUnwrapCall and diagnoseUnwrapCall functions, but that will be dealt with in the followup. Because diagnostics are now all gathered into one collection rather than being populated at each program point like when computing a fixpoint, this patch removes the usage of Pair and UnorderedElementsAre from the optional model tests, and instead modifies all their expectations to simply check the stringified set of diagnostics against a single string, either "safe" or some concatenation of "unsafe: input.cc:y:x". This is not ideal as it loses any connection to the /*[[check]]*/ annotations in the source strings, but it does still retain the source locations from the diagnostic strings themselves. Reviewed By: sgatev, gribozavr2, xazax.hun Differential Revision: https://reviews.llvm.org/D127898 | 3 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 |