Commit Graph

519 Commits

Author SHA1 Message Date
chrchr-github d65cc696b0
Get type from auto with scope () 2023-02-24 21:05:26 +01:00
Oliver Stöneberg f7a415dbf3
Token: do not return non-`const` pointer from `const` methods - part 1 () 2023-02-08 21:07:16 +01:00
Oliver Stöneberg 8ef14dad98
fixed and enabled `performance-faster-string-find` clang-tidy warning () 2023-02-08 21:01:51 +01:00
chrchr-github 8af1026696
Set functions for calls through iterators () 2023-02-07 21:57:59 +01:00
Daniel Marjamäki 464fbe8d53 Update copyright year 2023-01-28 10:16:34 +01:00
Oliver Stöneberg 124668979c
replaced some `std::ostringstream` usage with `std::to_string()` () 2023-01-16 22:05:33 +01:00
Armin Müller a77f0d9403
Typos found by running "codespell" () 2023-01-10 15:15:27 +01:00
Oliver Stöneberg d3a2cdc26c
converted (undocumented) define `MAXTIME` into (undocumented) command-line options `--checks-max-time=`, `--template-max-time=` and `--typedef-max-time=` () 2022-12-30 21:21:05 +01:00
Oliver Stöneberg 1cfe49e340
use `const_iterator` where possible () 2022-12-30 15:13:47 +01:00
Oliver Stöneberg 3c68b9b29f
use `cbegin()` and `cend()` with `const_ierator` loops () 2022-12-20 20:32:16 +01:00
chrchr-github 0e57c27dd3
Fix debug: CheckClass::checkConst found unlinked template argument list () 2022-12-07 09:12:46 +01:00
chrchr-github 13d81cdd58
follow-up: Handle more variadic template arguments ()
* Update templatesimplifier.cpp

* Add tests
2022-10-22 00:28:33 +02:00
chrchr-github c6c339a3e7
Fix Assert failure in templatesimplifier.cpp () 2022-10-16 19:34:25 +02:00
chrchr-github 3273e51fd5
Fix FN useStlAlgorithm with iterators () 2022-10-16 13:46:26 +02:00
Oliver Stöneberg ee124cd097
modernized `erase()` calls () 2022-10-02 07:13:31 +02:00
Oliver Stöneberg cff1cd9cda
applied clang-tidy `misc-const-correctness` fixes for POD types, iterators and references ()
* applied `misc-const-correctness` fixes for POD types and iterators

* applied `misc-const-correctness` fixes for references
2022-10-02 07:12:40 +02:00
Oliver Stöneberg b3ec225480
iwyu.yml: use `debian:unstable` to always get latest include-what-you-use / cleaned up includes ()
* iwyu.yml: use debian:unstable to always get latest include-what-you-use

* cleaned up includes based on include-what-you-use

* mitigated include-what-you-use false positives
2022-09-16 07:15:49 +02:00
Oliver Stöneberg 76d1b9f31a
avoid unnecessary copies with `emplace_back()` ()
* avoid unnecessary copies with `emplace_back()`

* cmdlineparser.cpp: suppress `accessMoved` selfcheck false positives
2022-09-10 11:25:15 +02:00
Oliver Stöneberg 847391ea2d
some minor optimizations ()
* cppcheck.cpp: reduced scope of a variable

* cppcheck.cpp: removed unnecessary severity checks

* cppcheck.cpp: avoid unnecessary copy

* templatesimplifier.cpp: perform early exit in loop in `expandTemplate()`
2022-09-07 19:19:04 +02:00
Daniel Marjamäki 4779f0e172 TemplateSimplifier: Fixed instantiation when template parameters are A<..>, B<..> 2022-09-01 20:24:01 +02:00
Oliver Stöneberg 670b872f30
implemented move constructor for `TemplateSimplifier::TokenAndName` () 2022-08-21 17:02:03 +02:00
Oliver Stöneberg 16f598c409
added missing `sstream` includes () 2022-08-19 10:16:23 +02:00
Oliver Stöneberg efaaa58896
fixed some `modernize-use-emplace` false negatives and some `bugprone-assignment-in-if-condition` warnings () 2022-07-28 22:53:59 +02:00
Oliver Stöneberg b65b47d3a8
enabled and fixed `modernize-pass-by-value` clang-tidy warnings () 2022-07-28 22:51:45 +02:00
chrchr-github f5c4a21eae
Fix FN redundantCopyLocalConst () 2022-07-10 11:33:24 +02:00
Oliver Stöneberg c9c1f83a69
use `emptyString` more consistently () 2022-07-10 10:57:29 +02:00
chrchr-github f8b796403b
Fix Crash in expandTemplate() () 2022-06-28 22:43:34 +02:00
PKEuS 1275b5275e
LCppC backport: Various optimizations ()
* Optimization: Use Token::eIncDecOp instead of expensive Token::Match calls

