Cristiano Calcagno
f17f54939b
checkers can now analyze a restricted subset of the procedures defined in a file
...
Reviewed By: jvillard
Differential Revision: D2554136
fb-gh-sync-id: c972f0e
9 years ago
Cristiano Calcagno
1e6247c872
[frontend] generate fresh ids separately for different procedures in the cfg
...
Summary:
each procedure has a different scope, so we can restart the fresh name generator and have more stable instructions in the cfg, that don't change when other procedures are changed
9 years ago
Cristiano Calcagno
ea7c13ff6c
[backend][cleanup] Move proc_attributes to a separate module.
...
Summary:
Move proc_attributes to a separate module.
Field err_log, in common between proc desc and summary, can now be moved to ProcAttributes without creating cycles of dependencies.
9 years ago
Cristiano Calcagno
6f65486942
[backend][cleanup] move fields in common to Cfg.Procdes and Specs.summary to proc_attributes.
...
Summary:
There's a lot of overlap between the representation of a proc desc and a spec summary. This diff moves all the data in common to the single record proc_attributes defined in Sil.
This gives a unified way of accessing most of the data carried by a procedure, whether it is contained in a proc desc or a spec. Also, it ensures that there is a single flow of information from proc desc to spec in the back-end, making sure that the information represented stays consistent.
9 years ago
Rohan Jacob-Rao
9643bdb1c6
Clean up command line argument filtering.
9 years ago
Rohan Jacob-Rao
9b3f291b99
Refactor main file to handle command line arguments and relative source paths.
9 years ago
Rohan Jacob-Rao
7f8282e046
Simplify generation of source file locations and attach to more SIL objects.
9 years ago
Rohan Jacob-Rao
f192b02f01
Integrate LLVM analysis with infer script.
9 years ago
Rohan Jacob-Rao
6f51b8c54b
Handle source location metadata generated by clang wrapper.
9 years ago
Rohan Jacob-Rao
37a4709a0f
Translate call instruction and construct call graph.
9 years ago
Rohan Jacob-Rao
5e5fac5dbc
Fix some indentation and a stray comment.
9 years ago
Rohan Jacob-Rao
e127255f60
Renamed some types and variables for consistency.
9 years ago
Rohan Jacob-Rao
f3afc6848b
Open Utils module to avoid prefixing common list functions.
9 years ago
Rohan Jacob-Rao
96d5931744
Report source file name in error log.
9 years ago
Rohan Jacob-Rao
f8ed9b91f5
Fill in source line numbers in SIL instructions.
9 years ago
Rohan Jacob-Rao
a7da6066e5
Build maps of metadata variables.
9 years ago
Rohan Jacob-Rao
b4f554b5f5
Parse call to debugging llvm.dbg.declare function.
9 years ago
Rohan Jacob-Rao
c264f95ab3
Setting up metadata variable mappings.
9 years ago
Rohan Jacob-Rao
b3b67cdf69
Add metadata types to AST.
9 years ago
Rohan Jacob-Rao
4a55382345
Refactored grammar for metadata definitions.
9 years ago
Rohan Jacob-Rao
4bb331ad4f
Parse and ignore function declarations.
9 years ago
Rohan Jacob-Rao
f9939786fb
Add function types.
9 years ago
Rohan Jacob-Rao
ded6b1d654
Fix parsing of boolean constants
9 years ago
Rohan Jacob-Rao
f20236fcac
Parse metadata nodes.
9 years ago
Rohan Jacob-Rao
ef01c485da
Made parser syntax consistent: list(X) -> X* and option(X) -> X?.
9 years ago
Rohan Jacob-Rao
353f442efb
Parse debug annotations and add them to AST.
9 years ago
Rohan Jacob-Rao
026ca7176e
Parse data layout and target triple.
9 years ago
Rohan Jacob-Rao
950b6f4aa4
Added dumb parsing of metadata.
9 years ago
Rohan Jacob-Rao
3c0e698671
Moved LLVM examples and added licence headers.
9 years ago
Rohan Jacob-Rao
b8b62cbcb0
Add optional alignment argument to alloca, load and store rules.
9 years ago
Rohan Jacob-Rao
07d1f8b821
Properly add local variable declarations to procedure.
9 years ago
Rohan Jacob-Rao
e1d071fb1f
Fix error in parsing int constants.
9 years ago
Rohan Jacob-Rao
66aecca31f
Allow for attribute groups in function definitions.
9 years ago
Rohan Jacob-Rao
8fbe358b34
Add tiny C example of null pointer error.
9 years ago
Rohan Jacob-Rao
e9f1f03aa0
Added empty AST node for binops, to prevent build warnings.
9 years ago
Rohan Jacob-Rao
264a46f80c
Initial attempt to translate alloca instruction.
9 years ago
Rohan Jacob-Rao
6dc20cd4e6
Add "unnamed" (i.e. numbered) variables to syntax.
9 years ago
Rohan Jacob-Rao
9ac4b11056
Translation of load instruction.
9 years ago
Rohan Jacob-Rao
a20d178e7c
Translation of basic store instruction.
9 years ago
Rohan Jacob-Rao
51ebf2493e
Fixed bug in parsing of variables.
9 years ago
Rohan Jacob-Rao
9b8cd7d582
Generate chain of CFG nodes for instructions in a function.
9 years ago
Rohan Jacob-Rao
795742a3a2
Clean up some comments.
9 years ago
Rohan Jacob-Rao
be640f9c4e
Remove build warnings by commenting out unused tokens.
9 years ago
Rohan Jacob-Rao
d8a2ce2417
Generate CFG and call graph files.
9 years ago
Jules Villard
bae8a4dced
[whitespace] indent .ml files as well
9 years ago
Jules Villard
6911a1516c
[whitespace] ocp-indent the code
...
Summary:
This commit is the result of
`find infer/src -name '*.ml' -or -name '*.mli' -exec ocp-indent -i \{\} \;`
and
`INFER_CHECK_COPYRIGHT=1 InferPrint`
9 years ago
Dulma Rodriguez
d7655a087e
[clang] Adding getters and setters for all the methods
9 years ago
Rohan Jacob-Rao
0946c9e460
Start of SIL generation from AST.
...
Summary:
Added phase to construct (incomplete) CFG from existing AST.
Individual instructions are not yet translated so any nonempty functions will
result in a runtime exception.
Added some very short examples of LLVM programs.
10 years ago
Cristiano Calcagno
3e199467f4
Complete copyright messages.
10 years ago
Rohan Jacob-Rao
fc0ca6b6db
Initial LLVM parser.
10 years ago