aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/Checks.ml
Commit message (Collapse)AuthorAgeFilesLines
* Added unused attribute and simplified checks.Bernhard Schommer2017-02-171-43/+82
| | | | | | | | | The attribute unused can be used to indicate if a variable or parameter is unused and no warning should be emitted for it. Furthermore this commit simplifies the check by adding a generic function to traverse the program. Bug 19872
* Adopted unused variable and attribtue checkBernhard Schommer2017-02-171-28/+53
| | | | | | | | | The unused variable check now uses two passes. One to collect the used variables and one to report the unused variables. Futhermore attribute checks are extended to composite declaration. Also the check is now performed after elaboration. Bug 19872
* Extended unused vars check for params.Bernhard Schommer2017-02-171-1/+3
| | | | | | The test now also checks whether the parameter are used at all in the function body. Bug 19872
* Added a simple check for unused variables.Bernhard Schommer2017-02-171-1/+77
| | | | | | | | | | | | | | | | | The check test whether the identifier is used at all in the function and if not issue a warning. It is not tested whether the usage is reachable at all, so int i; if (0) i; would not generate a warning. This is the same as gcc/clang does. The warning is disabled per default, but is active if -Wall is given. Bug 19872
* Checks can be applied add several places.Bernhard Schommer2017-02-171-6/+3
| | | | | | There should not be a single check place, since for example unknonw attributes should be check after elaboration and other simplifications.
* Also check the locals. Bug 19872.Bernhard Schommer2017-02-171-3/+7
|
* Added new module for checks on elaborated C codeBernhard Schommer2017-02-171-0/+94
The new module adds a function which is called during parse after all C transformation have taken place for adding additional checks. Currently only unknown attribute are checked. Bug 19872