cppcheck/lib
José Martins b1e92fc399
Misra false positive fixes for rules 8.7 and 5.9 (#3844)
* Fix misra 8.7 false positives on single function usage

When there is a single usage of a function, we should first check if the
file it is used in, is the same one it was defined in. When this is not the
case, there is no violatior to be reported.

* Fix misra rule 5.9 false positives for exception

The exception for rule 5.9 described in the guidelines allows for
multiple definitions of internal linkage obejcts when these regard a
static inlined function defined in the same header file.

* Fix neglecting of inline keyword flag upon simplifications

When the inline keyword is being "simplified" and the inline flag is
degated to the next token. However, this information might be lost if the next
token itself is simplified/deleted in a futher pass. Therefore, we must
propagated the flag to all the next named tokens, so we can make sure the
function name token itself is tagged with this property.

* add tests for misra addon rules 8.7 and 5.9
2022-02-27 19:17:48 +01:00
..
CMakeLists.txt use target-specific configuration instead of global ones in CMake (#3534) 2021-10-30 09:08:07 +02:00
analyzer.h Update copyright year 2022-02-05 11:45:17 +01:00
analyzerinfo.cpp Update copyright year 2022-02-05 11:45:17 +01:00
analyzerinfo.h Format with uncrustify (#3388) 2021-08-07 20:51:18 +02:00
astutils.cpp Refactor: Use getEndOfExprScope instead of getEndOfVarScope (#3855) 2022-02-24 06:50:34 +01:00
astutils.h Refactor: Use getEndOfExprScope instead of getEndOfVarScope (#3855) 2022-02-24 06:50:34 +01:00
bughuntingchecks.cpp fixed and enabled performance-for-range-copy clang-tidy warning (#3682) 2022-02-12 08:20:45 +01:00
bughuntingchecks.h Update copyright year 2022-02-05 11:45:17 +01:00
calculate.h use inline suppressions for varid0 in selfcheck (#3842) 2022-02-21 18:35:02 +01:00
check.cpp Update copyright year 2022-02-05 11:45:17 +01:00
check.h Format with uncrustify (#3388) 2021-08-07 20:51:18 +02:00
check64bit.cpp Update copyright year 2022-02-05 11:45:17 +01:00
check64bit.h removed OVERRIDE and FINAL defines and use the keywords directly (#3767) 2022-02-10 23:02:24 +01:00
checkassert.cpp Update copyright year 2022-02-05 11:45:17 +01:00
checkassert.h removed OVERRIDE and FINAL defines and use the keywords directly (#3767) 2022-02-10 23:02:24 +01:00
checkautovariables.cpp Refactor: Use getEndOfExprScope instead of getEndOfVarScope (#3855) 2022-02-24 06:50:34 +01:00
checkautovariables.h removed OVERRIDE and FINAL defines and use the keywords directly (#3767) 2022-02-10 23:02:24 +01:00
checkbool.cpp Update copyright year 2022-02-05 11:45:17 +01:00
checkbool.h removed OVERRIDE and FINAL defines and use the keywords directly (#3767) 2022-02-10 23:02:24 +01:00
checkboost.cpp Update copyright year 2022-02-05 11:45:17 +01:00
checkboost.h removed OVERRIDE and FINAL defines and use the keywords directly (#3767) 2022-02-10 23:02:24 +01:00
checkbufferoverrun.cpp Update copyright year 2022-02-05 11:45:17 +01:00
checkbufferoverrun.h small utils.h cleanup (#3821) 2022-02-11 19:44:08 +01:00
checkclass.cpp Fix #10360 FP uninitMemberVar from copy constructor [inconclusive] (#3748) 2022-02-27 19:15:19 +01:00
checkclass.h small utils.h cleanup (#3821) 2022-02-11 19:44:08 +01:00
checkcondition.cpp Update copyright year 2022-02-05 11:45:17 +01:00
checkcondition.h small utils.h cleanup (#3821) 2022-02-11 19:44:08 +01:00
checkexceptionsafety.cpp Update copyright year 2022-02-05 11:45:17 +01:00
checkexceptionsafety.h removed OVERRIDE and FINAL defines and use the keywords directly (#3767) 2022-02-10 23:02:24 +01:00
checkfunctions.cpp Update copyright year 2022-02-05 11:45:17 +01:00
checkfunctions.h small utils.h cleanup (#3821) 2022-02-11 19:44:08 +01:00
checkinternal.cpp Update copyright year 2021-09-26 11:34:56 +02:00
checkinternal.h removed OVERRIDE and FINAL defines and use the keywords directly (#3767) 2022-02-10 23:02:24 +01:00
checkio.cpp Fix #7908 FN: redundant assignment in loop (#3650) 2022-02-22 09:51:44 +01:00
checkio.h small utils.h cleanup (#3821) 2022-02-11 19:44:08 +01:00
checkleakautovar.cpp Update copyright year 2022-02-05 11:45:17 +01:00
checkleakautovar.h small utils.h cleanup (#3821) 2022-02-11 19:44:08 +01:00
checkmemoryleak.cpp #8126 Fix previous commit (#3833) 2022-02-15 20:03:02 +01:00
checkmemoryleak.h small utils.h cleanup (#3821) 2022-02-11 19:44:08 +01:00
checknullpointer.cpp Update copyright year 2022-02-05 11:45:17 +01:00
checknullpointer.h removed OVERRIDE and FINAL defines and use the keywords directly (#3767) 2022-02-10 23:02:24 +01:00
checkother.cpp Fix #10823 FP cstyleCast with function pointer and calling convention (#3853) 2022-02-23 09:12:14 +01:00
checkother.h small utils.h cleanup (#3821) 2022-02-11 19:44:08 +01:00
checkpostfixoperator.cpp Update copyright year 2022-02-05 11:45:17 +01:00
checkpostfixoperator.h removed OVERRIDE and FINAL defines and use the keywords directly (#3767) 2022-02-10 23:02:24 +01:00
checksizeof.cpp Update copyright year 2022-02-05 11:45:17 +01:00
checksizeof.h removed OVERRIDE and FINAL defines and use the keywords directly (#3767) 2022-02-10 23:02:24 +01:00
checkstl.cpp checkstl.cpp: removed unused global containers and made a std::string a literal so it can be matchcompiled (#3801) 2022-02-08 09:02:59 +01:00
checkstl.h small utils.h cleanup (#3821) 2022-02-11 19:44:08 +01:00
checkstring.cpp Update copyright year 2022-02-05 11:45:17 +01:00
checkstring.h removed OVERRIDE and FINAL defines and use the keywords directly (#3767) 2022-02-10 23:02:24 +01:00
checktype.cpp Update copyright year 2022-02-05 11:45:17 +01:00
checktype.h removed OVERRIDE and FINAL defines and use the keywords directly (#3767) 2022-02-10 23:02:24 +01:00
checkuninitvar.cpp Update copyright year 2022-02-05 11:45:17 +01:00
checkuninitvar.h small utils.h cleanup (#3821) 2022-02-11 19:44:08 +01:00
checkunusedfunctions.cpp Update copyright year 2022-02-05 11:45:17 +01:00
checkunusedfunctions.h removed OVERRIDE and FINAL defines and use the keywords directly (#3767) 2022-02-10 23:02:24 +01:00
checkunusedvar.cpp Fix #10826 FN: unusedStructMember (#3858) 2022-02-26 18:53:00 +01:00
checkunusedvar.h removed OVERRIDE and FINAL defines and use the keywords directly (#3767) 2022-02-10 23:02:24 +01:00
checkvaarg.cpp Update copyright year 2022-02-05 11:45:17 +01:00
checkvaarg.h removed OVERRIDE and FINAL defines and use the keywords directly (#3767) 2022-02-10 23:02:24 +01:00
clangimport.cpp fixed and enabled performance-for-range-copy clang-tidy warning (#3682) 2022-02-12 08:20:45 +01:00
clangimport.h Update copyright year 2022-02-05 11:45:17 +01:00
color.cpp Update copyright year 2022-02-05 11:45:17 +01:00
color.h Fix MSVC build and some warnings (#3334) 2021-07-16 21:55:12 +02:00
config.h added CMake option USE_THREADS to be able to use threads instead of fork() / cleanups (#3852) 2022-02-23 09:04:35 +01:00
cppcheck.cpp Fix #7908 FN: redundant assignment in loop (#3650) 2022-02-22 09:51:44 +01:00
cppcheck.h removed OVERRIDE and FINAL defines and use the keywords directly (#3767) 2022-02-10 23:02:24 +01:00
cppcheck.natvis
cppcheck.vcxproj MSVC: add missing files to project (#3500) 2021-10-11 19:01:49 +02:00
cppcheck.vcxproj.filters Fix MSVC build (#3671) 2022-01-04 15:38:37 +01:00
ctu.cpp small utils.h cleanup (#3821) 2022-02-11 19:44:08 +01:00
ctu.h small utils.h cleanup (#3821) 2022-02-11 19:44:08 +01:00
errorlogger.cpp Restore symbol names from cache 2022-02-21 18:19:05 +01:00
errorlogger.h Update copyright year 2022-02-05 11:45:17 +01:00
errortypes.cpp Update copyright year 2022-02-05 11:45:17 +01:00
errortypes.h Update copyright year 2022-02-05 11:45:17 +01:00
exprengine.cpp Fix #10391 bug hunting; crash for small C-code (#3846) 2022-02-21 18:09:46 +01:00
exprengine.h removed OVERRIDE and FINAL defines and use the keywords directly (#3767) 2022-02-10 23:02:24 +01:00
forwardanalyzer.cpp Update copyright year 2022-02-05 11:45:17 +01:00
forwardanalyzer.h Format with uncrustify (#3388) 2021-08-07 20:51:18 +02:00
importproject.cpp Import project: do not crash when importing compile database generated by IAR workbench 2022-02-16 08:35:47 +01:00
importproject.h Update copyright year 2022-02-05 11:45:17 +01:00
infer.cpp Update copyright year 2022-02-05 11:45:17 +01:00
infer.h Update copyright year 2022-02-05 11:45:17 +01:00
lib.pri Refactor: Use interval analysis for symbolic values for inferCondtion (#3488) 2021-10-09 16:19:06 +02:00
library.cpp Update copyright year 2022-02-05 11:45:17 +01:00
library.h Update copyright year 2022-02-05 11:45:17 +01:00
matchcompiler.h Update copyright year 2021-09-26 11:34:56 +02:00
mathlib.cpp Update copyright year 2022-02-05 11:45:17 +01:00
mathlib.h Update copyright year 2022-02-05 11:45:17 +01:00
path.cpp feat: add support for .ipp and .ixx extensions (#3383) 2021-08-09 10:46:56 +02:00
path.h Format with uncrustify (#3388) 2021-08-07 20:51:18 +02:00
pathanalysis.cpp Update copyright year 2022-02-05 11:45:17 +01:00
pathanalysis.h Update copyright year 2022-02-05 11:45:17 +01:00
pathmatch.cpp Update copyright year 2022-02-05 11:45:17 +01:00
pathmatch.h Update copyright year 2022-02-05 11:45:17 +01:00
pcrerules.pri
platform.cpp small utils.h cleanup (#3821) 2022-02-11 19:44:08 +01:00
platform.h small utils.h cleanup (#3821) 2022-02-11 19:44:08 +01:00
precompiled.h Update copyright year 2022-02-05 11:45:17 +01:00
preprocessor.cpp Update copyright year 2022-02-05 11:45:17 +01:00
preprocessor.h Update copyright year 2022-02-05 11:45:17 +01:00
programmemory.cpp small utils.h cleanup (#3821) 2022-02-11 19:44:08 +01:00
programmemory.h small utils.h cleanup (#3821) 2022-02-11 19:44:08 +01:00
reverseanalyzer.cpp Update copyright year 2022-02-05 11:45:17 +01:00
reverseanalyzer.h Format with uncrustify (#3388) 2021-08-07 20:51:18 +02:00
settings.cpp added CMake option USE_THREADS to be able to use threads instead of fork() / cleanups (#3852) 2022-02-23 09:04:35 +01:00
settings.h added CMake option USE_THREADS to be able to use threads instead of fork() / cleanups (#3852) 2022-02-23 09:04:35 +01:00
standards.h Update copyright year 2022-02-05 11:45:17 +01:00
summaries.cpp use inline suppressions for varid0 in selfcheck (#3842) 2022-02-21 18:35:02 +01:00
summaries.h Format with uncrustify (#3388) 2021-08-07 20:51:18 +02:00
suppressions.cpp Update copyright year 2022-02-05 11:45:17 +01:00
suppressions.h Update copyright year 2022-02-05 11:45:17 +01:00
symboldatabase.cpp Fix #10360 FP uninitMemberVar from copy constructor [inconclusive] (#3748) 2022-02-27 19:15:19 +01:00
symboldatabase.h Fix #9092 FN missingOverride - subclass in namespace (#3793) 2022-02-12 08:19:07 +01:00
templatesimplifier.cpp Fix #7908 FN: redundant assignment in loop (#3650) 2022-02-22 09:51:44 +01:00
templatesimplifier.h Format with uncrustify (#3388) 2021-08-07 20:51:18 +02:00
timer.cpp Format with uncrustify (#3388) 2021-08-07 20:51:18 +02:00
timer.h removed OVERRIDE and FINAL defines and use the keywords directly (#3767) 2022-02-10 23:02:24 +01:00
token.cpp Fix #10817 Crash in checkPassByReference() / #10810 Stack overflow with decltype / #10763 Crash on invalid code (#3840) 2022-02-18 12:59:21 +01:00
token.h Fix #10527 FP variableScope for if with init-statement (#3811) 2022-02-08 16:12:09 +01:00
tokenize.cpp Misra false positive fixes for rules 8.7 and 5.9 (#3844) 2022-02-27 19:17:48 +01:00
tokenize.h small utils.h cleanup (#3821) 2022-02-11 19:44:08 +01:00
tokenlist.cpp Fix 10808: cppcheckError AST cyclic dependency with decltype (#3850) 2022-02-22 06:30:17 +01:00
tokenlist.h small utils.h cleanup (#3821) 2022-02-11 19:44:08 +01:00
tokenrange.h Format with uncrustify (#3388) 2021-08-07 20:51:18 +02:00
utils.cpp Update copyright year 2022-02-05 11:45:17 +01:00
utils.h small utils.h cleanup (#3821) 2022-02-11 19:44:08 +01:00
valueflow.cpp Fix #10828 Internal error. Token::Match called with varid 0 (#3859) 2022-02-26 23:48:29 +01:00
valueflow.h Fix #7908 FN: redundant assignment in loop (#3650) 2022-02-22 09:51:44 +01:00
valueptr.h Update copyright year 2021-09-26 11:34:56 +02:00
version.h 2.7: Set versions 2022-02-05 12:17:54 +01:00
version.rc