5315 Commits

Author SHA1 Message Date
Daniel Marjamäki
e240282443 Value Flow: Another try with the abstract interpretation of for loops 2014-03-17 18:43:47 +01:00
PKEuS
2568baa473 #5528: Raise duplicateExpressionError on operators /, % and -. 2014-03-17 18:35:36 +01:00
PKEuS
fab6b56360 Improved check (#5553): Detect stricmp(var.c_str(), var.c_str()) 2014-03-17 17:41:45 +01:00
PKEuS
5f67bc1b0a Fixed varId problem #5293 (and its duplicate #5577): Classes inside functions are non-executable scopes. 2014-03-17 16:15:42 +01:00
Daniel Marjamäki
06618b31bb Fixed #5574 (False positive: mismatchAllocDealloc using realloc() and free) 2014-03-17 16:10:54 +01:00
PKEuS
521734faa2 Fixed setVarId-Bugs #5294 and #5295. 2014-03-17 14:19:46 +01:00
PKEuS
ebd0b43c4f Fixed #5382: False positive "scope can be reduced" when initializing two-dimensional array. 2014-03-17 12:34:39 +01:00
PKEuS
d325d14b11 Fixed false positive #5535: Reference named like its type. 2014-03-17 12:01:39 +01:00
PKEuS
50f6bb5d36 Fixed crash #5511. 2014-03-17 11:50:45 +01:00
PKEuS
86e6bb430a New check: Warning, if positioning operation (fseek) is performed on a file opened in "a" mode 2014-03-17 11:02:03 +01:00
PKEuS
1e57f54917 Fixed #5481: std::array is POD, so using memcpy (etc.) is allowed on it. 2014-03-16 19:55:32 +01:00
Martin Ettl
80b1271d01 Astyle running and added test cases for functions in std.cfg. 2014-03-10 02:21:44 +01:00
Lucas Manuel Rodriguez
9a08da17be Fixed #4928 (C++ operator aliases result in false 'assigned a value that is never used' warning) 2014-03-16 14:51:05 -03:00
PKEuS
e05fb847df Fixed #3852: Support simplification of C++11 "enum class", fixed existing simplifications 2014-03-16 18:24:46 +01:00
PKEuS
6b16b519a2 Fixed crash on wrong __attribute__((constructor)) syntax 2014-03-16 16:39:07 +01:00
Alexander Mai
cba1879fee Fixed #5571 (Clean up MathLib::isInt()) 2014-03-16 11:55:44 +01:00
Daniel Marjamäki
8c3f2c2ad9 Revert 894a65b0. abstract interpretation of for loops. there was some crashes and performance problems. I will fix those problems when I have time and recommit. 2014-03-16 08:38:52 +01:00
Alexander Mai
40ddcabab6 Fixed #4461 (Warn about memset/memcpy on class with references as members) 2014-03-15 18:22:29 +01:00
Daniel Marjamäki
894a65b0b1 ValueFlow: Refactor the for-loop handling. Use abstract interpretation. 2014-03-15 11:29:33 +01:00
Robert Reif
2ba3a36f2c Partial fix for #5555. Improved pure/const attributes handling 2014-03-14 19:06:05 +01:00
Robert Reif
e26bd5b99c Fixed #5563 (add __attribute__((destructor)) and improve __attribute__((constructor)) support) 2014-03-14 18:17:21 +01:00
Daniel Marjamäki
8c7cf090c4 Merge pull request #261 from orbitcowboy/master
MathLib:isHex(): fix detection of missing suffixes (U,L).
2014-03-14 13:00:35 +01:00
Daniel Marjamäki
8d8913a168 Partial fix for #5555. Add const,pure attributes to library. 2014-03-14 06:38:45 +01:00
Robert Reif
cb1fc06a80 Fixed #5079 (CheckIO::checkFileUsage doesn't support wide char and microsoft functions) 2014-03-12 19:22:44 +01:00
Frank Zingsheim
b1dc51ba9c Fixed #4796 (Missing semicolon after simplified template class) 2014-03-12 06:09:45 +01:00
Robert Reif
d1eb04c539 Fixed #4302 (Member variable not initialized in public delegate constructor) 2014-03-12 05:48:13 +01:00
Daniel Marjamäki
618c26f6bf Merge pull request #260 from orbitcowboy/master
MathLib::isOct() fix missing detection of U and L suffix combinations an...
2014-03-12 05:30:35 +01:00
Daniel Marjamäki
3b4d024e06 Reverted info message that only applies to CLI 2014-03-11 20:55:02 +01:00
orbitcowboy
ed793793db MathLib:isHex(): fix detection of missing suffixes (U,L). 2014-03-11 20:02:04 +01:00
Daniel Marjamäki
94454df14f Fixed #2732 (Make it easier for users to tell 'How to supply header files') 2014-03-11 16:05:19 +01:00
Daniel Marjamäki
af0cf9bbc1 Merge pull request #258 from orbitcowboy/master
MathLib::isBin(): fix missing detection of U and L suffix combinations. ...
2014-03-11 06:36:31 +01:00
orbitcowboy
5b4ece4f9c MathLib::isBin(): fix missing detection of U and L suffix combinations. Added missing test cases. 2014-03-10 17:23:07 +01:00
Martin Ettl
0360840753 MathLib::isOct() fix missing detection of U and L suffix combinations and unittests. 2014-03-09 21:14:14 +01:00
Daniel Marjamäki
4d06bc086d astyle formatting 2014-03-09 08:49:32 +01:00
Daniel Marjamäki
7fa73c0d64 Merge pull request #256 from xypron/5505
5505: FP: Array accessed out of bounds
2014-03-09 08:47:18 +01:00
Daniel Marjamäki
c7f09d4350 Merge pull request #257 from simartin/ticket_5373_2
Ticket #5373: delete can match %type% in C (take #2)
2014-03-09 08:26:06 +01:00
Alexander Mai
3f30753122 Fixed #5537 (crash: clang ./lib/Basic/FileManager.cpp , since 354e84e7c85b01e5d1fc29ecb4f2e504271cb2e0 , /lib/symboldatabase.h:288) 2014-03-09 08:17:24 +01:00
Simon Martin
a3d1cac79c Ticket #5373: Keep track whether tokens come from a C or C++ file to properly handle %type% in Token::Match with "delete" 2014-03-08 21:26:06 +01:00
Heinrich Schuchardt
bd67db96f1 5505: FP: Array accessed out of bounds
CheckBufferOverrun::checkFunctionParameter alreacy considered usage of a
function parameter inside an if block as a special case.

With the patch the same is done for switch statements.

A test is added.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2014-03-07 19:51:13 +01:00
Alexander Mai
29d401ff38 Fixed #3098 (false negative: unitialized variable being passed to strcoll()) 2014-03-06 16:31:31 +01:00
Alexander Mai
354e84e7c8 Fixed #2298 (new check: passing stack-address to free()) 2014-03-06 06:32:30 +01:00
Alexander Mai
1d4839b8a6 Fixed #1374 (false negative: using uninitialized variable in printf) 2014-03-06 06:16:14 +01:00
Daniel Marjamäki
bcd230d90d Merge pull request #251 from matthiaskrgr/copyright
man, htdocs, gui, test, tools: bump a few more copyrights to 2014
2014-03-04 05:44:50 +01:00
Daniel Marjamäki
afeb4667a8 astyle formatting 2014-03-03 19:00:44 +01:00
Pranav Khanna
f8a4fb91fe Fixed #3796 (new check: redundant initialization with empty string) 2014-03-03 18:27:45 +01:00
Matthias Krüger
a9df4a3288 man, htdocs, gui, test, tools: bump a few more copyrights to 2014 2014-03-03 11:03:17 +01:00
Simon Martin
8baf8dbebb Ticket #5425: Avoid infinite recursion in checkMemsetType for invalid input 2014-03-03 07:19:32 +01:00
Daniel Marjamäki
31755b621c Merge pull request #246 from simartin/ticket_5356
Ticket #5356: Added test case that works following the fix for #5506.
2014-03-02 14:55:52 +01:00
Daniel Marjamäki
4dee3da1bd Merge pull request #245 from simartin/ticket_5478
Ticket #5478: Only functions and equal operators might return a temporary
2014-03-02 14:53:25 +01:00
Simon Martin
4057242cb2 Ticket #5356: Added test case that works following the fix for #5506. 2014-03-02 10:10:58 +01:00