Daniel Marjamäki
e04b9fe4a4
Remove unused functions
2020-02-14 20:37:33 +01:00
Daniel Marjamäki
332279326f
checkVirtualFunctionCallInConstructor; Check should be 'style' since there is no UB. Disabled the check temporarily, it should use CTU to determine if the class is a base class
2020-02-14 17:10:12 +01:00
Daniel Marjamäki
e31b2f8b73
SymbolDatabase; Set smart pointer type in Variable valueType
2020-02-14 09:40:27 +01:00
Daniel Marjamäki
5f4a900f88
astyle formatting
...
[ci skip]
2020-02-13 17:04:05 +01:00
Paul Fultz II
7368a54629
Add generic valueflow forward analysis ( #2511 )
2020-02-13 16:27:06 +01:00
Daniel Marjamäki
1b66820cdb
Revert "remove BUG_HUNTING_UNINIT conditionals"
...
This reverts commit 07a251d783
.
2020-02-12 18:54:07 +01:00
Daniel Marjamäki
3ec03b8915
Fixed #9571 (False positive: containerSize)
2020-02-12 18:53:36 +01:00
Daniel Marjamäki
3675f49a53
astyle formatting
...
[ci skip]
2020-02-12 18:52:50 +01:00
Paul Fultz II
d858bfc338
Fix issue 9599: False positive: Using object that points to local variable that may be invalid ( #2530 )
...
* Fix issue 9599: False positive: Using object that points to local variable that may be invalid
* Improve tests
* Skip else
2020-02-11 11:45:10 +01:00
Paul Fultz II
e55ddacd18
Fix issue 9597: False positive: Reference to temporary returned if explicitly casted to base class ( #2531 )
2020-02-11 11:41:41 +01:00
Daniel Marjamäki
07a251d783
remove BUG_HUNTING_UNINIT conditionals
2020-02-10 21:43:06 +01:00
Paul Fultz II
8fa7dd0fe0
Fix issue 9595: False positive: Using pointer to temporary doesn't account for const ref extended temporary lifetimes ( #2525 )
2020-02-10 18:01:11 +01:00
Daniel Marjamäki
bb701fd8be
GUI: Tweak ProjectFileDialog: Bug hunting, safe class checking
2020-02-09 21:02:28 +01:00
IOBYTE
4d58d9fc87
fix daca chromium crash ( #2527 )
2020-02-09 11:19:36 +01:00
Rikard Falkeborn
b1c6f2946a
Fix redundant FP assignment with unsigned zero ( #2521 )
...
* Refactor isNullOperand out of FwdAnalysis
* Improve isNullOperand
* Fix redundantAssignment FP with unsigned zero
* isNullValue check number
* Enhance isNullOperand to handle c++ casts
Also handle cast of NULL.
2020-02-09 11:16:08 +01:00
Dmitry-Me
e9b7e7811b
Remove unreachable code and repeated computation
2020-02-05 18:20:43 +03:00
Daniel Marjamäki
25b5304efc
GUI: Simple first hack to allow bughunting in the GUI
2020-02-04 21:20:43 +01:00
Daniel Marjamäki
ca3095746c
Fixed #9594 (False positive: Using argument that points at uninitialized variable when write only)
2020-02-04 18:56:18 +01:00
Dmitry-Me
c8df734c07
Merge overlapping patterns
2020-02-04 18:35:30 +03:00
Rikard Falkeborn
488bc9997c
Improve isSameExpression for same valued literals with followvar ( #2519 )
...
It allows (for example) cppcheck to detect that the lhs and the rhs are
the same in the following example:
double g()
{
double a = 1e1
return a & 10.0;
}
2020-02-03 09:35:24 +01:00
Rikard Falkeborn
bbfd10a69f
Bugfix Mathlib::isNullValue for hexadecimal numbers ( #2517 )
2020-02-02 16:40:36 +01:00
Daniel Marjamäki
a9f55f4985
CLI: add -isystem include paths when running Clang
2020-02-02 16:35:42 +01:00
Daniel Marjamäki
894497e704
CLI: Checking imported project with clang
2020-02-02 14:36:33 +01:00
Daniel Marjamäki
216698c164
Fix cppcheck project import for Clang parser setting
2020-02-02 12:15:23 +01:00
Daniel Marjamäki
6a2312087c
Clang import; Fix crash
2020-02-02 12:13:19 +01:00
Daniel Marjamäki
d2dd3930ae
GUI: Generate Clang files
2020-02-02 11:05:30 +01:00
Daniel Marjamäki
632dc0f141
GUI: Select parser; Cppcheck or Clang
2020-02-02 10:45:42 +01:00
Daniel Marjamäki
103ecb0257
Refactoring; Avoid templates
2020-02-01 08:52:34 +01:00
Daniel Marjamäki
0e0d88f65e
Refactoring; Avoid template<>
2020-02-01 08:39:58 +01:00
Daniel Marjamäki
e515f4ab3e
Refactoring; Remove unused function
2020-02-01 08:34:36 +01:00
Daniel Marjamäki
0de19acd43
Refactoring; Avoid template<>
2020-02-01 08:32:14 +01:00
Daniel Marjamäki
2b336ac147
Refactoring; stricter lambda capture
2020-02-01 08:28:18 +01:00
Daniel Marjamäki
6c1cc54671
Refactoring; Avoid template<>
2020-02-01 08:24:31 +01:00
Daniel Marjamäki
9eb6925976
Refactoring; Avoid template<>
2020-02-01 08:20:20 +01:00
Rikard Falkeborn
ff9c04dc28
Improve isSameExpression for literals ( #2514 )
...
Improve isSameExpression() for literals with same value but different
representation, for example the following different ways of
representing 9 as double: 9.0, 0.9e1 and 0x1.2p3.
With this change, cppcheck can (for example) correctly detect that the
else if statements are always false in the following example:
void f(double x) {
if (x < 9.0) {}
else if (x < 0x1.2p3) {}
else if (x < 0.9e1) {}
}
2020-02-01 07:22:41 +01:00
Daniel Marjamäki
fb38e87bf4
astyle formatting
...
[ci skip]
2020-01-31 14:13:52 +01:00
fuzzelhjb
b0ce3e4c0c
Support clang tidy ( #2512 )
2020-01-31 14:10:27 +01:00
fuzzelhjb
074d08e39e
Check specific Visual Studio configurations ( #2503 )
2020-01-31 07:08:38 +01:00
fuzzelhjb
d82da987e5
Support clang tidy ( #2486 )
2020-01-30 07:14:17 +01:00
Daniel Marjamäki
dcee189146
Tokenizer::setVarId: better handling of decltype()
2020-01-29 17:40:22 +01:00
Daniel Marjamäki
18124fe248
Fixed #9591 (SymbolDatabase: decltype)
2020-01-29 17:29:40 +01:00
Daniel Marjamäki
37f4ec5bbe
Clang import; Write error message when Clang is not in path
2020-01-27 18:26:17 +01:00
Daniel Marjamäki
b1abcc06df
Clang import; distinguish static variable
2020-01-27 13:00:52 +01:00
Daniel Marjamäki
830f901206
Fixed #9586 (Valuetype: Wrong type for 'true << 1')
2020-01-27 11:46:59 +01:00
Rikard Falkeborn
8819e19dae
Fix #8489 (Fix FN printf argument with parenthesis) ( #2508 )
2020-01-27 06:55:01 +01:00
Daniel Marjamäki
211d2e336d
Clang import; Handle EnumDecl without children
2020-01-26 14:35:08 +01:00
Daniel Marjamäki
66dd985c9d
Clang import; Better handling of enums
2020-01-26 07:32:14 +01:00
Daniel Marjamäki
625da9af5c
SymbolDatabase: Use range for loop
2020-01-26 07:31:04 +01:00
Daniel Marjamäki
a5a294cf13
Code cleanup
2020-01-25 18:11:54 +01:00
Daniel Marjamäki
6f8799023f
Clang import; Clang 9 fix
2020-01-25 17:22:22 +01:00