You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Sungkeun Cho
020cd199b5
[cost] Use type of Provider.get
...
Summary:
This diff uses a type parameter of `Provider.get` to decide whether assigning expensive cost to the
function call or not. For example, if the type is small one like `Provider<Integer>`, it be
evaluated to have a unit cost, otherwise a linear cost.
To get the return type of `Provider.get`, I added a simple analyzer that collects "casted" types
backwards. In Sil, while the function call statement loses the return type, e.g,
```
n$5=_fun_Object Provider.get()(n$3:javax.inject.Provider*);
```
the `n$5`'s value is usually casted to a specific type at some point later.
```
*&$irvar0:java.lang.Object*=n$5
n$8=*&$irvar0:java.lang.Object*
n$9=_fun___cast(n$8:java.lang.Object*,sizeof(t=java.lang.Integer;sub_t=( sub )(cast)):void)
```
So, the analyzer starts from the cast statements backward, collecting the types to cast for each
variables.
Reviewed By: ezgicicek
Differential Revision: D20345268
fbshipit-source-id: 704b42ec1
5 years ago
.github/ workflows
[infer][PR] Update deploy.yml
5 years ago
dependencies
[copyright] Remove years
6 years ago
docker
[infer] Update docker build script
5 years ago
examples
[copyright] Remove years
6 years ago
facebook-clang-plugins @ bab3919746
@update-submodule: facebook-clang-plugins Fix handling of non-literal `offsetof` expressions
5 years ago
infer
[cost] Use type of Provider.get
5 years ago
m4
[copyright] Remove years
6 years ago
scripts
[scripts] delete check_hash_collisions.py
5 years ago
sledge
[sledge] Add beginnings of HACKING docs
5 years ago
website
[website] remove /static prefix
5 years ago
.buckconfig
[infer][genrule] Add example of Buck DEFS macro to generate Infer analysis targets
8 years ago
.clang-format
fix sync mishaps
9 years ago
.gitattributes
[website] exclude from repo language stats
5 years ago
.gitignore
[tests] remove genrule test
5 years ago
.gitmodules
[infer] Add facebook clang plugins submodule
9 years ago
.inferconfig
[java] Add command-line option to specify external Java packages
7 years ago
.ocamlformat
[ocamlformat] Move .ocamlformat config file to the project root
6 years ago
.travis.yml
[infer][PR] Fix CI
5 years ago
CODE_OF_CONDUCT.md
[infer][PR] Update CODE_OF_CONDUCT.md
6 years ago
CONTRIBUTING.md
[infer][PR] Fix the ppx_deriving issue URL
5 years ago
CONTRIBUTORS
Inferbo
8 years ago
FILES.md
[trace] infer subcommand for inferTraceBugs
7 years ago
INSTALL.md
[install] mpfr was missing from dependencies
5 years ago
ISSUE_TEMPLATE.md
[github] add issue and PR templates
6 years ago
LICENSE
[copyright] Remove years
6 years ago
Makefile
[tech debt] Remove experimental nullability checkers
5 years ago
Makefile.autoconf.in
[inferbo] Revert external relational domains (apron, elina)
5 years ago
Makefile.config
[buck] kill python code for the dead Java integration
5 years ago
PULL_REQUEST_TEMPLATE.md
[github] add issue and PR templates
6 years ago
README.md
Change license to MIT
7 years ago
autogen.sh
[copyright] Remove years
6 years ago
build-infer.sh
[ocaml] 4.08.1
5 years ago
configure.ac
[inferbo] Revert external relational domains (apron, elina)
5 years ago
dotbuckversion
[buck] fix version hashes
5 years ago
install-sh
[utils] Add CTypes binding of fts and implement remove_directory_tree
8 years ago
opam
[config] datatype for checkers
5 years ago
opam.locked
@allow-large-files [opam] Update dune to 2.3.1
5 years ago
Infer
Infer is a static analysis tool for Java,
C++, Objective-C, and C. Infer is written in OCaml .
Installation
Read our Getting
Started page for
details on how to install packaged versions of Infer. To build Infer
from source, see INSTALL.md .
Contributing
See CONTRIBUTING.md .
License
Infer is MIT-licensed.
Note: Enabling Java support may require you to download and install
components licensed under the GPL.