Merged from LCppC.

* Small Optimizations: - Moved a std::set that is only need during initialization of SymbolDatabase to function scope - Use std::vector instead of std::list

Merged from LCppC.

* Optimization: Refactorized various Token::Match calls and surrounding conditions

Merged from LCppC.

* Refactorization: Cleanup usage of std::multimap

Merged from LCppC.
2022-06-08 16:58:57 +02:00
Oliver Stöneberg d36e05af28
enabled and fixed `modernize-use-emplace` clang-tidy warnings ()
* enabled and fixed `modernize-use-emplace` clang-tidy warnings

* avoid unnecessary creation of temporaries in `emplace_back()` calls
2022-06-03 15:09:29 +02:00
chrchr-github 7fbb9c7c13
Fix FN constVariable with range-based for loop ()
* Fix  FN constVariable with range-based for loop

* Format

* nullptr check

* Restrict scopes

* Add const

* Undo

* Add more const
2022-05-29 17:06:33 +02:00
chrchr-github 55cb396d18
Fix Same template name confuses check () 2022-04-13 12:25:21 +02:00
Oliver Stöneberg 45158ec064
cleaned up includes based on include-what-you-use ()
* cleaned up includes based on include-what-you-use

* updated translations
2022-04-13 12:24:00 +02:00
chrchr-github 172aafdeb8
Fix FN: redundant assignment in loop () 2022-02-22 09:51:44 +01:00
chrchr-github 18e00bb4fd
Fix Crash in checkPassByReference() / Stack overflow with decltype / Crash on invalid code ()
* Fix  Crash in checkPassByReference()

* Format

* Fix  Stack overflow with decltype

* Fix  Crash on invalid code in TemplateSimplifier::templateParameters
2022-02-18 12:59:21 +01:00
Oliver Stöneberg 6e57cc4323
small utils.h cleanup () 2022-02-11 19:44:08 +01:00
Daniel Marjamäki 3989408738 Update copyright year 2022-02-05 11:45:17 +01:00
Oliver Stöneberg 8f7770f512
added an include-what-you-use GitHub Action () 2022-02-01 17:19:19 +01:00
chrchr-github 127b3bb1c4
Fix FP unreadVariable caused by invalid template injection () 2022-02-01 17:15:27 +01:00
Oliver Stöneberg 171da2e6f9
avoid dependency on transitive includes - based on include-what-you-use () 2022-01-27 19:03:20 +01:00
Paul Fultz II fa651272f0
Fix 10001: Syntax error on valid C++ code () 2022-01-12 22:04:28 +01:00
Paul Fultz II ac4f4258a0
Fix 10651: Crash on static template method () 2021-12-16 22:32:44 +01:00
Stefan van Kessel 5770110377
Fixed (Only the first default argument was copied from the forward declaration;) ()
Co-authored-by: Stefan van Kessel <stefan.vankessel@muehlbauer.de>
2021-11-15 20:37:46 +01:00
Paul Fultz II d1181ad8e2
Fix 10506: Hang: template alias (TemplateSimplfier) () 2021-09-25 11:56:39 +02:00
chrchr-github 05acc13582
Shadow variables, const, rename function () 2021-09-15 20:28:58 +02:00
Paul Fultz II 7f358b2bed
Format with uncrustify () 2021-08-07 20:51:18 +02:00
Robert Reif 94dc6c2c3f
fix (cppcheck crashes) () 2021-08-01 10:31:36 +02:00
Daniel Marjamäki 524e4b8c96 CI; Fix self check warning, pointer can be const 2021-07-20 12:21:01 +02:00
dummyunit 247b2d8c83
Support array types in template simplifier () 2021-05-23 10:40:09 +02:00
Daniel Marjamäki 2c24af02c8 Fixed self-check error. Use Token::simpleMatch for simple pattern. 2021-05-09 23:02:35 +02:00
Daniel Marjamäki 3b37c14b3c Parser; Partial C++20 support, explicit(bool) 2021-05-09 18:47:02 +02:00