Commit Graph

6624 Commits

Author SHA1 Message Date
Martin Ettl c26ec86508 std.cfg: Readded accidentially removed functions from <cfenv> and added test cases to test/cfg/std.cpp. 2015-08-16 15:05:42 +02:00
Martin Ettl ca7e232b60 Merge branch 'master' of https://github.com/danmar/cppcheck 2015-08-16 14:49:59 +02:00
Martin Ettl 58d7b8a3f2 std.cfg: Added more test cases. 2015-08-16 14:49:35 +02:00
PKEuS 0babc4f38f Moved some unit tests to testgarbage.cpp 2015-08-16 14:49:35 +02:00
Martin Ettl 2665fb9481 std.cfg: Removed some non-existent functions that accidentially declared being in standard namespace. Improved testing of std.cfg functions. 2015-08-16 14:38:13 +02:00
PKEuS ab8afec3eb Refactorizations:
- Avoid unnecessary loop iterations
- Avoid unnecessary condition checking
- Reduced code duplication in symboldatabase.cpp
2015-08-16 14:23:07 +02:00
Martin Ettl a8af7142a1 std.cfg: Added more test functions. 2015-08-16 01:29:34 +02:00
Martin Ettl 716b4d6e18 Another attempt to fix the current travis build. Improved testing of std.cfg. 2015-08-16 01:21:11 +02:00
Martin Ettl ab0862f218 std.cfg: Fixed travis build. Added noreturn to the assert-definition in std.cfg. Improved testing of std.cfg. 2015-08-16 01:09:03 +02:00
Martin Ettl b2bf6cde5f std.cfg: Improved testing of libary functions. Removed some non existent such as std::sinf from the libary and added corresponding test cases to test/cfg/. 2015-08-16 00:52:52 +02:00
Daniel Marjamäki c72047f6f5 Fix 'make checkcfg' errors. 2015-08-15 14:35:23 +02:00
PKEuS b77912a0b5 Support namespaces in CheckOther::checkIgnoredReturnValue() 2015-08-15 12:19:14 +02:00
PKEuS 4d80df2f4a Added pointer to Type to Token (similar to Token::Variable() and Token::function()):
- Accessible via Token::type()
- Renamed former Token::type() to Token::tokType()
- Removed SymbolDatabase::isClassOrStruct()
2015-08-15 11:19:21 +02:00
Daniel Marjamäki 871b02ea88 removed testcase for #5238. it's not good enough. 2015-08-15 07:38:56 +02:00
Martin Ettl 84486605ec #6392: Added a regression test case. 2015-08-15 01:00:36 +02:00
Martin Ettl 278808daa9 #5238: Added a regression test case. 2015-08-15 00:49:07 +02:00
Martin Ettl 640ec3a099 #6491: Added a regression test. 2015-08-15 00:31:26 +02:00
Alexander Mai 4fe61a6c3e Correct actual result string 2015-08-14 18:55:21 +02:00
Alexander Mai 8b433fa053 Add regression test for #6299. Fix clang compiler warning due to doxygen comment 2015-08-14 18:27:03 +02:00
PKEuS a297a03b64 Fixed false positive #6787: Skip over lambdas in CheckAutoVariables::returnReference() 2015-08-14 13:03:07 +02:00
PKEuS b0bf69bae7 Fixed false positive #6763 and reordered conditions
Ran AStyle
2015-08-14 12:50:45 +02:00
PKEuS 3cf67014ad Fixed parsing of template in enum 2015-08-14 11:08:03 +02:00
Daniel Marjamäki e578988832 invalidScanf: removed the checking for 'scanf crash with huge input data for old glibc'. new systems are not vulnerable to this bug anymore. 2015-08-14 08:03:46 +02:00
Martin Ettl e9b1f1f0a6 test/cfg/ Started to test std::complex functions. 2015-08-14 02:06:48 +02:00
Martin Ettl 77869b7812 test/cfg: Improved testing of functions from standard namespace. Added test/cfg/*.c* files to astyle script and formatted code. 2015-08-14 01:36:44 +02:00
Malcolm Parsons daf633ef78 Fixed #5028 Fix parsing of C++11 raw string literals 2015-08-12 13:11:55 +01:00
Daniel Marjamäki 6865724c4e Fixed #6914 (Token::expressionString: parenthesis missing in expression (*it)->stats.corpse_ticks) 2015-08-12 10:55:25 +02:00
PKEuS 002b606a9c Refactorized CheckObsoleteFunctions:
- Mention all checked functions in getErrorMessages() and classInfo(), not only posix ones
- Made members static and initialize them only once only once
- Better support for global namespace
2015-08-11 14:57:23 +02:00
Matthias Krüger 7a90b36cca CheckVaarg::va_start_subsequentCallsError: fix spelling "inbetween" -> "in between" 2015-08-11 14:03:00 +02:00
Matthias Krüger 391194579c CheckOther::checkComparisonFunctionIsAlwaysTrueOrFalseError: "evaluates always" -> "always evaluates" 2015-08-11 13:27:55 +02:00
Daniel Marjamäki 501ab0b6da CheckLeakAutoVar: updated handling of unknown types in C++ 2015-08-11 12:41:42 +02:00
Daniel Marjamäki 2e78d21480 Fixed #6730 (ValueFlow: inner scope does not return (continue,throw)) 2015-08-11 11:21:03 +02:00
Martin Ettl 797cac5098 Library: Started to test functions from std-namespace. 2015-08-10 23:44:36 +02:00
Martin Ettl ceafde86ad Library: Removed not needed suppressions. 2015-08-10 23:09:56 +02:00
Martin Ettl 38cba67115 Suppressed compiler warnings during testing cfg tests. 2015-08-10 22:58:46 +02:00
Alexander Mai b3cc4629a6 Remove obsolete tests. Add incomplete test for GNU __builtin_expect to gnu.c 2015-08-10 21:20:20 +02:00
Daniel Marjamäki 5b287fc849 Library: The <function> name attribute can now have a comma separated list of names 2015-08-09 21:27:57 +02:00
Daniel Marjamäki b70fe4c609 Fixed #6711 (Add namespace support to library files) 2015-08-09 19:55:33 +02:00
Daniel Marjamäki 9627fccdc5 assignFunctionArg: don't warn when there is self assignment. There is a separate warning for self assignments. 2015-08-09 14:51:23 +02:00
Daniel Marjamäki e71ab70356 Fixed #6871 (False positive uninitvar - pointer to uninitialized char[]) 2015-08-08 14:52:46 +02:00
Daniel Marjamäki 72706cd0b8 Fixed #6868 (Tokenizer: wrong simplification of the unlikely keyword) 2015-08-08 12:49:42 +02:00
Daniel Marjamäki 8f309aed12 TestUninitVar: cleanup duplicate tests for function handling 2015-08-08 09:57:56 +02:00
Daniel Marjamäki 7ec8adeb93 Fixed #6701 (Uninitialized variable warning when header could not be found) 2015-08-08 08:53:08 +02:00
Daniel Marjamäki c9e239afbf Fixed #6908 (False positive: Same expression on both sides of '+='.) 2015-08-07 20:28:25 +02:00
Daniel Marjamäki ec3d76be5e astyle formatting 2015-08-07 20:27:32 +02:00
amai2012 53feb88614 Merge pull request #630 from Dmitry-Me/detectRaceInInterlockedAccess
Prototype for detecting non-interlocked check after InterlockedDecrement()
2015-08-06 15:43:10 +02:00
Daniel Marjamäki 07a064aab0 Fixed #6910 (ValueFlow: variable incremented as macro argument is not known) 2015-08-05 14:08:57 +02:00
Dmitry-Me 43800a9419 Detect non-interlocked check after InterlockedDecrement() 2015-08-05 12:20:28 +03:00
Daniel Marjamäki eda5272dfd Fixed #6875 (Improve 'Redundant condition' error message) 2015-08-05 11:15:54 +02:00
Daniel Marjamäki 4bebb80300 Fixed #6869 (False positive: uninitvar, array passed to function) 2015-08-05 10:19:17 +02:00