Daniel Marjamäki
61e1dd5096
Environment: Refactoring and cleanup
2013-07-05 20:55:31 +02:00
Daniel Marjamäki
1a35241aa2
testrunner: removed redundant ';'
2013-06-30 19:44:12 +02:00
Daniel Marjamäki
582e0ee7e7
testrunner: Added REGISTER_TEST. Thanks lucasmrod.
2013-06-30 19:42:26 +02:00
Daniel Marjamäki
6b2bab535b
CLI,LIB: Added --std setting for GTK
2013-06-29 12:55:24 +02:00
Daniel Marjamäki
ae7363fe54
Fixed #4599 (False positive with fopen/fclose test)
2013-05-23 06:34:22 +02:00
Daniel Marjamäki
cf75e2bb28
astyle formatting
2013-04-30 06:44:50 +02:00
Baris Demiray
548dd42aaf
Fixed #933 (Leaks with struct members not detected)
2013-04-26 16:11:57 +02:00
XhmikosR
700512a53f
use spaces in strings
2013-04-09 17:49:09 +02:00
Ettl Martin
3e8eddc69e
cleanup testcases: moved testcases from #3888 into allocfunc13 which contains similar testcases already.
2013-04-03 10:12:36 +02:00
Ettl Martin
9f25b618dc
#3888 added a testcase
2013-04-03 08:57:26 +02:00
Ettl Martin
1b9c1c03fa
unittests: removed not needed '\n' at the end of testcases.
2013-03-20 15:36:16 +01:00
PKEuS
14feaa8d39
Refactorizations:
...
- Fixed lots of cppcheck messages about functions that can be const or static
- Fixed possible nullpointer dereference message in symboldatabase.cpp
- Replaced tokAt(+-1) by next()/previous()
2013-03-12 07:42:00 -07:00
PKEuS
d78c06dc3f
Replaced _settings->isEnabled("style") by _settings->isEnabled("warning") wherever warnings are issued
2013-03-03 02:41:59 -08:00
Daniel Marjamäki
2edf95a1b9
Fixed #4367 (false positive: Class '...' is unsafe, '...' can leak by wrong usage)
2013-02-24 08:14:25 +01:00
Frank Zingsheim
5144307642
Raise syntax error for if-condition without parentheses according to #2518 #4171
2013-02-05 21:13:57 +01:00
Daniel Marjamäki
bd7e3cbac5
Fixed #4540 (memory leak not detected ('.' or '->' is used before Function))
2013-01-31 17:00:50 +01:00
Frank Zingsheim
6dc9987ad0
Fixed #4517 (Testmemleak should not use Tokenizer on pseudo code)
2013-01-27 02:41:43 +01:00
Daniel Marjamäki
f86e83d813
Memory leaks: Improved handling of allocation functions that contains ::. Ticket: #4494
2013-01-22 21:33:39 +01:00
Reijo Tomperi
5d5f7085bf
Updating year 2012 -> 2013 to .cpp and .h files and man page.
2013-01-01 18:29:08 +02:00
Daniel Marjamäki
a84d21f271
CheckMemoryLeaksInFunction: Fixed problems with catch and function calls. Ticket: #4405
2012-12-16 18:06:40 +01:00
Frank Zingsheim
327db15284
Fix #4045 : memory leak not reported after usage of " + p[]"
2012-12-09 08:59:21 +01:00
PKEuS
4737966caf
Unit test cleanup: Removed some empty lines and whitespaces before \n.
2012-12-06 10:19:22 -08:00
PKEuS
36aeb74b5a
Fixed string literals in several unit tests (one test failing - changed it to TODO)
2012-11-29 21:07:52 +01:00
Daniel Marjamäki
38213f1f2f
Fixed #4237 (False positive: (error) Memory Leak: data (assign reference variable value to a shadow variable in inner scope))
2012-10-27 16:36:14 +02:00
Daniel Marjamäki
863441afe8
Fixed #4236 (False positive: pointer free()d twice - neglecting call to other function)
2012-10-25 19:41:18 +02:00
PKEuS
22a8e3f4e6
Replaced Tokenizer::getFunctionTokenByName() by SymbolDatabase::findFunctionByName(), which handles scopes slightly better.
2012-09-11 18:03:47 +02:00
Daniel Marjamäki
54f1771938
Fixed #4082 (Maybe false positive: memleak)
2012-09-10 17:27:41 +02:00
Daniel Marjamäki
2a9eaebcaa
replaced tabs with spaces
2012-09-05 20:50:25 +02:00
PKEuS
1fbaae948c
Added regression test cases for #404 .
2012-08-26 11:39:17 +02:00
PKEuS
35d94c26d5
Changed creation of SymbolDatabase. Database always created after Tokenizer::tokenize() and Tokenizer::simplifyTokenList() instead of on-demand creation by Tokenizer::getSymbolDatabase.
...
-> With Token::scope() it is possible to access the symboldatabase without having to call getSymbolDatabase(). The change increases safety because it is guaranteed that the database is available in all checks, even if the specific check doesn't call getSymbolDatabase
- Tokenizer::_symbolDatabase does no longer have to be mutable -> Increased const correctness
The change above required two additional changes:
- A bug causing a debug message was fixed in the symboldatabase that became visible in the test suite by the change above.
- Simplify expressions like "struct struct Foo" which might be result of typedef instanciation.
2012-08-12 03:01:24 -07:00
PKEuS
45bad7d1b2
Refactorized tokenizer:
...
- Don't run setVarId() twice, keep old varId's while/after simplifyTokenList
-> Modified two test cases in testmemleak.cpp. I consider this to be safe. Feel free to investigate this.
- Fixed two nullpointer issues shown by cppcheck
Ran Astyle on teststl.cpp
2012-08-10 09:31:22 -07:00
PKEuS
003a9be3ed
Refactorizations: Made several test functions const according to cppcheck messages.
2012-08-02 02:13:09 -07:00
PKEuS
78bc4ddbad
Fixed unusedFunctions warnings emmitted by cppcheck:
...
- Several tests in testcmdlineparser.cpp were never executed (failing tests commented)
- Unnecessary function in testmemleak.cpp removed.
2012-08-01 11:18:03 -07:00
Daniel Marjamäki
0ead18122d
Fixed #3695 (False positive: memory leak (ptr?free(ptr):0))
2012-07-27 12:25:20 +02:00
Daniel Marjamäki
e6f761126c
Fixed #2802 (False positive: ::free() is not recognised as free() to release buffers)
2012-07-24 09:28:08 +02:00
Daniel Marjamäki
a768b0e8b2
Fixed #3954 (Pointer reference memory leak false positive)
2012-07-17 16:28:34 +02:00
PKEuS
2103811291
Refactorizations in testrunner:
...
- Removed unnecessary space characters
- Removed comments from test cases which are not preprocessed
2012-07-16 05:02:33 -07:00
PKEuS
5caab6ba10
Fixed crash on garbage code ( #3870 )
2012-07-06 09:03:33 -07:00
Ettl Martin
7401104f45
#2773 added missing testcase
2012-07-02 10:01:37 +02:00
Daniel Marjamäki
0042ee7bc8
Fixed #3660 (False positive memleak (allocation function uses non-local variable))
2012-06-25 20:00:50 +02:00
Daniel Marjamäki
abde1d0ec1
added comment in test case
2012-06-23 20:20:11 +02:00
Daniel Marjamäki
72d24ab4b4
Fixed #3904 (false positive memory leak with linked list)
2012-06-23 20:15:58 +02:00
Daniel Marjamäki
a823d29da3
Fixed #3809 (false positive: memory leak)
2012-06-01 19:01:19 +02:00
Ettl Martin
1620c5b797
added todo testcase for ticket #3809
2012-05-29 21:44:39 +02:00
Daniel Marjamäki
2e41510e30
Fixed #3806 (Possible leak in public function. The pointer '' is not deallocated before it is allocated)
2012-05-29 21:13:34 +02:00
PKEuS
1a5fbd61d2
Splitted class TokenList from Tokenizer
2012-05-05 09:33:26 -07:00
PKEuS
04704ac5fa
Refactorizations in checkmemoryleak.cpp:
...
- Use symbolDatabase more often to increase performance and accuracy.
- Replaced indendation counter
- Replaced custom stringify implementation
Benchmark results (sqlite checking):
4% complete, 7% on "Memory leaks (function variables)", 9% on "Memory leaks (address not taken)" and 82% on "Memory leaks (struct members)"
2012-05-03 10:43:47 +02:00
Ettl Martin
8494df74e6
#2540 : added missing testcase.
2012-04-26 13:16:46 +02:00
PKEuS
4dcb2ef57b
Refactorizations in test suite:
...
- Removed again one custom stringify implementation
- Avoided unnecessary std::string creation in testbufferoverrun.cpp
2012-04-16 20:02:52 +02:00
Daniel Marjamäki
8e3f1702fd
Reverted 81318b3f
to get rid of #3669 false positives
2012-04-10 13:58:59 +02:00