Commit Graph

5958 Commits

Author SHA1 Message Date
orbitcowboy b9a9f51fe0 MathLib: Added test for isDec() and removed not required state. 2014-11-14 04:29:35 +01:00
Dmitry-Me cb9a6c1cb5 Don't show warning for same expressions alongside == in static_assert 2014-11-13 16:04:34 +01:00
Daniel Marjamäki 189dfd64f7 Revert "Fixed #6230 (SymbolDatabase: Wrong function() is set for token)"
This reverts commit 685fce6b91.
2014-11-11 07:29:16 +01:00
Daniel Marjamäki ea765c24f2 Fixed #3262 (Tokenizer: wrong 'return a=1,b=2,...;' simplification;) 2014-11-10 17:31:19 +01:00
Simon Martin cc6b51f2d9 Ticket #6059: Properly handle class... in parameter lists. 2014-11-07 23:08:54 +01:00
Daniel Marjamäki 685fce6b91 Fixed #6230 (SymbolDatabase: Wrong function() is set for token) 2014-11-07 11:10:20 +01:00
Robert Reif 1f32e9eee5 Symbol database: added test for findfunction 2014-11-07 10:46:31 +01:00
Daniel Marjamäki 8012ac9562 Fixed #5993 (FP: memleak (linux list)) 2014-11-07 07:44:12 +01:00
Frank Zingsheim 7e0fc3d481 Fixed #6252 (False positive "freed twice")
--HG--
extra : rebase_source : 24f801452fbefa3a59ab2cca62c3cf02aea513b6
2014-11-03 21:24:34 +01:00
PKEuS e5d63195cb Fixed #5983: Support storing pointers/references to member variables in CheckClass::checkConst() 2014-11-02 13:38:03 +01:00
Robert Reif df6855c216 SymbolDatabase: reintroduce test, move symboldatabase cleanup code to SymbolDatabase destructor 2014-11-02 10:36:52 +01:00
Frank Zingsheim 0e4c508d7b Fixed #4272 and #6237 (Crash from running out of memory with many templates) 2014-11-01 22:07:24 +01:00
Robert Reif 4eb33e7479 SymbolDatabase: Refactoring of findFunction 2014-11-01 14:36:17 +01:00
Daniel Marjamäki b766071272 Fixed #4970 (false positive: conditionally initialized variable used in if-clause (git/notes.c)) 2014-11-01 14:03:02 +01:00
PKEuS c7d315fba3 Refactorization: Changed simplifyMathFunctions() to a single pass simplifier 2014-10-31 23:08:11 +01:00
PKEuS 662283cab8 Refactorization: Avoid iterations over whole token list, limited several checks to function scopes. 2014-10-31 11:42:54 +01:00
PKEuS b5ea677180 Some fixes for CheckOther::checkIgnoredReturnValue():
- Fixed name of the function
- Fixed false positive for code like "class strcmp { strcmp() {} };"
- Fixed FP #6233 on checking side (no AST generated for function call)
2014-10-30 23:24:13 +01:00
PKEuS b7996bd0b0 Handle overloads and custom implementations of functions checkReturnIgnoredReturnValue() to avoid false positives 2014-10-30 21:26:32 +01:00
PKEuS 6fdaf65cea Fixed createLinks2() when > is followed by ; (#6242) 2014-10-30 11:15:24 +01:00
Daniel Marjamäki 6088ba7951 Merge pull request #456 from simartin/ticket_6817_take2
Ticket #6187: Avoid infinite loop if eraseDeadCode does not remove anything (this time without memory corruption).
2014-10-23 09:43:02 +02:00
Daniel Marjamäki 4483c3e820 Fixed #6234 (FP : shift by too many bits is undefined on a QT container) 2014-10-23 06:52:19 +02:00
Simon Martin c6e2107d99 Ticket #6187: Avoid infinite loop if eraseDeadCode does not remove anything (this time without memory corruption). 2014-10-22 20:25:36 +02:00
Frank Zingsheim 71c5d4bd60 Ticket #6232 (cppOut of bounds array access)
--HG--
extra : rebase_source : 79ed3533a12a486ea3ed3f09f9bc55b1a4771161
2014-10-21 22:56:53 +02:00
Daniel Marjamäki a3efa1e180 Fixed #4776 (FP: Assignment of function parameter has no effect outside the function, with goto) 2014-10-21 16:21:33 +02:00
Robert Reif 42f709c09d Fixed #6229 (Move Windows builtin types __intXX to library) 2014-10-21 06:11:19 +02:00
Daniel Marjamäki d8b50e73df Fixed #6002 (Defect: False positive due to pointer address not being associated with variable in for loop) 2014-10-20 15:54:02 +02:00
Robert Reif d5908f03b7 Fixed #6226 (false negative: printf format check for user defined array type) 2014-10-20 06:33:36 +02:00
Robert Reif e2f72b4cb1 Fixed #6215 (Move Windows platform types into library) 2014-10-19 07:34:40 +02:00
PKEuS b724784f0b Removed obsolete comments 2014-10-18 11:18:07 +02:00
Daniel Marjamäki 0fd6586fcc Fixed #6219 (valueFlowForward: better multivariable analysis needed to avoid FP) 2014-10-17 06:50:33 +02:00
Frank Zingsheim 41a54fceba Fixed false positives about uninitialized member variables if variable has a default value (#5500) 2014-10-16 21:57:43 +02:00
Frank Zingsheim 3923618b8d Fixed #6222 (Missing varid for multiple braced initialized variables)
-> Fixed broken code in unit tests
2014-10-16 20:46:57 +02:00
PKEuS a99fd364ef Restored functionality to detect std::string(0) calls as null pointer dereferences (#6189) 2014-10-16 19:12:02 +02:00
Daniel Marjamäki 7107286be6 Fixed #5891 (AST: wrong ast generated for 'x = (int)(double(123)*i);') 2014-10-16 15:57:05 +02:00
PKEuS eefaddf980 Fixed bug in Tokenizer::simplifyReference() (#6133) 2014-10-16 11:43:42 +02:00
PKEuS 9a755714b5 Removed unused function from testsymboldatabase.cpp 2014-10-16 11:12:28 +02:00
PKEuS 6955e719cf Collected garbage code tests and moved them to testgarbage.cpp 2014-10-16 10:59:46 +02:00
Frank Zingsheim 9dd3bce98b Fixed #6214: non-static member initializer causes false positive 2014-10-16 09:11:09 +02:00
Daniel Marjamäki ecd17d84fb Reverted f088588c fix for #6187 that fixes infinite loop, the fix cause a use-after-free regression. 2014-10-16 06:32:06 +02:00
Robert Reif 45a2986f34 Added test for #6171 2014-10-15 21:41:15 +02:00
Frank Zingsheim eab0878b8a Support {} initialization in initializer list (#6216) 2014-10-15 21:33:21 +02:00
Daniel Marjamäki 228206f556 Fixed #6067 (ValueFlow: subfunction, condition with && or ||) 2014-10-15 16:34:03 +02:00
Daniel Marjamäki 36297f1025 Tokenizer::varId: don't set varid for function name in code 'bool f(X x, int=3);' 2014-10-14 20:37:32 +02:00
Daniel Marjamäki 24ecaf8b0a leakautovar: handling of unknown/non-pod types in c++ 2014-10-14 16:40:30 +02:00
Daniel Marjamäki 94c677905b ast: don't hang when invalid code with new is found 'new (var1,var2,var3);' 2014-10-13 19:12:20 +02:00
Daniel Marjamäki 77cffcde38 Fixed #6190 (SymbolDatabase: variable info not set properly when reinterpret_cast is used) 2014-10-12 16:06:50 +02:00
Frank Zingsheim 11867e3210 Fixed #6214 (non-static member initializer causes false positive (function call; initializer)) 2014-10-12 15:06:07 +02:00
Daniel Marjamäki aac9e66147 AST: fixed ast for 'new (char *)[10]' 2014-10-12 12:57:01 +02:00
Daniel Marjamäki f72a8d3f15 AST: fixed ast for 'a(new A(1)), b(new B(2))' 2014-10-12 12:13:01 +02:00
Daniel Marjamäki 649e2dfa97 AST: fixed ast for 'a = new (b) ::X;' 2014-10-12 11:12:25 +02:00