Summary:
Rename Typ.mk_struct to internal_mk_struct, and add Tenv.mk_struct that
ensures types are added to the environment under the right name.
Reviewed By: cristianoc
Differential Revision: D3791865
fbshipit-source-id: fd4b667
Summary:
For tests that have reports of the form `<file>:<line>*`, sort first by
file, then by line numerically.
Reviewed By: sblackshear
Differential Revision: D3828044
fbshipit-source-id: d10cffe
Summary:
The Typ.struct_typ.csu field is now redundant with the Csu.t in the
name: Typename.t field.
Reviewed By: cristianoc
Differential Revision: D3791861
fbshipit-source-id: 5370885
Summary: Replace the struct_name: Mangled.t option field of Typ.struct_typ with name: Typename.t
Reviewed By: sblackshear
Differential Revision: D3791860
fbshipit-source-id: 3ee1d00
Summary:
Given that mangling now respects `extern "C" {}` declarations, pnames of C function will have no mangling and we don't need to discard mangled part from procname.
Move `malloc` detection to `get_builtin_pname_opt` function (together with all others)
Reviewed By: dulmarod
Differential Revision: D3804402
fbshipit-source-id: 9ae9991
Summary:
When a project defines the same symbol in different files,
the results of the capture will be different depending on
the order in which files are captured.
In particular, if a procedure with the same name is defined in different files,
it will be associated with the last file being captured.
So the results can be different if the files are processed in different order.
In case of parallel capture, this has in effect a non-deterministic behaviour.
This diff defines a canonical file (alphabetically) when a procedure is multiply
defined, so that the procedure is associated to the same file whatever the order.
Reviewed By: jeremydubreil
Differential Revision: D3805002
fbshipit-source-id: 2c561f4
Summary:
There were overly complex and different ways of identifying C++/objC languages. Simplify and unify them.
How I came up with naming - there are two languages C and C++. You can apply "Objective-" extention to both of them.
We usually need to differentiate C and C++ (different AST) and whether it's extended (checks specific to ObjC)
Reviewed By: dulmarod
Differential Revision: D3804457
fbshipit-source-id: 685e40a
Summary:
ti_raw field tends to grow exponensially for template instantiations.
ASTexporter no longer gives this bit of information and infer needs to stop using it.
Reviewed By: jvillard
Differential Revision: D3798192
fbshipit-source-id: ba7cbb9
Summary:
We already have logic that deals with adding custom procnames in `function_deref_trans`. This diff simplifies `callExpr_trans` and removes
complex logic responsible for finding type of function.
There is no functional change intended (it will come in future diffs)
Reviewed By: dulmarod
Differential Revision: D3797839
fbshipit-source-id: 21fc13f
Summary:
Translate code coming from std::headers only when it's reachable from user code during translation.
This way, we reduce number of functions analyzer sees and decreases size of cfg/number of .attr files
Reviewed By: jvillard
Differential Revision: D3797550
fbshipit-source-id: 2a9eb4c
Summary:
This diff fixes two issues in the backend that were causing Bad_footprint
errors when abducing pointsto facts for expressions that start in an array
access and follow up with another structured access, eg `x[0].some_field`:
1. array accesses were assumed to come last in these expressions
2. the type of the root exp passed to the function that walks down the list of
offsets to apply to it was wrong in the case of arrays: it was always the
type of the whole expression instead of the root expr (eg the type of
`x[0].some_field` instead of the type of `x`).
Reviewed By: sblackshear, jeremydubreil
Differential Revision: D3800566
fbshipit-source-id: 0511604
Summary:
1. models no longer need access to private fields (shared_ptr needed that)
2. create macro for __attribute__((deprecated("__infer_replace_with_deref_first_arg"))) and use it in models
Reviewed By: jberdine
Differential Revision: D3791113
fbshipit-source-id: 532dd33
Summary:
Follow strategy that was done to `std::shared_ptr` model and translate
`std::unique_ptr<T>` as raw pointer `T*`.
As a bonus, model `operator[]` of array overload as dereference
Reviewed By: jvillard
Differential Revision: D3785031
fbshipit-source-id: 2c5b0a4
Summary:
This reverts commit 7e3f8ffc84980ea5bcb4dae63a1588c07460c946.
Workaround is no longer needed since new clang we use has fix for this:
https://llvm.org/bugs/show_bug.cgi?id=28519
Reviewed By: dulmarod
Differential Revision: D3791083
fbshipit-source-id: ec339f1
Summary: This breaks a dependency to allow cFrontend_utils.ml to call into cLocation.ml.
Reviewed By: sblackshear
Differential Revision: D3779514
fbshipit-source-id: 6ca83d6
Summary: Fix pattern matching of the `parameters` field of `DeprecatedAttr`
Reviewed By: akotulski
Differential Revision: D3782788
fbshipit-source-id: df8dd40
Summary:
This simplifies the determination of whether the current process is the
originator of all the infer sub-processes.
Reviewed By: jvillard
Differential Revision: D3751324
fbshipit-source-id: 5e6dc6b