Daniel Marjamäki
0b81a267f4
uninitvar: handling arrays in non-executionpath checker
2015-07-23 14:51:38 +02:00
PKEuS
ce9272a4ed
Refactorized file listing code (CLI):
...
- Apply PathMatch in FileLister::recursiveAddFiles() already to avoid touching directories that are ignored (#5775 )
- Simplified code to warn about header exclusion; use Path::isHeader() instead of custom header filename detection
2015-07-23 14:28:17 +02:00
Daniel Marjamäki
28fd6ce2f0
testuninitvar: use new checking instead of executionpath in 2 more testcases
2015-07-23 13:50:02 +02:00
Daniel Marjamäki
c4f9a2a160
testuninitvar: update testcase
2015-07-23 12:58:38 +02:00
Frank Zingsheim
6485339d66
Support lambdas in "else if" simplification ( #6860 )
2015-07-23 09:41:35 +02:00
Daniel Marjamäki
79067ac031
uninitvar: use new checking instead of executionpath in more tests. small improvements in new checking to fix testcases.
2015-07-23 08:46:59 +02:00
Daniel Marjamäki
239f0d4ab4
testuninitvar: use new checking instead of executionpath in various testcases
2015-07-22 22:53:59 +02:00
Daniel Marjamäki
1de1aaa2f4
CheckUninitVar: Fix crash when AST is not created properly
2015-07-22 22:17:12 +02:00
Daniel Marjamäki
1f5eea98b5
CheckUninitVar: Fix a FP reported for invalid code
2015-07-22 21:58:06 +02:00
Daniel Marjamäki
42ed436e9d
Tweaks in uninitvar, small steps to make it possible to remove the ExecutionPath
2015-07-22 20:31:58 +02:00
Robert Reif
4e693f1620
Fixed #6827
2015-07-22 13:57:51 +02:00
PKEuS
ab1113fb16
Fixed crash on garbage code #6859
2015-07-22 13:33:24 +02:00
Daniel Marjamäki
f711520892
Fixed #6852 (false negative: logical conjunction 'x == 0')
2015-07-21 22:26:22 +02:00
Daniel Marjamäki
f9d22f70db
Removed simplifyIfNot simplification ( #6072 )
2015-07-21 20:56:47 +02:00
Daniel Marjamäki
1b8252181d
Tokenizer: Removed Tokenizer::simplifyIfNotNull ( #6072 )
2015-07-21 17:58:44 +02:00
Daniel Marjamäki
ffc707246b
ValueFlow: Better handling of Known/Possible values after conditional unknown function call
2015-07-21 17:56:40 +02:00
PKEuS
7f6b6e43b1
Support strings in CheckStl::mismatchingContainers() ( #6839 )
2015-07-21 14:13:26 +02:00
PKEuS
a3eb725c3f
Support C++03-style of declaring a copy ctor as deleted ( #6585 )
2015-07-21 13:46:50 +02:00
amai2012
e8ac4d8e87
#6847 segmentation fault (invalid code) in Token::multiCompare. Fix and simple refactoring in Tokenizer
2015-07-21 13:40:50 +02:00
PKEuS
bdd53b4142
Fixed false positive #6717
2015-07-21 12:13:59 +02:00
PKEuS
dd9cb929bf
Refactorization in Preprocessor: Support beginning/end of file in removeSpaceNearNL(), avoid string copying when calling replaceIfDefined()
2015-07-21 12:13:58 +02:00
Daniel Marjamäki
8a72bb8aa8
AST: Fixed AST for struct initialisation
2015-07-21 11:40:42 +02:00
PKEuS
149d11d9ad
Improved handling of inline assembly ( #6813 ):
...
- Add ; after asm {} block if required
- Fixed inline suppressions
2015-07-20 23:09:54 +02:00
PKEuS
a0890ecd2c
Fixed false positive: Do not print useClosedFile on arrays ( #6823 )
2015-07-20 22:40:19 +02:00
PKEuS
c987a99ac8
Fixed hang on garbage code ( #6824 )
2015-07-20 22:33:32 +02:00
Daniel Marjamäki
749bb34deb
Fixed #6830 (ValueFlow: value of switch-variable inside switch)
2015-07-20 19:45:38 +02:00
Alexander Mai
defee734f5
#6846 segmentation fault (invalid code) in CheckClass::hasAssignSelf
2015-07-20 19:04:34 +02:00
Daniel Marjamäki
c0880c8d79
ValueFlow: Values that are assigned in switch are possible after switch
2015-07-20 09:36:56 +02:00
Frank Zingsheim
8416be4d9d
#6345 Tokenizer::simplifyTypedef() adds redundant 'typename' to declaration
2015-07-20 07:55:22 +02:00
amai2012
af9b67562b
Merge pull request #626 from simartin/ticket_6648
...
Ticket #6648 : Properly handle variables that have been deallocated and whose _address_ is taken after
2015-07-19 18:04:47 +02:00
Simon Martin
fa94f2e0f4
Ticket #6648 : Properly handle variables that have been deallocated and whose _address_ is taken after in CheckLeakAutoVar.
2015-07-19 17:37:50 +02:00
Alexander Mai
8b97f04de4
Try to address some Coverity issues. Add TODO testcase for #5783 . Introduce TODO_ASSERT macro.
2015-07-19 15:03:35 +02:00
orbitcowboy
f1f46611d6
Merge pull request #624 from simartin/ticket_6601_template_parameters
...
Added unit test involving function reference for TemplateSimplifier::templateParameters
2015-07-19 09:02:43 +02:00
Simon Martin
d218b95349
Ticket #5776 : Since the fix is in Tokenizer, it makes more sense to have a Tokenizer unit test.
2015-07-19 00:10:47 +02:00
Simon Martin
d1d51c5bb7
Added unit test involving function reference for TemplateSimplifier::templateParameters.
2015-07-18 23:56:55 +02:00
Daniel Marjamäki
ce7e879460
ValueFlow: isVariableChanged() should return true when variable is changed by passing its address to subfunction
2015-07-18 15:35:39 +02:00
Daniel Marjamäki
5aa0b284dc
ValueFlow: Evaluate more calculations when operands have known values
2015-07-18 15:03:57 +02:00
Simon Martin
1f73d71542
Ticket #5776 : Simplify (&a)->b into a.b
2015-07-17 23:27:35 +02:00
Simon Martin
af1b0cfddf
Ticket #6835 : Don't get confused by parentheses while detecting template parameter default values.
2015-07-17 21:30:34 +02:00
Daniel Marjamäki
25d9ebedd8
ValueFlow: fixed known/possible value of static variable
2015-07-17 20:48:37 +02:00
Daniel Marjamäki
f1e410a878
ValueFlow: value that is changed in do while loop must be possible instead of known.
2015-07-17 20:30:34 +02:00
Daniel Marjamäki
cb04dfbd37
Fixed #4842 (condition is always true (variable is assigned constant value and then used in condition))
2015-07-17 15:30:23 +02:00
Daniel Marjamäki
61cf224f32
ValueFlow: Make known loop value possible
2015-07-17 10:24:24 +02:00
Daniel Marjamäki
3d5781743c
ValueFlow: Restore handling of not
2015-07-16 21:17:44 +02:00
Daniel Marjamäki
15a8e4d2df
Temporarily revert "Fixed #4842 (condition is always true (variable is assigned constant value and then used in condition))"
...
This reverts commit a3fbad50cb
.
The ValueFlow must be updated before this can be re-added.
2015-07-16 21:10:46 +02:00
Daniel Marjamäki
09efe140fe
ValueFlow: Change value to 'Possible' after conditional assignment in inner loop
2015-07-16 21:08:32 +02:00
Daniel Marjamäki
38214b6907
ValueFlow: function arguments only has 'possible' values
2015-07-16 20:49:14 +02:00
Daniel Marjamäki
a3fbad50cb
Fixed #4842 (condition is always true (variable is assigned constant value and then used in condition))
2015-07-16 20:17:57 +02:00
Daniel Marjamäki
88491267d6
ValueFlow: Added Value::valueKind that says if value is known or possible
2015-07-16 17:33:16 +02:00
orbitcowboy
48fed95942
Fixed wrong test case in testother: mathfunctionCall_atan2().
2015-07-16 10:55:58 +02:00