Commit Graph

125 Commits

Author SHA1 Message Date
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
Alexander Mai d45f5c94cb Add (disabled) function in SymbolDatabase to check variable list (e.g. find variables w/o scope). Fix some doxygen warnings. 2016-02-03 17:08:46 +01:00
Albert ARIBAUD (3ADEV) 38e70dfb74 Preprocessor directives for addons
This patch augments the XML dumps with a 'directivelist'
subnode which lists all raw preprocessor directives met
while reading the source code in each configuration.

Also, the addons/cppcheckdata.py file has been extended
to give easy access to the list of directives and to
provide Python support for the --template (or short -t)
option.

Finally, an new addon, addons/y2038/y2038.py, is created
to detect when a glibc symbol might be Y2038-sensitive,
based on whether and how _TIME_BITS and _USE_TIME_BITS64
are defined when meeting the symbol.
2016-01-15 12:36:35 +01:00
Lauri Nurmi 996c9244d8 Update copyright year to 2007-2016. 2016-01-01 15:34:45 +02:00
Daniel Marjamäki 0f9d90d2be Changed Copyrights. Removed my name. 2015-11-18 20:04:50 +01:00
Simon Shanks 9910c1fa0c Fixed #6617 (preprocessor performance improvement) 2015-07-24 13:30:41 +02:00
PKEuS dd9cb929bf Refactorization in Preprocessor: Support beginning/end of file in removeSpaceNearNL(), avoid string copying when calling replaceIfDefined() 2015-07-21 12:13:58 +02:00
Daniel Marjamäki ff11ba9847 Updated copyright year to 2015 2015-01-03 12:14:58 +01:00
Daniel Marjamäki 051d42ae6b astyle formatting 2014-11-20 14:20:09 +01:00
orbitcowboy f5d804f71a running astyle 2014-11-20 10:13:03 +01:00
PKEuS a1b7ab277b Changed handling of unhandled characters:
- Don't abort checking (reverts 42140b6488)
- Modified error message: New Id unhandledCharacter, removed redundant line information, improved message text
2014-08-08 09:49:09 +02:00