* MatchCompiler: Neaten error messages
Especially the added space makes it a little more readable.
* MatchCompiler: Add spaces between operators
* Matchcompiler: Don't bailout if non-const pattern
If matchcompiler found a call to Token::Match() or Token::simpleMatch()
with an unknown string argument, subsequent calls to Token::Match() or
Token::simpleMatch() on the same line would not be processed by
matchcompiler.
To fix this, keep track of the last index we found a match, and update
it accordingly when the line is modified. To avoid having to keep track
of if "Match" or "simpleMatch" is the first match we find, just make a
loop over them.
In tools/, it did not understand that some files are generated by
matchcompiler.py.
```
CMake Error at tools/CMakeLists.txt:7 (add_executable):
Cannot find source file:
</some/path>/cppcheck/build/lib/build/mc_pathmatch.cpp
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
CMake Error at tools/CMakeLists.txt:7 (add_executable):
No SOURCES given to target: dmake
```
Co-authored-by: Ken-Patrick Lehrmann <kp.lehrmann@gmail.com>
* cleaned up compiler options related code in CMake
* moved cmake_minimum_required() and raised to latest 2.8.x version
* use proper compiler version check / print compiler version
* fixed linking of sanitized builds
* added proper version checks to newer Clang warnings and enabled them / moved tinyxml_objs flags to proper compiler
* disabled -Wdeprecated-declarations for Clang
* compileroptions.cmake: removed unnecessary check for clang++ existence - CMAKE_CXX_COMPILER_ID is determined by CMake
* printInfo.cmake: removed unnecessary message for ANALYZE_ADDRESS - LSAN is part of ASAN and enabled by default
* cleaned up if() comparisons in CMake
* added/adjusted TODOs
Sometimes it could happen that SIGSEGV is thrown when Cppcheck is killed
because of a timeout. Then the execution is wrongly handled as a crash
and debugged with gdb instead of marking it as timed out.
This fixes that issue by checking the time out before checking sig_num.