History log of /llvm-project/clang/lib/Analysis/FlowSensitive/ASTOps.cpp (Results 1 – 10 of 10)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5
# 198fb5ed 27-Nov-2024 Samira Bazuzi <bazuzi@google.com>

[clang][dataflow] Add captured parameters to ReferencedDecls for lamb… (#117771)

…da call operators.

This doesn't require that they be used in the operator's body, unlike
other ReferencedDecls.

[clang][dataflow] Add captured parameters to ReferencedDecls for lamb… (#117771)

…da call operators.

This doesn't require that they be used in the operator's body, unlike
other ReferencedDecls. This is most obviously different from captured
local variables, which can be captured but will not appear in
ReferencedDecls unless they appear in the operator's body.

This difference simplifies the collection of the captured parameters,
but probably could be eliminated if desirable.

show more ...


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
# 2575ea6e 19-Aug-2024 Samira Bazuzi <bazuzi@google.com>

[clang][dataflow] Collect local variables referenced within a functio… (#104459)

…n/statement.

We don't need these for the same in-tree purposes as the other sets,
i.e. for making sure we model

[clang][dataflow] Collect local variables referenced within a functio… (#104459)

…n/statement.

We don't need these for the same in-tree purposes as the other sets,
i.e. for making sure we model these Decls that are declared outside the
function, but we have an out-of-tree use for these sets that would
benefit from this simple addition and would avoid duplicating so much of
this code.

show more ...


Revision tags: llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8
# 275196d8 11-Jun-2024 martinboehme <mboehme@google.com>

[clang][nullability] Don't return null fields from `getReferencedDecls()`. (#94983)

The patch includes a repro for a case where we were returning a null
`FieldDecl`
when calling `getReferencedDecls(

[clang][nullability] Don't return null fields from `getReferencedDecls()`. (#94983)

The patch includes a repro for a case where we were returning a null
`FieldDecl`
when calling `getReferencedDecls()` on the `InitListExpr` for a union.

Also, I noticed while working on this that `RecordInitListHelper` has a
bug
where it doesn't work correctly for empty unions. This patch also
includes a
repro and fix for this bug.

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, llvmorg-18.1.5
# c70f0583 26-Apr-2024 martinboehme <mboehme@google.com>

[clang][dataflow] Fix crash when `ConstantExpr` is used in conditional operator. (#90112)

`ConstantExpr` does not appear as a `CFGStmt` in the CFG, so
`StmtToEnvMap::getEnvironment()` was not findin

[clang][dataflow] Fix crash when `ConstantExpr` is used in conditional operator. (#90112)

`ConstantExpr` does not appear as a `CFGStmt` in the CFG, so
`StmtToEnvMap::getEnvironment()` was not finding an entry for it in the
map,
causing a crash when we tried to access the iterator resulting from the
map
lookup.

The fix is to make `ignoreCFGOmittedNodes()` ignore `ConstantExpr`, but
in
addition, I'm hardening `StmtToEnvMap::getEnvironment()` to make sure
release
builds don't crash in similar situations in the future.

show more ...


# d634b233 19-Apr-2024 Samira Bazuzi <bazuzi@google.com>

[clang][dataflow] Expose getReferencedDecls for a Stmt. (#89444)


# ca7d9442 19-Apr-2024 martinboehme <mboehme@google.com>

[clang][dataflow] Support `CXXParenListInitExpr` in `PropagateResultObject()`. (#89235)


# 3d56ea05 18-Apr-2024 Timm Baeder <tbaeder@redhat.com>

[clang][NFC] Fix FieldDecl::isUnnamedBitfield() capitalization (#89048)

We always capitalize bitfield as "BitField".


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