Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5 |
|
#
65c36179 |
| 26-Nov-2024 |
Congcong Cai <congcongcai0907@163.com> |
[clang][analysis][NFC]add static for internal linkage function (#117481)
Detected by misc-use-internal-linkage
|
Revision tags: llvmorg-19.1.4 |
|
#
dde802b1 |
| 15-Nov-2024 |
Sirraide <aeternalmail@gmail.com> |
[Clang] [NFC] Refactor AST visitors in Sema and the static analyser to use DynamicRecursiveASTVisitor (#115144)
This pr refactors all recursive AST visitors in `Sema`, `Analyze`, and
`StaticAnalysi
[Clang] [NFC] Refactor AST visitors in Sema and the static analyser to use DynamicRecursiveASTVisitor (#115144)
This pr refactors all recursive AST visitors in `Sema`, `Analyze`, and
`StaticAnalysis` to inherit from DRAV instead. This is over half of the
visitors that inherit from RAV directly.
See also #115132, #110040, #93462
LLVM Compile-Time Tracker link for this branch:
https://llvm-compile-time-tracker.com/compare.php?from=5adb5c05a2e9f31385fbba8b0436cbc07d91a44d&to=b58e589a86c06ba28d4d90613864d10be29aa5ba&stat=instructions%3Au
show more ...
|
Revision tags: llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2 |
|
#
49cb1701 |
| 26-Jul-2024 |
Pasquale Riello <pas.riello@gmail.com> |
[clang][dataflow] Handle CXXInheritedCtorInitExpr in ResultObjectVisitor. (#99616)
`CXXInheritedCtorInitExpr` is another of the node kinds that should be
considered an "original initializer". An as
[clang][dataflow] Handle CXXInheritedCtorInitExpr in ResultObjectVisitor. (#99616)
`CXXInheritedCtorInitExpr` is another of the node kinds that should be
considered an "original initializer". An assertion failure in
`assert(Children.size() == 1)` happens without this fix.
---------
Co-authored-by: martinboehme <mboehme@google.com>
show more ...
|
Revision tags: llvmorg-19.1.0-rc1, llvmorg-20-init |
|
#
83c2bfda |
| 22-Jul-2024 |
Samira Bazuzi <bazuzi@google.com> |
[clang][dataflow] Handle this-capturing lambdas in field initializers. (#99519)
We previously would assume these lambdas appeared inside a method
definition and end up crashing.
|
#
3fed312d |
| 13-Jul-2024 |
Samira Bazuzi <bazuzi@google.com> |
[clang][dataflow]Propagate the result object location for CXXDefaultInitExpr. (#98490)
These are not "original initializers"; the single node underneath
represents the initializing node.
|
Revision tags: llvmorg-18.1.8 |
|
#
28253426 |
| 11-Jun-2024 |
martinboehme <mboehme@google.com> |
[clang][dataflow] Handle `AtomicExpr` in `ResultObjectVisitor`. (#94963)
This is one of the node kinds that should be considered an "original initializer". The patch adds a test that was causing an
[clang][dataflow] Handle `AtomicExpr` in `ResultObjectVisitor`. (#94963)
This is one of the node kinds that should be considered an "original initializer". The patch adds a test that was causing an assertion failure in `assert(Children.size() == 1)` without the fix.
show more ...
|
Revision tags: llvmorg-18.1.7 |
|
#
5161a3f6 |
| 03-Jun-2024 |
martinboehme <mboehme@google.com> |
[clang][dataflow] Rewrite `getReferencedDecls()` with a `RecursiveASTVisitor`. (#93461)
We previously had a hand-rolled recursive traversal here that was exactly what `RecursiveASTVistor` does anywa
[clang][dataflow] Rewrite `getReferencedDecls()` with a `RecursiveASTVisitor`. (#93461)
We previously had a hand-rolled recursive traversal here that was exactly what `RecursiveASTVistor` does anyway. Using the visitor not only eliminates the explicit traversal logic but also allows us to introduce a common visitor base class for `getReferencedDecls()` and `ResultObjectVisitor`, ensuring that the two are consistent in terms of the nodes they visit. Inconsistency between these two has caused crashes in the past when `ResultObjectVisitor` tried to propagate result object locations to entities that weren't modeled becasue `getReferencedDecls()` didn't visit them.
show more ...
|
Revision tags: llvmorg-18.1.6 |
|
#
80d9ae9c |
| 15-May-2024 |
Samira Bazuzi <bazuzi@google.com> |
[clang][dataflow] Fully support Environment construction for Stmt analysis. (#91616)
Assume in fewer places that the analysis is of a `FunctionDecl`, and
initialize the `Environment` properly for `
[clang][dataflow] Fully support Environment construction for Stmt analysis. (#91616)
Assume in fewer places that the analysis is of a `FunctionDecl`, and
initialize the `Environment` properly for `Stmt`s.
Moves constructors for `Environment` to header to make it more obvious
that there are only minor differences between them and very little
initialization in the constructors.
Tested with check-clang-tooling.
show more ...
|
#
4d839d8f |
| 06-May-2024 |
martinboehme <mboehme@google.com> |
[clang][dataflow] Don't propagate result objects in unevaluated contexts (reland #90438) (#91172)
This relands #90348 with a fix for a [buildbot failure](https://lab.llvm.org/buildbot/#/builders/216
[clang][dataflow] Don't propagate result objects in unevaluated contexts (reland #90438) (#91172)
This relands #90348 with a fix for a [buildbot failure](https://lab.llvm.org/buildbot/#/builders/216/builds/38446) caused by the test being run with `-fno-rtti`.
show more ...
|
#
2252c5c4 |
| 02-May-2024 |
Weaver <Tom.Weaver@sony.com> |
Revert "[clang][dataflow] Don't propagate result objects in unevaluated contexts (#90438)"
This reverts commit 597a3150e932a9423c65b5ea4b53dd431aff5865.
Caused test failure on the following buildbo
Revert "[clang][dataflow] Don't propagate result objects in unevaluated contexts (#90438)"
This reverts commit 597a3150e932a9423c65b5ea4b53dd431aff5865.
Caused test failure on the following buildbot: https://lab.llvm.org/buildbot/#/builders/216/builds/38446
show more ...
|
#
597a3150 |
| 02-May-2024 |
martinboehme <mboehme@google.com> |
[clang][dataflow] Don't propagate result objects in unevaluated contexts (#90438)
Trying to do so can cause crashes -- see newly added test and the
comments in
the fix.
We're starting to see a
[clang][dataflow] Don't propagate result objects in unevaluated contexts (#90438)
Trying to do so can cause crashes -- see newly added test and the
comments in
the fix.
We're starting to see a repeating pattern here: We're getting crashes
because
`ResultObjectVisitor` and `getReferencedDecls()` don't agree on which
parts of
the AST to visit and, hence, which fields should be modeled.
I think we should ensure consistency between these two parts of the code
by
using a `RecursiveASTVisitor` in `getReferencedDecls()`[^1]; the
`Traverse...()` functions that control which parts of the AST we visit
would go
in a common base class that would be used for both `ResultObjectVisitor`
and
`getReferencedDecls()`.
I'd like to focus this PR, however, on a targeted fix for the current
crash and
postpone the refactoring to a later PR (which will be easier to revert
if there
are unintended side-effects).
[^1]: As an added bonus, this would make the code better structured and
more
efficient than the current sequence of `if (dyn_cast<T>(...))`
statements).
show more ...
|
Revision tags: llvmorg-18.1.5 |
|
#
b9208ce3 |
| 25-Apr-2024 |
martinboehme <mboehme@google.com> |
[clang][dataflow] Crash fix for `widenDistinctValues()`. (#89895)
We used to crash if the previous iteration contained a `BoolValue` and the current iteration contained an `IntegerValue`. The accomp
[clang][dataflow] Crash fix for `widenDistinctValues()`. (#89895)
We used to crash if the previous iteration contained a `BoolValue` and the current iteration contained an `IntegerValue`. The accompanying test sets up this situation -- see comments there for details.
While I'm here, clean up the tests for integral casts to use the test helpers we have available now. I was looking at these tests to understand how we handle integral casts, and the test helpers make the tests easier to read.
show more ...
|
#
9b0651f5 |
| 25-Apr-2024 |
martinboehme <mboehme@google.com> |
[clang][dataflow] Don't propagate result objects in nested declarations. (#89903)
Trying to do so can cause crashes -- see newly added test and the comments in the fix.
|
#
9ba6961c |
| 23-Apr-2024 |
martinboehme <mboehme@google.com> |
Reapply "[clang][dataflow] Model conditional operator correctly." with fixes (#89596)
I reverted https://github.com/llvm/llvm-project/pull/89213 beause it was causing buildbots to fail with assertio
Reapply "[clang][dataflow] Model conditional operator correctly." with fixes (#89596)
I reverted https://github.com/llvm/llvm-project/pull/89213 beause it was causing buildbots to fail with assertion failures.
Embarrassingly, it turns out I had been running tests locally in `Release` mode, i.e. with `assert()` compiled away.
This PR re-lands #89213 with fixes for the failing assertions.
show more ...
|
#
8ff64345 |
| 22-Apr-2024 |
martinboehme <mboehme@google.com> |
Revert "[clang][dataflow] Model conditional operator correctly." (#89577)
Reverts llvm/llvm-project#89213
This is causing buildbot failures.
|
#
abb958f1 |
| 22-Apr-2024 |
martinboehme <mboehme@google.com> |
[clang][dataflow] Model conditional operator correctly. (#89213)
|
#
14122106 |
| 19-Apr-2024 |
martinboehme <mboehme@google.com> |
[clang][dataflow][NFC] Fix code formatting in DataflowEnvironment.cpp (#89352)
For some reason, when I merged #89235, two lines were mis-formatted.
This patch corrects this; while I'm here, I'm als
[clang][dataflow][NFC] Fix code formatting in DataflowEnvironment.cpp (#89352)
For some reason, when I merged #89235, two lines were mis-formatted.
This patch corrects this; while I'm here, I'm also correcting other existing formatting errors.
show more ...
|
#
e8fce958 |
| 19-Apr-2024 |
martinboehme <mboehme@google.com> |
[clang][nullability] Remove `RecordValue`. (#89052)
This class no longer serves any purpose; see also the discussion here: https://reviews.llvm.org/D155204#inline-1503204
A lot of existing tests in
[clang][nullability] Remove `RecordValue`. (#89052)
This class no longer serves any purpose; see also the discussion here: https://reviews.llvm.org/D155204#inline-1503204
A lot of existing tests in TransferTest.cpp check for the existence of `RecordValue`s. Some of these checks are now simply redundant and have been removed. In other cases, tests were checking for the existence of a `RecordValue` as a way of testing whether a record has been initialized. I have typically changed these test to instead check whether a field of the record has a value.
show more ...
|
#
ca7d9442 |
| 19-Apr-2024 |
martinboehme <mboehme@google.com> |
[clang][dataflow] Support `CXXParenListInitExpr` in `PropagateResultObject()`. (#89235)
|
#
b5f2cecf |
| 18-Apr-2024 |
martinboehme <mboehme@google.com> |
Revert "[clang][dataflow] Refactor `PropagateResultObject()` with a switch statement." (#89176)
Reverts llvm/llvm-project#88865
There were failing tests in the CI that I didn't notice. Sorry.
|
#
da579ad8 |
| 18-Apr-2024 |
martinboehme <mboehme@google.com> |
[clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (#88865)
See also discussion in #88726.
|
#
1bccbe1f |
| 17-Apr-2024 |
martinboehme <mboehme@google.com> |
[clang][dataflow] Treat `BuiltinBitCastExpr` correctly in `PropagateResultObject()`. (#88875)
This patch includes a test that assert-fails without the fix.
|
#
b851c7f1 |
| 17-Apr-2024 |
martinboehme <mboehme@google.com> |
[clang][dataflow] Support `StmtExpr` in `PropagateResultObject()`. (#88872)
This patch adds a test that assert-fails without the fix.
|
Revision tags: llvmorg-18.1.4 |
|
#
9ec8c961 |
| 16-Apr-2024 |
Samira Bazuzi <bazuzi@google.com> |
[clang][dataflow] Expose getReferencedDecls and relocate free functions. (#88754)
Moves free functions from DataflowEnvironment.h/cc and
DataflowAnalysisContext.h/cc to RecordOps and a new ASTOps a
[clang][dataflow] Expose getReferencedDecls and relocate free functions. (#88754)
Moves free functions from DataflowEnvironment.h/cc and
DataflowAnalysisContext.h/cc to RecordOps and a new ASTOps and exposes
them as needed for current use and to expose getReferencedDecls for
out-of-tree use.
Minimal change in functionality, only to modify the return type of
getReferenceDecls to return the collected decls instead of using output
params.
Tested with `ninja check-clang-tooling`.
show more ...
|
#
3c6f91e5 |
| 16-Apr-2024 |
martinboehme <mboehme@google.com> |
[clang][dataflow] Fix result object location for builtin `<=>`. (#88726)
The newly added test causes an assertion failure in `PropagateResultObject()` without the fix added here.
|