Commit Graph

9202 Commits

Author SHA1 Message Date
Daniel Marjamäki 8c33a95b49 Refactoring: moved method from Tokenizer to TokenList 2018-01-07 14:07:34 +01:00
PKEuS c8010fdf42 Fixed crash on garbage code (#8307) 2018-01-07 13:11:56 +01:00
PKEuS 817f66d74d Fixed crash on garbage code (#8317) 2018-01-07 12:52:28 +01:00
Matthias Krüger eb58df236e CheckOther::accessMovedError() / accessMoved, accessForwarded warnings: put variable name into single quotes. 2018-01-07 10:57:19 +01:00
Daniel Marjamäki 83b87b54b4 Fixed #8191 (False positive iterators regression) 2018-01-06 22:25:13 +01:00
Daniel Marjamäki 61767d4932 Fixed #8125 (incorrect error iterators) 2018-01-06 16:08:12 +01:00
Daniel Marjamäki 98b45ffbc0 Fixed #8314 (TemplateSimplifer crash) 2018-01-06 15:16:03 +01:00
Daniel Marjamäki 943693acfb TemplateSimplifier: Improved code for template aliases 2018-01-06 08:40:06 +01:00
Martin Ettl e33fe91b1a Micro optimize std::string::find() calls searching for a single space. 2018-01-05 22:24:28 +01:00
Daniel Marjamäki d6dae27803 Fixed Cppcheck postincrement warnings 2018-01-05 17:29:40 +01:00
Daniel Marjamäki 2c5225af43 Fixed use-after-free found by asan 2018-01-05 17:06:02 +01:00
Daniel Marjamäki 04c57381ea Fixed #8315 (heap use after free: templatesimplifier) 2018-01-05 16:10:13 +01:00
Matthias Krüger 94790620d6 templatesimplifier: fix two warnings about nonexplicit constructors.
Was:
[lib/templatesimplifier.cpp:37]: (style) Class 'FindToken' has a constructor with 1 argument that is not explicit.
[lib/templatesimplifier.cpp:47]: (style) Class 'FindName' has a constructor with 1 argument that is not explicit.
2018-01-05 15:53:13 +01:00
Daniel Marjamäki f74c19bbed Refactoring lookups in TemplateSimplifier 2018-01-05 15:27:43 +01:00
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