cppcheck/lib
rikardfalkeborn 491ee577c6 Support floats in valid config (#1297)
* Add tests for invalid ranges

* Refactor loadLibErrors

This reduces the amount of code slightly and will simplify adding
more tests.

* Handle empty valid field

Before this change, the sequence <valid></valid> in a config file would
result in a segmentation fault. Now an empty field results in the error
message:

cppcheck: Failed to load library configuration file 'mycfg.cfg'. Bad attribute value '""'

* Add support for valid for floating point arguments

Previously, it was not possible to add valid ranges to floating point
arguments since it only handled integers. This made ranges not work well
for floating point arguments since arguments were cast to integers
before the ranges were handled.

Fix this by using doubles instead of integers if the argument is a float.
Add some tests for this and make sure errors are printed with enough
precision (somewhat arbitrarily chosen).

Note that it is still only possible to add integer ranges (i.e. -1:1).

* Add support for floats in configuration valid range

Now that it is possible to handle decimal arguments, there is no reason
to not allow non-integer ranges. Take care to not allow broken
configurations.

* Move check to within if-clause

* Move asin{,f,l} and acos{,f,l} input checks to config file
2018-07-15 22:47:56 +02:00
..
CMakeLists.txt Fixed #7660 (cmake build does not handle simplecpp) 2016-08-06 18:21:54 +02:00
analyzerinfo.cpp refactoring; use range for loops 2018-07-13 22:56:20 +02:00
analyzerinfo.h Renamed private member analyzerInfoFile 2018-06-17 08:11:48 +02:00
astutils.cpp astyle formatting 2018-07-15 14:45:33 +02:00
astutils.h Fix FP with duplicate assignments by checking if the expression is unique (#1223) 2018-05-13 20:20:55 +02:00
check.cpp Renamed Check::_name 2018-06-16 16:31:07 +02:00
check.h Renamed Check::_name 2018-06-16 16:31:07 +02:00
check64bit.cpp Rename _tokenizer, _settings, _errorLogger 2018-06-16 16:10:28 +02:00
check64bit.h Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
checkassert.cpp Rename _tokenizer, _settings, _errorLogger 2018-06-16 16:10:28 +02:00
checkassert.h Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
checkautovariables.cpp Refactoring; Use Token::isUnaryOp() to clarify code 2018-07-13 23:02:52 +02:00
checkautovariables.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
checkbool.cpp Refactoring; Use Token::isBinaryOp() to clarify code, use early continue in loop 2018-07-13 23:06:45 +02:00
checkbool.h Add some missing errors to --errorlist output. (#1292) 2018-06-20 10:43:13 +02:00
checkboost.cpp Rename _tokenizer, _settings, _errorLogger 2018-06-16 16:10:28 +02:00
checkboost.h Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
checkbufferoverrun.cpp Refactoring; Use Token::isUnaryOp() to clarify code 2018-07-13 23:12:20 +02:00
checkbufferoverrun.h Rename private member variables 2018-06-17 17:20:16 +02:00
checkclass.cpp Refactoring; Use range for loop 2018-07-14 07:55:18 +02:00
checkclass.h Rename private member variable 2018-06-17 18:43:54 +02:00
checkcondition.cpp Refactoring; Use range for loop 2018-07-14 08:18:10 +02:00
checkcondition.h Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
checkexceptionsafety.cpp Refactoring; Use range for loops 2018-07-14 09:49:03 +02:00
checkexceptionsafety.h Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
checkfunctions.cpp Support floats in valid config (#1297) 2018-07-15 22:47:56 +02:00
checkfunctions.h Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
checkinternal.cpp Rename _tokenizer, _settings, _errorLogger 2018-06-16 16:10:28 +02:00
checkinternal.h Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
checkio.cpp Refactoring: Use range for loops 2018-07-14 10:02:32 +02:00
checkio.h Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
checkleakautovar.cpp Refactoring: use range for loops 2018-07-14 09:54:52 +02:00
checkleakautovar.h Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
checkmemoryleak.cpp Refactoring: Use range for loops 2018-07-14 10:09:12 +02:00
checkmemoryleak.h Refactorings in CheckMemoryLeak 2018-06-18 09:40:27 +02:00
checknullpointer.cpp Clarify code with Token::isUnaryOp() 2018-07-14 10:26:22 +02:00
checknullpointer.h Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
checkother.cpp Clarify the code with Token::isUnaryOp and Token::isBinaryOp 2018-07-14 13:01:24 +02:00
checkother.h Add some missing errors to --errorlist output. (#1292) 2018-06-20 10:43:13 +02:00
checkpostfixoperator.cpp Refactoring: Use ranged for loop 2018-07-13 16:50:12 +02:00
checkpostfixoperator.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
checksizeof.cpp Refactoring: Use ranged for loops 2018-07-13 16:40:15 +02:00
checksizeof.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
checkstl.cpp Refactoring: Use range for loop 2018-07-13 16:46:29 +02:00
checkstl.h Add some missing errors to --errorlist output. (#1292) 2018-06-20 10:43:13 +02:00
checkstring.cpp Refactoring: Use ranged for loops 2018-07-13 16:40:15 +02:00
checkstring.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
checktype.cpp Refactoring; use range for loop 2018-07-13 16:57:17 +02:00
checktype.h Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
checkuninitvar.cpp Rename _tokenizer, _settings, _errorLogger 2018-06-16 16:10:28 +02:00
checkuninitvar.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
checkunusedfunctions.cpp Rename private member variables 2018-06-17 18:58:27 +02:00
checkunusedfunctions.h Rename private member variables 2018-06-17 18:58:27 +02:00
checkunusedvar.cpp Rename private member variables 2018-06-17 19:04:06 +02:00
checkunusedvar.h Rename private member variables 2018-06-17 19:04:06 +02:00
checkvaarg.cpp Rename _tokenizer, _settings, _errorLogger 2018-06-16 16:10:28 +02:00
checkvaarg.h Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
config.h Removed non-standard code annotations with __attribute__ 2016-01-09 09:33:56 +01:00
cppcheck.cpp Rename private member variables 2018-06-17 19:20:07 +02:00
cppcheck.h Rename private member variables 2018-06-17 19:20:07 +02:00
cppcheck.natvis Fixed Visual Studio Natvis file after recent refactoring (#1299) 2018-07-09 08:27:26 +02:00
cppcheck.vcxproj Copy platforms/ directory to bin/ 2018-02-27 09:09:12 +01:00
cppcheck.vcxproj.filters Fixed travis build by replacing Token::Match by simpleMatch() 2017-03-16 21:15:10 +01:00
errorlogger.cpp V817 It is more efficient to seek '\t' character rather than a string. errorlogger.cpp 448 (#1290) 2018-06-17 16:39:28 +02:00
errorlogger.h Rename _symbolNames 2018-06-17 07:59:48 +02:00
importproject.cpp Fix some doxygen warnings 2018-06-07 08:33:32 +02:00
importproject.h Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
lib.pri Added --cppcheck-build-dir flag 2016-10-29 12:18:11 +02:00
library.cpp Support floats in valid config (#1297) 2018-07-15 22:47:56 +02:00
library.h Support floats in valid config (#1297) 2018-07-15 22:47:56 +02:00
matchcompiler.h Update copyright year to 2007-2016. 2016-01-01 15:34:45 +02:00
mathlib.cpp Rename private member variables 2018-06-17 17:04:34 +02:00
mathlib.h Rename private member variables 2018-06-17 17:04:34 +02:00
path.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
path.h Updated copyright year 2018-01-14 15:37:52 +01:00
pathmatch.cpp Rename private member variables 2018-06-17 19:20:07 +02:00
pathmatch.h Rename private member variables 2018-06-17 19:20:07 +02:00
pcrerules.pri
platform.cpp Updated copyright year 2018-03-31 20:59:09 +02:00
platform.h Updated copyright year 2018-03-31 20:59:09 +02:00
preprocessor.cpp Refactoring; use range for loops 2018-07-15 15:03:08 +02:00
preprocessor.h Renamed private member file0 2018-06-17 09:06:16 +02:00
settings.cpp Renamed _terminated 2018-06-17 08:22:53 +02:00
settings.h Renamed _terminated 2018-06-17 08:22:53 +02:00
standards.h Updated copyright year 2018-01-14 15:37:52 +01:00
suppressions.cpp Refactoring: Use range for loops 2018-07-15 14:51:33 +02:00
suppressions.h Renamed _fileName 2018-06-17 08:19:10 +02:00
symboldatabase.cpp Revert "SymbolDatabase: Improved lookup of function calls" 2018-06-26 23:14:12 +02:00
symboldatabase.h Code cleanup 2018-06-20 10:39:21 +02:00
templatesimplifier.cpp Refactoring: Use range for loops 2018-07-15 14:45:15 +02:00
templatesimplifier.h Renamed _codeWithTemplates 2018-06-16 22:03:04 +02:00
timer.cpp Rename private member variables 2018-06-17 17:20:16 +02:00
timer.h Rename private member variables 2018-06-17 17:20:16 +02:00
token.cpp Support floats in valid config (#1297) 2018-07-15 22:47:56 +02:00
token.h Refactoring, use Token::isUnaryOp and Token::isBinaryOp 2018-07-13 18:52:03 +02:00
tokenize.cpp Refactoring; Use range for loops 2018-07-14 22:49:31 +02:00
tokenize.h Rename private variable maxtime 2018-06-18 09:49:00 +02:00
tokenlist.cpp Renamed _isC and _isCPP 2018-06-16 16:28:03 +02:00
tokenlist.h Renamed _isC and _isCPP 2018-06-16 16:28:03 +02:00
utils.h Replaced make_container by C++11 initializer lists 2018-04-08 23:03:44 +02:00
valueflow.cpp Clarify code with Token::isUnaryOp() 2018-07-14 22:36:08 +02:00
valueflow.h Updated copyright year 2018-01-14 15:37:52 +01:00
version.h Set version to 1.84.99/1.85 dev 2018-06-25 21:03:43 +02:00
version.rc