Daniel Marjamäki
a95108ebe3
TemplateSimplifier: Fix incorrect recursion when template is reused inside itself
2018-01-03 23:05:57 +01:00
Daniel Marjamäki
255b788d4d
Fixed #4903 (Improve check: allocated but not initialized (condition))
2018-01-02 23:20:46 +01:00
Daniel Marjamäki
1af69bd0d4
Tokenizer::createLinks2: fix link for >>
2018-01-01 15:20:21 +01:00
Daniel Marjamäki
03b0b35a9d
Refactor Token::findClosingBracket()
2018-01-01 12:22:04 +01:00
Matthias Krüger
1f3ca7ddf6
oops, remove some leftover commented-out debug code and run astyle.
2018-01-01 05:04:59 +01:00
Matthias Krüger
af9b9595ce
SymbolDatabase::createSymbolDatabaseFindAllScopes(): simplify match pattern.
2018-01-01 05:02:55 +01:00
Matthias Krüger
f2b2be2166
CheckInternal::checkRedundantTokCheck(): also catch patterns of the form if(!tok || !Token::Match(tok, "foo")).
2018-01-01 05:02:41 +01:00
Dmitry-Me
70817b3d4e
Remove redundant check
2018-01-01 03:06:17 +03:00
Daniel Marjamäki
fa42a08a71
Make code less strict that looks for garbage template code. Before a template there might be unknown macros.
2017-12-31 16:25:41 +01:00
Daniel Marjamäki
7d2450e445
Fixed #1478 (false negative: buffer access out of bounds not detected after free and malloc)
2017-12-31 14:58:26 +01:00
Daniel Marjamäki
79f6793076
minor code cleanup
2017-12-31 12:30:02 +01:00
Daniel Marjamäki
1cbeec26c6
Replace Token::Match with Token::simpleMatch
2017-12-30 22:43:44 +01:00
Daniel Marjamäki
f6fcf01cc6
Fixed #7868 (TemplateSimplifier: template specialization fails)
2017-12-30 22:14:48 +01:00
Daniel Marjamäki
03a4c84fec
Rename variables
2017-12-30 12:27:55 +01:00
Daniel Marjamäki
a8f73055ad
Templates: Fixed scope problem
2017-12-30 09:00:19 +01:00
Daniel Marjamäki
005bb7c747
Replace Token::Match with Token::simpleMatch
2017-12-29 23:05:54 +01:00
Daniel Marjamäki
fc1ac180e6
Fixed #6218 (Template type aliasing misdetection)
2017-12-29 22:47:07 +01:00
Daniel Marjamäki
caf9f22015
Rename method TemplateParametersInDeclaration => getTemplateParametersInDeclaration
2017-12-28 22:10:10 +01:00
Daniel Marjamäki
42bcb6d417
use early continue
2017-12-27 22:29:45 +01:00
Daniel Marjamäki
469cb7e6df
TemplateSimplifier: Fix instantiations when template parameter is a template
2017-12-26 22:34:39 +01:00
Daniel Marjamäki
4a7f923fca
astyle formatting
...
[ci skip]
2017-12-26 22:12:30 +01:00
Daniel Marjamäki
84bdabacf8
TemplateSimplifier: Remove not needed variable indentlevel
2017-12-26 13:27:02 +01:00
baltth
6cbd69bf2d
Fix define parsing from compile_command.json ( #1013 )
...
* Define value parsing from compile_commands.json
* Handle escaping in defined values
* Added test for importCompileCommands
* Added used defines for imported projects
* Fixed unnecessary string literals
2017-12-26 13:04:27 +01:00
Daniel Marjamäki
2c69f2b226
TemplateSimplifier: Improved handling of scopes
2017-12-26 10:55:18 +01:00
Dmitry-Me
5a642ac35e
Omit unneeded computations
2017-12-26 02:07:24 +03:00
Daniel Marjamäki
eaadfb3910
update debug token list output for templates.
2017-12-25 23:16:51 +01:00
Daniel Marjamäki
a80760cb6f
TemplateSimplifier: Fix in expandTemplate
2017-12-25 08:19:46 +01:00
Daniel Marjamäki
1eb2df34ad
Revert improved scope handling in TemplateSimplifier
2017-12-23 22:11:30 +01:00
Daniel Marjamäki
d237d36d46
TemplateSimplifier: Fix crash seen in Travis
2017-12-23 17:29:28 +01:00
Daniel Marjamäki
2d7fedbb49
Try to fix Travis
2017-12-23 15:41:32 +01:00
Daniel Marjamäki
91839c2534
Fixed #7987 (FP copyCtorAndEqOperator - class with a move constructor and move assignment operator)
2017-12-23 10:35:14 +01:00
Daniel Marjamäki
5ed2dbd5ef
Fix Cppcheck warning
2017-12-23 10:16:17 +01:00
Daniel Marjamäki
326765c632
TemplateSimplifier: Better handling of scopes
2017-12-23 08:20:24 +01:00
Dmitry-Me
8851fd64a6
Break loop early
2017-12-21 03:13:00 +03:00
Dmitry-Me
82825ab721
Reorder checks, remove duplicate check
2017-12-20 13:16:59 +03:00
Dmitry-Me
f4ddf43cba
Break loop early, simplify check
2017-12-20 03:55:43 +03:00
Dmitry-Me
6ae32ed98c
Unify check with surrounding code
2017-12-20 01:37:19 +03:00
Daniel Marjamäki
9c17bddbd4
Tweak fix for ticket #8297
2017-12-17 22:27:05 +01:00
Daniel Marjamäki
1428759479
Fixed #8297 (Tokenizer:createLinks: 'X<sizeof(int)==1 || sizeof(int)==4>()')
2017-12-17 15:53:05 +01:00
Daniel Marjamäki
d292434e76
Try again to clarify warning message for new strcmp() checker
2017-12-13 15:28:50 +01:00
Daniel Marjamäki
3f36d4b5f4
try to clarify error message
2017-12-11 22:10:00 +01:00
IOBYTE
026d8f6859
fix #8284 : False positive: "Label 'class' is not used." for anonymous… ( #1011 )
...
* fix #8284 : False positive: "Label 'class' is not used." for anonymous C++ class
Add support for annonymous derived structures and classes.
* Fix travis build (use findsimplematch).
* Fix bug in simplifyLabelsCaseDefault which was inserting ; in wrong place.
2017-12-05 16:50:04 +01:00
Simon Martin
1b14380007
Ticket #8175 : Fix bug in TemplateSimplifier::instantiateMatch with template parameters involving sizeof or namespace.
2017-12-02 19:18:36 +01:00
BNT
fd76abba16
also generate debug information when building for release. This makes ( #1003 )
...
debugging and profiling easier and has now drawback as long as the PDB
files are not distributed (which would blow up installers)
2017-11-29 08:31:30 +01:00
BNT
b913a04462
remove outputlist since its not moved and all subfunction check for ( #1001 )
...
nullptr
2017-11-29 08:29:19 +01:00
Daniel Marjamäki
6c50dafbac
Fix classInfo to fix TestCppcheck assertion
2017-11-27 23:34:01 +01:00
Daniel Marjamäki
43db6147d3
astyle formatting
...
[ci skip]
2017-11-27 23:32:20 +01:00
Daniel Marjamäki
f28d5e91ac
Fixed #8251 (Condition: bug when there are more than 2 strcmp() on same buffer (tricky))
2017-11-27 12:55:20 +01:00
Simon Martin
cbf0b13b3e
Ticket #8255 : Don't crash upon invalid code while checking conditions.
2017-11-25 08:22:39 +01:00
Dmitry-Me
4ac56a55be
Fix FN for signed short passed as %hx into printf
2017-11-21 22:17:02 +03:00