Three attributes are reset in this member function even if their values
are stored in the same token object.
Move a corresponding sanity check so that less assignments could be
performed eventually.
Link: https://trac.cppcheck.net/ticket/8532
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
This hopefully fixes all Travis crashes when running cppcheck:
[./test/Analysis/stack-addr-ps.c] (error) Internal error: Child process crashed with signal 11 [cppcheckError]
[./test/Index/complete-pointer-and-reference-to-functions.cpp] (error) Internal error: Child process crashed with signal 11 [cppcheckError]
[./test/SemaCXX/vararg-non-pod.cpp] (error) Internal error: Child process crashed with signal 11 [cppcheckError]
* Added parsing suppressions from dump xml.
* Added code to dump suppressions to an xml file
* Added declaration for dump function
* Suppressions will now be written to the xml file when a dump is requested
* Fixed syntax error
* Removed excess whitespace
* Fixed indentation to be consistent
* Fixed indentation to be consistent
* Fixed indentation to be consistent
* Added missing include for ErrorLogger::toXml
* Fixed suggestions from pull request #1166
Switched to using ranged for loop to iterate through suppressions.
Made the line number attribute optional, rather than 0 if not specified. This means when Python deserialises it it will be None, which is more pythonic.
* Implemented checking suppressions in reportError
This modification expects suppressions and a function to be called to write a line of output to be passed in. The function checks if any of the suppressions match the warning (with the new Suppression.isMatch function) and if so returns None. This change maintains the old behaviour of returning the warning text, but adds the possibility of returning None if the warning was suppressed.
* Fixed code quality warnings
* Removed more extraneous whitespace