cppcheck/lib
Georgiy Komarov b89f5fbeff
misra: Fix 8.2 false positives (#3309)
* misra: Fix 8.2 false positives

Fix false positives in rule 8.2 that occurred in cases when we have a
function definition and declaration in the same file.

For example, the following code generated false positives before this
commit:

```
void f(uint8_t * const x);
void f(uint8_t * const x)
{ (void)x; }
```

We need to distinguish the declaration and the definition, so the dump
file generation routine was extended to keep token where the definition
of the function. The analysis in the addon also been improved.

Closes Trac issue: https://trac.cppcheck.net/ticket/10219
2021-06-27 10:51:32 +02:00
..
CMakeLists.txt lib: Add condition for include externals/tinyxml2 (#2923) 2020-11-27 09:57:12 +01:00
analyzer.h Fix 10314: Possible nullPointerRedundantCheck false positive (#3298) 2021-06-19 13:59:48 +02:00
analyzerinfo.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
analyzerinfo.h Update Copyright year 2021-03-21 20:58:32 +01:00
astutils.cpp Fix 10314: Possible nullPointerRedundantCheck false positive (#3298) 2021-06-19 13:59:48 +02:00
astutils.h Fix issue 10076: ValueFlow: False positive after address of var is taken 'T t = {{{&var}}};' (#3283) 2021-06-03 07:31:46 +02:00
bughuntingchecks.cpp Revert "Clang import; This experimental feature didn't "take off" much. After a lot of work we are still far fram the goal. I remove it now but don't rule out completely that it could ever be added again." 2021-04-30 16:47:02 +02:00
bughuntingchecks.h Add 'bughuntingchecks' 2020-06-19 13:16:48 +02:00
check.cpp cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
check.h Update Copyright year 2021-03-21 20:58:32 +01:00
check64bit.cpp cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
check64bit.h
checkassert.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
checkassert.h
checkautovariables.cpp Fix todo test for returning a dangling reference (#3284) 2021-06-04 17:15:39 +02:00
checkautovariables.h Fixed #9918 (False positive: autoVariable pointer is NULLed later) 2020-09-28 22:48:57 +02:00
checkbool.cpp cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
checkbool.h Update Copyright year 2020-10-03 09:15:56 +02:00
checkboost.cpp cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
checkboost.h
checkbufferoverrun.cpp buffer overrun; Fixed false negative for dynamically allocated float buffer 2021-05-22 15:39:20 +02:00
checkbufferoverrun.h #10244: Fixed false negative: bufferAccessOutOfBounds 2021-04-13 16:40:38 +02:00
checkclass.cpp Fix false positives when class might inherit from VCL TObject class 2021-06-13 18:56:04 +02:00
checkclass.h cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
checkcondition.cpp knownConditionTrueFalse; avoid several warnings when nonzero expression is compared to see if it is positive or negative 2021-06-25 16:25:25 +02:00
checkcondition.h assignmentInCondition: Clarify error message 2021-04-07 19:46:00 +02:00
checkexceptionsafety.cpp Formatted the code [ci skip] 2021-06-02 16:59:34 +02:00
checkexceptionsafety.h Moving error reporting functions from header to cpp (#3279) 2021-06-02 07:00:10 +02:00
checkfunctions.cpp CheckFunctions::checkIgnoredReturnValue; Fixed testrunner 2021-04-05 05:17:29 +02:00
checkfunctions.h library: Add new warning: ignoredReturnErrorCode (#2877) 2020-11-05 13:35:52 +01:00
checkinternal.cpp fixed some modernize-loop-convert clang-tidy warnings (#2815) 2020-09-21 19:30:47 +02:00
checkinternal.h Update Copyright year 2021-03-21 20:58:32 +01:00
checkio.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
checkio.h Update copyright year 2020-06-13 16:37:12 +02:00
checkleakautovar.cpp Revert "Clang import; This experimental feature didn't "take off" much. After a lot of work we are still far fram the goal. I remove it now but don't rule out completely that it could ever be added again." 2021-04-30 16:47:02 +02:00
checkleakautovar.h Update Copyright year 2021-03-21 20:58:32 +01:00
checkmemoryleak.cpp Fix FP leakNoVarFunctionCall with passthrough returns (#3249) 2021-05-08 10:26:10 +02:00
checkmemoryleak.h
checknullpointer.cpp cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
checknullpointer.h Update copyright year 2020-06-13 16:37:12 +02:00
checkother.cpp knownConditionTrueFalse; avoid several warnings when nonzero expression is compared to see if it is positive or negative 2021-06-25 16:25:25 +02:00
checkother.h knownConditionTrueFalse; avoid several warnings when nonzero expression is compared to see if it is positive or negative 2021-06-25 16:25:25 +02:00
checkpostfixoperator.cpp cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
checkpostfixoperator.h
checksizeof.cpp cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
checksizeof.h
checkstl.cpp Revert "Remove unnecessary null check (#3213)" 2021-05-01 18:54:51 +02:00
checkstl.h Improve check: check for known empty containers passed to algorithms (#2768) 2020-09-02 07:11:23 +02:00
checkstring.cpp cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
checkstring.h
checktype.cpp Running astyle [ci skip] 2021-06-05 08:53:15 +02:00
checktype.h Removed integerOverflowOptimization checking and merged functionality into invalidTestForOverflow 2021-01-05 11:38:19 +01:00
checkuninitvar.cpp Fix another FP with range for macro (#3276) 2021-05-26 04:52:55 +02:00
checkuninitvar.h Uninitialized variables; check RHS expression 2021-05-21 14:31:25 +02:00
checkunusedfunctions.cpp cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
checkunusedfunctions.h
checkunusedvar.cpp Fix CI; Cppcheck find some more unusedAllocatedMemory violations in test/cfg/.. 2021-05-13 23:08:58 +02:00
checkunusedvar.h astyle formatting 2020-11-28 05:52:35 +01:00
checkvaarg.cpp Revert "Clang import; This experimental feature didn't "take off" much. After a lot of work we are still far fram the goal. I remove it now but don't rule out completely that it could ever be added again." 2021-04-30 16:47:02 +02:00
checkvaarg.h
clangimport.cpp Revert "Clang import; This experimental feature didn't "take off" much. After a lot of work we are still far fram the goal. I remove it now but don't rule out completely that it could ever be added again." 2021-04-30 16:47:02 +02:00
clangimport.h Revert "Clang import; This experimental feature didn't "take off" much. After a lot of work we are still far fram the goal. I remove it now but don't rule out completely that it could ever be added again." 2021-04-30 16:47:02 +02:00
config.h fixed/aligned some compiler warnings (#3065) 2021-01-21 18:13:32 +01:00
cppcheck.cpp Suppressions; Fixed problem with cppcheck build dir is used 2021-06-12 18:19:00 +02:00
cppcheck.h cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
cppcheck.natvis
cppcheck.vcxproj allow token iteration in range for 2021-06-14 07:39:01 +02:00
cppcheck.vcxproj.filters allow token iteration in range for 2021-06-14 07:39:01 +02:00
ctu.cpp Fix compiler error 2021-05-01 18:57:10 +02:00
ctu.h Update Copyright year 2021-03-21 20:58:32 +01:00
errorlogger.cpp Read error locations in the correct order from XML (#3226) 2021-04-22 14:28:33 +02:00
errorlogger.h cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
errortypes.cpp
errortypes.h Update Copyright year 2021-03-21 20:58:32 +01:00
exprengine.cpp cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
exprengine.h cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
forwardanalyzer.cpp astyle formatting 2021-06-19 14:47:35 +02:00
forwardanalyzer.h astyle formatting 2021-06-19 14:47:35 +02:00
importproject.cpp CI; Fixed problems in windows paths 2021-06-12 12:45:31 +02:00
importproject.h ImportProject; Try to use relative paths 2021-06-12 11:10:35 +02:00
lib.pri Revert "Clang import; This experimental feature didn't "take off" much. After a lot of work we are still far fram the goal. I remove it now but don't rule out completely that it could ever be added again." 2021-04-30 16:47:02 +02:00
library.cpp Fixed make checkcfg 2021-05-01 19:17:07 +02:00
library.h Update Copyright year 2021-03-21 20:58:32 +01:00
matchcompiler.h
mathlib.cpp Fixed #10196 ("Unhandled char constant 'x'" with non-standard escape character) 2021-05-08 12:54:18 +02:00
mathlib.h Refactoring; Reuse simplecpp::characterLiteralToLL 2021-05-02 13:44:37 +02:00
path.cpp cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
path.h Update Copyright year 2021-03-21 20:58:32 +01:00
pathanalysis.cpp
pathanalysis.h
pathmatch.cpp Update Copyright year 2020-10-03 09:15:56 +02:00
pathmatch.h
pcrerules.pri
platform.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
platform.h
precompiled.h Visual Studio: Use new files precompiled.h with several common includes for core and testrunner. 2020-05-29 12:16:04 +02:00
preprocessor.cpp Set simplecpp std option 2021-04-26 16:32:44 +02:00
preprocessor.h Update Copyright year 2020-10-03 09:15:56 +02:00
programmemory.cpp astyle formatting 2021-06-19 14:47:35 +02:00
programmemory.h Fix 10294: ValueFlow: Wrong <Uninit> value below loop (#3291) 2021-06-09 09:20:43 +02:00
reverseanalyzer.cpp Fix 10294: ValueFlow: Wrong <Uninit> value below loop (#3291) 2021-06-09 09:20:43 +02:00
reverseanalyzer.h Update Copyright year 2021-03-21 20:58:32 +01:00
settings.cpp Revert "Clang import; This experimental feature didn't "take off" much. After a lot of work we are still far fram the goal. I remove it now but don't rule out completely that it could ever be added again." 2021-04-30 16:47:02 +02:00
settings.h Revert "Clang import; This experimental feature didn't "take off" much. After a lot of work we are still far fram the goal. I remove it now but don't rule out completely that it could ever be added again." 2021-04-30 16:47:02 +02:00
standards.h Update Copyright year 2020-10-03 09:15:56 +02:00
summaries.cpp Summaries: Moved to its own files 2020-12-20 19:53:58 +01:00
summaries.h Update Copyright year 2021-03-21 20:58:32 +01:00
suppressions.cpp Fix CodeQL warning, Multiplication result converted to larger type 2020-11-06 19:50:05 +01:00
suppressions.h Update Copyright year 2021-03-21 20:58:32 +01:00
symboldatabase.cpp misra: Fix 8.2 false positives (#3309) 2021-06-27 10:51:32 +02:00
symboldatabase.h Running astyle [ci skip] 2021-06-03 07:35:50 +02:00
templatesimplifier.cpp Support array types in template simplifier (#3267) 2021-05-23 10:40:09 +02:00
templatesimplifier.h improved compiler warnings about missing attributes (#3232) 2021-04-25 12:52:09 +02:00
timer.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
timer.h
token.cpp allow token iteration in range for 2021-06-14 07:39:01 +02:00
token.h allow token iteration in range for 2021-06-14 07:39:01 +02:00
tokenize.cpp Tokenizer::simplifyAttribute; Set function attribute for function pointer 2021-06-26 14:23:39 +02:00
tokenize.h Fixed #10196 ("Unhandled char constant 'x'" with non-standard escape character) 2021-05-08 12:54:18 +02:00
tokenlist.cpp ValueFlow: Clarify note when impossible value is assigned (#10297) 2021-06-24 17:10:06 +02:00
tokenlist.h Revert "Clang import; This experimental feature didn't "take off" much. After a lot of work we are still far fram the goal. I remove it now but don't rule out completely that it could ever be added again." 2021-04-30 16:47:02 +02:00
tokenrange.h astyle formatting 2021-06-14 07:39:41 +02:00
utils.cpp cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
utils.h cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
valueflow.cpp Tokenizer::simplifyAttribute; Set function attribute for function pointer 2021-06-26 14:23:39 +02:00
valueflow.h Running astyle [ci skip] 2021-06-05 08:53:15 +02:00
valueptr.h
version.h 2.4: Set version 2021-03-21 21:25:54 +01:00
version.rc