This commit add two additional cases for rule 20.3:
1. Support violations in the following format: `#include file.h`
2. Better multiline include directives and inline comments support.
See added test cases for examples.
* Refactor isNullOperand out of FwdAnalysis
* Improve isNullOperand
* Fix redundantAssignment FP with unsigned zero
* isNullValue check number
* Enhance isNullOperand to handle c++ casts
Also handle cast of NULL.
Define different sets of reserved keywords for C90 and C99.
This will fix false negative for compliant example, defined in MISRA
document, and close trac 9506.
It allows (for example) cppcheck to detect that the lhs and the rhs are
the same in the following example:
double g()
{
double a = 1e1
return a & 10.0;
}
Improve isSameExpression() for literals with same value but different
representation, for example the following different ways of
representing 9 as double: 9.0, 0.9e1 and 0x1.2p3.
With this change, cppcheck can (for example) correctly detect that the
else if statements are always false in the following example:
void f(double x) {
if (x < 9.0) {}
else if (x < 0x1.2p3) {}
else if (x < 0.9e1) {}
}
* parser: Parse standards node at start event
This required, because we can loose data at the end event.
* misra.py: Fix 5.4 standard-dependent error
By default Cppcheck use C11 standard, so this change fix false positives
for rule 5.4 with C99.
* travis: force --std=c89 for misra.py
* add support for selected Visual Studio configurations in the UI and the project file
* skip VS configurations that don't match the one in the project file
* rename xml tags
* disable selected VS config textbox if all VS configs should be analyzed
* on importing a VS project/solution also read all configurations
* add QListWidget for VS configurations
* auto select these configs that were loaded from the cppcheck file
* fine tune UI and handling if no VS solution/project is used
Co-authored-by: Daniel Marjamäki <daniel.marjamaki@gmail.com>