Commit Graph

135 Commits

Author SHA1 Message Date
Daniel Marjamäki 3abe8eeca5 Update copyright year 2023-06-21 19:58:11 +02:00
Oliver Stöneberg b3016f01a1
fixed some CLion inspection warnings (#4688)
* fixed some CLion "Unused global declaration" warnings

* fixed some CLion "Not implemented function" warnings

* fixed some CLion "Unused struct" warnings

* added TODO

* removed unused parameter reported by CLion

* fixed some CLion "Unused macro" warnings

* fixed some CLion "Condition is always true" warnings and a CLion "The value is never used" warning
2023-04-28 16:02:41 +02:00
Oliver Stöneberg c249cc9098
avoid redundant `simplecpp::Output::type` switch blocks (#5005)
* avoid redundant `simplecpp::Output::type` switch blocks

* fixed `useStlAlgorithm` warnings
2023-04-28 15:37:59 +02:00
Oliver Stöneberg db955a13a9
moved test-only `Preprocessor::getcode()` out of `lib` (#4993) 2023-04-22 10:22:00 +02:00
Oliver Stöneberg ad464c4feb
Preprocessor: relaxed dependency on `Suppressions` (#4983)
* Preprocessor: cleaned up `missingInclude()`

* Preprocessor: relaxed dependency on `Suppressions` / adjusted `TestPreProcessor::inline_suppression_for_missing_include()` which was not testing production behavior

* test/cli/test-other.py: added test for `missingInclude` and `missingIncludeSystem` inline suppressions

* fixed `constParameterReference` selfcheck warning
2023-04-21 10:14:34 +02:00
Oliver Stöneberg 901b2ab838
Preprocessor: provide suppressions separately from settings (#4878) 2023-03-09 20:15:53 +01:00
Oliver Stöneberg 7fd4118d60
Fix #10039 (integrate `--check-config` include findings with normal analysis) / also fixes #11283 (#3229) 2023-03-04 09:02:35 +01:00
Oliver Stöneberg 381361629e
Preprocessor: removed unreachable `ConfigurationNotChecked` finding (#4790) 2023-03-02 21:50:57 +01:00
Oliver Stöneberg 4bf5dcd29f
cleaned up includes based on include-what-you-use (#4358)
* cleaned up includes based on include-what-you-use

* testlibrary.cpp: no need for `empyString` optimization
2022-08-14 12:44:19 +02:00
Oliver Stöneberg b65b47d3a8
enabled and fixed `modernize-pass-by-value` clang-tidy warnings (#4169) 2022-07-28 22:51:45 +02:00
Daniel Marjamäki b888f9cf92 use hash instead of checksum to check if content is changed 2022-07-07 12:16:01 +02:00
PKEuS 4bd189c3c8
Refactorization: Faster calculation of CRC32 by avoiding to create a temporary string. Use proper types in checksum functions. (#4180)
Merged from LCppC
2022-06-08 16:55:06 +02:00
chrchr-github 7fbb9c7c13
Fix #10980 FN constVariable with range-based for loop (#4144)
* Fix #10980 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
Daniel Marjamäki 3989408738 Update copyright year 2022-02-05 11:45:17 +01:00
Oliver Stöneberg 0ba9cb4e64
fixed some unusedFunction warnings (#3618) 2022-01-04 15:48:08 +01:00
Daniel Marjamäki 08f9de95e2 Update copyright year 2021-09-26 11:34:56 +02:00
Daniel Marjamäki 74ab8f1a48 misra; implemented rule 20.8 2021-07-22 08:46:28 +02:00
Daniel Marjamäki 447bea5c18 Preprocessor; write macrousage in dump output 2021-07-08 14:36:28 +02:00
Daniel Marjamäki 8d20d8afb5 Update Copyright year 2020-10-03 09:15:56 +02:00
Daniel Marjamäki 0583763cc6 Fixed #3088 (False positive: Dont report "struct or union member is never used" for structs with __attribute__((packed)) or #pragma pack(push)) 2020-06-30 11:00:40 +02:00
Daniel Marjamäki 6890757986 Update Copyright year 2019-12-21 11:23:01 +01:00
Daniel Marjamäki 2a2fa49098 Thread safety: use std::atomic for global flags 2019-12-19 18:38:22 +01:00
Sebastian 95696ead23
Catch preprocessor errors possibly issued during loading files (#2430)
* Also catch preprocessor errors possibly issued during loading files

Currently only errors that are issued during preprocessing are caught.

* Bump simplecpp, implement suggestions

Use return value checking instead of catching an exception for calling
Preprocessor::loadFiles().
Handle new enum value simplecpp::Output::EXPLICIT_INCLUDE_NOT_FOUND
where the corresponding enum is used in Cppcheck.

* Use "noloc" location if an explicit include can not be opened
2019-12-09 19:16:55 +01:00
Daniel Marjamäki 0ca96f2a7d Renamed private member file0 2018-06-17 09:06:16 +02:00
Daniel Marjamäki 517d8f9684 Renamed private member tokenlists to mTokenLists 2018-06-17 08:58:56 +02:00
Daniel Marjamäki de0e22a1fb Renamed private member directives 2018-06-17 08:45:45 +02:00
Daniel Marjamäki 79ffe1d4fc Rename _tokenizer, _settings, _errorLogger 2018-06-16 16:10:28 +02:00
Daniel Marjamäki 45379a3aa6 Updated copyright year for modified files
[ci skip]
2018-06-10 22:07:21 +02:00
Daniel Marjamäki d7dfa29864 Preprocessor: only throw errors upon request. 2018-05-28 14:11:59 +02:00
Daniel Marjamäki c4caee6b18 Updated copyright year 2018-01-14 15:37:52 +01:00
Ayaz Salikhov 1d2b58e828 Correctify explicit usage (#951) 2017-09-07 13:03:45 +02:00
Ayaz Salikhov 28aa939d69 iwyu - include what you use 2017-05-27 04:33:47 +02:00
Daniel Marjamäki 899615c1e4 update simplecpp includes
[ci skip]
2017-05-18 22:26:07 +02:00
Daniel Marjamäki 1f4b84379d Fix for #pragma asm 2017-05-17 21:58:46 +02:00
Daniel Marjamäki 67e3187653 Preprocessor: Refactor handling of #pragma asm 2017-05-17 10:25:37 +02:00
Daniel Marjamäki 2c3232affa cppcheck-build-dir: Use settings and cppcheck version in checksum so results will be recalculated if cppcheck is upgraded or there is significant changes on the command line. 2016-10-29 22:40:44 +02:00
Daniel Marjamäki a860c4c231 refactoring checksum calculations for --cppcheck-build-dir 2016-10-29 15:35:31 +02:00
Daniel Marjamäki 9ff3e85899 Added --cppcheck-build-dir flag 2016-10-29 12:18:11 +02:00
Daniel Marjamäki b86c2689b3 TestPreprocessor: Fix output 2016-08-06 13:28:24 +02:00
Daniel Marjamäki 3777db39db Preprocessor: Mostly refactorings. Also added handling of --include. 2016-08-06 09:15:09 +02:00
Daniel Marjamäki 695b1f0ef3 Fixed #5692 (Preprocessor: ifdef symbol used indirectly in code leads to 'analysis failed') 2016-08-01 20:09:41 +02:00
Daniel Marjamäki 1a4ef60e7c Fixed #7639 (rule support partially broken since simplecpp was introduced) 2016-07-28 13:40:52 +02:00
PKEuS 9a6569fde1 Always set ErrorMessage::file0 to ensure that the source file that cppcheck is checking when an error occurs can be identified
Removed unused function and unused includes from preprocessor.h/cpp
2016-07-26 16:28:40 +02:00
Daniel Marjamäki 2feb86a6af Preprocessor: set platform info 2016-07-25 14:52:23 +02:00
Daniel Marjamäki 90faa80590 Preprocessor: Cleanup unused functions 2016-07-25 14:29:02 +02:00
Daniel Marjamäki e9fef003ac Preprocessor: refactoring directives, they are now only set once for each file 2016-07-24 14:02:21 +02:00
Daniel Marjamäki 48fc19b34c Remove unused function Preprocessor::preprocessCleanupDirectives() 2016-07-24 12:51:52 +02:00
PKEuS 2e2800f5bd Fixed several MSVC warnings 2016-07-24 12:36:36 +02:00
Daniel Marjamäki e16f0e500c Preprocessor: Parse comments and then remove them 2016-07-21 07:48:17 +02:00
Daniel Marjamäki 03d2829fb9 Merge simplecpp branch 2016-07-20 12:21:00 +02:00