Daniel Marjamäki
4e90356a76
Bug hunting; Code cleanup
2020-12-14 18:04:12 +01:00
Daniel Marjamäki
116119083b
Bug hunting; Better result from function that returns unknown pointer result
2020-12-14 17:53:28 +01:00
Daniel Marjamäki
ab3614b4e2
Bug hunting; Improved debug output for structs
2020-12-14 12:32:39 +01:00
Paul Fultz II
da1375c9a3
Fix issue 10024: FP: nullPointerRedundantCheck when using a goto statement ( #2947 )
2020-12-14 11:13:47 +01:00
Daniel Marjamäki
bf951ea5e6
Bug hunting; Fix for '*x=y'
2020-12-13 19:54:57 +01:00
Georgy Komarov
38a055d2f3
ExprEngine: Better debug output for exceptions ( #2943 )
2020-12-13 16:54:22 +01:00
Daniel Marjamäki
8f71e62fd6
Fix Cppcheck warning
2020-12-13 16:47:50 +01:00
Georgy Komarov
36ab23f1f7
ExprEngine: Handle pointers to struct as function argument ( #2945 )
2020-12-13 16:02:35 +01:00
Daniel Marjamäki
81c3ac738d
CI: Fix testrunner
2020-12-13 15:51:20 +01:00
Daniel Marjamäki
6fb1a81eae
Bug hunting; more debug output
2020-12-13 14:05:35 +01:00
Daniel Marjamäki
b18dc0fdbb
Bug hunting: Handle not better
2020-12-13 13:00:04 +01:00
Daniel Marjamäki
0ccc5c695b
Bug hunting: prevent recursion in analysis when code calls self
2020-12-13 09:33:40 +01:00
Daniel Marjamäki
be16b2c276
Bug hunting; better handling of early return
2020-12-13 09:13:26 +01:00
Daniel Marjamäki
2e96cc932d
ExprEngine; Improved debug output, show constraints.
2020-12-12 21:23:38 +01:00
Daniel Marjamäki
a7fb946ab8
ExprEngine: Clarify debug output a bit
2020-12-12 18:29:17 +01:00
Daniel Marjamäki
cba8b99095
ExprEngine: Catch and handle exceptions in ExprData
2020-12-12 17:33:21 +01:00
Daniel Marjamäki
d0f700305c
ExprEngine: Avoid analyzing unreachable execution paths
2020-12-12 15:22:49 +01:00
IOBYTE
7fc03c6030
fix #10032 (Syntax error if first function in a struct is a template function) ( #2940 )
...
Co-authored-by: Robert Reif <reif@FX6840>
2020-12-11 07:01:20 +01:00
Daniel Marjamäki
d340e8770c
Fixed Tokenizer::setVarId when removing last scope name
2020-12-08 17:39:04 +01:00
Daniel Marjamäki
245284acde
Tokenizer; Fixed varid for base class member variable
2020-12-08 17:25:50 +01:00
Daniel Marjamäki
7a4462dac5
Tokenizer: Refactoring, use isFunctionHead in setVarId. It should be more reliable.
2020-12-08 16:53:55 +01:00
Daniel Marjamäki
6d7ddde1b5
Bug hunting; Make bughuntingUninit check a bit less noisy about const parameters
2020-12-08 13:34:46 +01:00
Daniel Marjamäki
99cb65b4b2
Bug hunting; Clarify bughuntingUninit output for non-const parameters
2020-12-08 11:16:38 +01:00
IOBYTE
8161baf1e9
fix template debug output line numbers ( #2938 )
2020-12-08 10:35:13 +01:00
IOBYTE
6103da59be
add column number to TokenList::addtoken ( #2939 )
2020-12-08 10:34:23 +01:00
Daniel Marjamäki
bcc7945540
Bug hunting; Separate bughuntingUninit warnings for arguments with separate id
2020-12-08 10:28:40 +01:00
Daniel Marjamäki
02bb14003b
Bug hunting; better handling of struct member assignment in for loop
2020-12-07 19:58:19 +01:00
Daniel Marjamäki
39a9350f6e
Bug hunting: Better analysis of BailoutValue
2020-12-07 06:27:14 +01:00
Daniel Marjamäki
7e9cbda2d5
Revert "2"
...
This reverts commit db386b2a7f
.
That commit was half-done and not intended to be merged.
2020-12-06 22:29:46 +01:00
IOBYTE
8d9f0b3528
fix #9394 ("debug: Executable scope 'x' with unknown function." with … ( #2935 )
2020-12-06 22:08:42 +01:00
Daniel Marjamäki
db386b2a7f
2
2020-12-06 21:45:48 +01:00
Daniel Marjamäki
d12732adfb
Bug hunting; Diagnose array index out of bounds when struct member is accessed
2020-12-06 17:44:07 +01:00
Daniel Marjamäki
3bf758a04b
Bug hunting; Ensure there is warning after unknown variable expression
2020-12-06 10:13:10 +01:00
Daniel Marjamäki
7324722dab
Bug hunting; Detect array index out of bounds in loop better
2020-12-05 20:39:54 +01:00
Daniel Marjamäki
089f193d6c
Bug hunting; Fix test CVE-2019-19334
2020-12-05 18:52:18 +01:00
Daniel Marjamäki
46454b1795
CI: Fixed TestBughuntingChecks
2020-12-05 14:56:06 +01:00
Daniel Marjamäki
bdfac5db09
Bug hunting: Fixed test case CVE-2019-19334
2020-12-05 13:51:12 +01:00
Daniel Marjamäki
cb7eee2aa9
SymbolDatabase: Improved types for 'std::string + x'
2020-12-05 13:24:21 +01:00
Daniel Marjamäki
86ceafa870
Fixed compiler warning; missing enum case in switch
2020-12-05 13:02:43 +01:00
Daniel Marjamäki
076e78ebd0
Fixed Cppcheck warning (explicitConstructor)
2020-12-05 12:41:01 +01:00
Daniel Marjamäki
da4cd6a4f4
Bug hunting; Improved buffer overflow check
2020-12-05 11:47:57 +01:00
Daniel Marjamäki
396c353d3c
bug hunting: Add array index check
2020-12-05 11:46:07 +01:00
Daniel Marjamäki
2a1e230d2e
2.3: Update version
2020-12-05 10:00:02 +01:00
Daniel Marjamäki
c89512d8d6
Update copyright year
2020-12-05 09:28:33 +01:00
IOBYTE
ab16603666
fix #9685 (Handle 'extern "C++"') ( #2933 )
2020-12-05 09:26:11 +01:00
Daniel Marjamäki
600637a391
Fix Cppcheck warning; make ImportProject::FileSettings::parseCommandDefine() static
2020-12-04 20:46:44 +01:00
Daniel Marjamäki
40963100c4
Avoid functionStatic FP when there is #ifdef in function
2020-12-04 20:29:10 +01:00
Daniel Marjamäki
58af3c7ad7
Suppress Cppcheck false positive
2020-12-04 19:37:58 +01:00
Daniel Marjamäki
c6452adc88
Fixed Cppcheck warning; Remove unused private method CheckBufferOverrun::bufferNotZeroTerminatedError
2020-12-04 18:58:10 +01:00
Daniel Marjamäki
aa28f3fe8c
Removed Cppcheck::terminate()
2020-12-04 18:47:43 +01:00
IOBYTE
9c51d4c12d
instantiate nested templates in the proper order ( #2930 )
2020-12-04 08:04:16 +01:00
Paul Fultz II
904d52acac
Fix issue 10004: ValueFlow: pointer value, wrongly set known value ( #2931 )
2020-12-03 07:15:31 +01:00
Daniel Marjamäki
62810af7f3
Tokenizer: Avoid null pointer dereference in garbage code
2020-12-02 23:06:11 +01:00
Daniel Marjamäki
4d497712fb
Travis; Fix Cppcheck warnings
2020-12-02 22:02:20 +01:00
Daniel Marjamäki
cbb388d458
Tokenizer: Avoid wrong simplification of template right angle bracket
2020-12-02 20:21:32 +01:00
Daniel Marjamäki
c69bfbf495
AST: Fixed ast for multidimensional array initialisation
2020-12-02 07:38:21 +01:00
Daniel Marjamäki
009ad11b3e
SymbolDatabase: set proper valuetype for string addition result ( #9161 )
2020-12-01 20:16:39 +01:00
IOBYTE
2bbc7abedc
fix overloaded function lookup for explicit instantiations ( #2929 )
2020-12-01 09:43:16 +01:00
Daniel Marjamäki
f250e06df7
Improved daca check for wrong detection of template right angle brackets
2020-11-30 20:00:38 +01:00
Daniel Marjamäki
9aa69661b5
More robust Token::findClosingBracket
2020-11-30 19:26:28 +01:00
Daniel Marjamäki
8a1c16a560
Tokenizer: add daca debug messages when right angle brackets in templates are not handled well
2020-11-29 16:07:56 +01:00
Oliver Stöneberg
3eaa76e832
updated C/C++ keywords ( #2926 )
2020-11-29 15:01:29 +01:00
Daniel Marjamäki
7112f69d7b
Fixed bug in fixAngleBrackets
2020-11-29 12:56:13 +01:00
Daniel Marjamäki
e2debac882
Fix testcases
2020-11-29 08:46:42 +01:00
Daniel Marjamäki
fd75837494
Tokenizer: Remove extra 'template' keywords
2020-11-28 21:57:06 +01:00
Daniel Marjamäki
f42c104b0d
Distinguish exprid and varid in --debug output
2020-11-28 15:41:07 +01:00
Daniel Marjamäki
5b89b179ec
Detect syntax error when script is checked
2020-11-28 14:41:05 +01:00
Daniel Marjamäki
af26697ceb
AST: Generate proper AST for 'f = []() -> foo&& {}'
2020-11-28 06:53:46 +01:00
Daniel Marjamäki
484b68c550
astyle formatting
2020-11-28 05:52:35 +01:00
Daniel Marjamäki
d383913e1b
Attempt to fix crashes when variable valueType is nullptr. This can happen when decltype is used on unknown type
2020-11-27 16:49:25 +01:00
Daniel Marjamäki
ad0eb6108b
Attempt to fix crashes when variable valueType is nullptr. This can happen when decltype is used on unknown type
2020-11-27 16:45:26 +01:00
Daniel Marjamäki
809cec2b58
Fix crashes when Variable::valueType is nullptr, this can happen when decltype(unknown type) is used.
2020-11-27 12:07:15 +01:00
Wolfgang Stöggl
0bbd18f364
lib: Add condition for include externals/tinyxml2 ( #2923 )
...
Include externals/tinyxml2 in lib/CMakeLists.txt only if
USE_BUNDLED_TINYXML2 is ON, which is the default.
This is a follow-up commit to 8ac55a8
2020-11-27 09:57:12 +01:00
miltolstoy
5d299016f1
feat: analyze function side effects ( #2901 )
2020-11-26 17:34:42 +01:00
Daniel Marjamäki
1e8eb28390
Clang import: Fix null pointer dereference
2020-11-26 17:26:30 +01:00
Daniel Marjamäki
62284dabca
astyle formatting
2020-11-24 22:03:30 +01:00
Daniel Marjamäki
96392aa212
Clang import: better handling of templates
2020-11-24 22:02:59 +01:00
Daniel Marjamäki
aa9281515d
Clang import: Handle LinkageSpecDecl
2020-11-24 19:34:37 +01:00
Daniel Marjamäki
788abfa8a4
Clang import: better handling of CXXMethodDecl in getSpelling
2020-11-24 19:20:30 +01:00
IOBYTE
43ce1607c7
fix a large number of valgrind warnings in testrunner ( #2920 )
...
Co-authored-by: Robert Reif <reif@FX6840>
2020-11-24 18:21:07 +01:00
IOBYTE
1ea89bcad8
add support for template constructors ( #2911 )
2020-11-24 07:21:37 +01:00
Daniel Marjamäki
b4db52bf61
Fixed #9860 (wrong ast for placement new 'new ( uBAR ? uBAR : sizeof ( T ) ) T')
2020-11-23 22:03:50 +01:00
Daniel Marjamäki
4a2e082d85
Revert "GUI: restore default tab in ProjectFileDialog"
...
This reverts commit 39564c9e6c
.
2020-11-23 20:18:06 +01:00
Daniel Marjamäki
39564c9e6c
GUI: restore default tab in ProjectFileDialog
2020-11-23 19:27:14 +01:00
Daniel Marjamäki
208a4a4548
Check unused templates by default
2020-11-23 18:29:08 +01:00
Daniel Marjamäki
2cd8ea83a7
Fixed #9860 (unused template not removed properly by default)
2020-11-22 16:43:36 +01:00
Paul Fultz II
4a8a78a925
Fix issue 10002: False positive: constParameter with reference to pointer ( #2918 )
2020-11-22 08:47:24 +01:00
Paul Fultz II
bf00d521d7
Show which rules are being processed ( #2916 )
2020-11-22 08:46:50 +01:00
Oliver Stöneberg
b7c573bc9b
removed the *_sanitized targets used by fuzz-client from CMake - if you need this to be sanitized use CMAKE_CXX_FLAGS / fixed linking of fuzz-client ( #2914 )
2020-11-21 07:44:22 +01:00
Paul Fultz II
f6399c4cba
Fix issue 9980: FP nullPointerRedundantCheck - condition after while loop ( #2912 )
2020-11-20 09:36:09 +01:00
Daniel Marjamäki
5e69def679
Code cleanup; Remove unused functions
2020-11-18 20:27:51 +01:00
Daniel Marjamäki
3c207da910
Code cleanup. Fix gcc warning.
2020-11-18 15:43:09 +01:00
Paul Fultz II
e8c1c792a5
Fix issue 9987: false positive: danglingTempReference with && variable and assignment ( #2907 )
2020-11-17 06:52:12 +01:00
IOBYTE
c4b3d4cd77
fix #9983 (TemplateSimplifier: template not simplified : f(0,0);) ( #2905 )
...
Currently template type deduction for functions only works for single
template argument single function argument functions with a literal
argument.
This patch starts to add support for single template argument multiple
function argument functions. It correctly handles functions with
multiple arguments of the same type. It also handles a mix of template
and non-template arguments.
It does not add support for overloading non-template arguments.
It does not add support for multiple parameter template functions.
It does not add support for type deduction from variable arguments.
Co-authored-by: Robert Reif <reif@FX6840>
2020-11-17 06:51:32 +01:00
Daniel Marjamäki
22d6160624
Improve handling of decltype
2020-11-16 20:11:26 +01:00
Daniel Marjamäki
ad4185428e
Run dmake again
2020-11-16 09:14:31 +01:00
Daniel Marjamäki
c7cbe7f2d3
rename externals/tinyxml to externals/tinyxml2
2020-11-16 09:11:53 +01:00
Daniel Marjamäki
8b0699cd6a
Revert "improved decltype() handling"
...
This reverts commit 6e8f77c519
.
2020-11-15 21:32:05 +01:00
Daniel Marjamäki
6e8f77c519
improved decltype() handling
2020-11-15 20:58:17 +01:00
Daniel Marjamäki
7878eb2512
AST: Do not generate AST for decltype
2020-11-15 16:47:36 +01:00