cppcheck/lib
dummyunit ac505afe69
Fixed #9729 (AST broken: lambda with noexcept keyword) (#3243)
The previous fix for the issue (43b58dbc9e) didn't seem to actually fix
it because it added a check for noexcept without a condition, but when
AST is created noexcept always has a condition due to simplification
from "noexcept" to "noexcept(true)" in Tokenizer::simplifyKeyword().
The issue from the ticket couldn't be reproduced neither on 43b58dbc9e
nor on the previous commit, so it is hard to tell whether the fix was
effective or not.

The issue appeared again after a refactoring of AST code in ac67049661.
Test added with the original fix was unable to catch that because it
used testAst() helper function which skips most simplification steps.

To fix the issue we now check for noexcept with a condition and add a
proper regression test that:
1. Uses tokenizeAndStringify() to ensure that all simplifications are
   performed before AST is created.
2. Parses the code snippet from the ticket, as having "if (cond)" is
   crucial to reproducing the original issue (internalAstError).

Also fix AST creation for lambdas that have both constexpr and mutable
keywords.
2021-05-02 21:34:28 +02:00
..
CMakeLists.txt lib: Add condition for include externals/tinyxml2 (#2923) 2020-11-27 09:57:12 +01:00
analyzer.h Update Copyright year 2021-03-21 20:58:32 +01: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 compiler warning, non-static function 2021-04-22 18:40:44 +02:00
astutils.h cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +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 Remove unnecessary null check (#3215) 2021-04-28 18:05:32 +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 #10244: Fixed false negative: bufferAccessOutOfBounds 2021-04-13 16:40:38 +02:00
checkbufferoverrun.h #10244: Fixed false negative: bufferAccessOutOfBounds 2021-04-13 16:40:38 +02:00
checkclass.cpp added clang-tidy to CI (#3218) 2021-04-18 21:51:47 +02:00
checkclass.h cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
checkcondition.cpp Fix issue 10208: FP: knownConditionTrueFalse in for loop with function that assigns by ref (#3198) 2021-04-18 21:42:27 +02:00
checkcondition.h assignmentInCondition: Clarify error message 2021-04-07 19:46:00 +02:00
checkexceptionsafety.cpp cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
checkexceptionsafety.h Update Copyright year 2021-03-21 20:58:32 +01: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 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
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 astyle formatting 2021-05-01 07:35:03 +02:00
checkother.h cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +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 cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
checktype.h Removed integerOverflowOptimization checking and merged functionality into invalidTestForOverflow 2021-01-05 11:38:19 +01:00
checkuninitvar.cpp split "autoNoType" and "bailoutUninitVar" from more generic "debug" (#3209) 2021-04-16 15:19:29 +02:00
checkuninitvar.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
checkunusedfunctions.cpp cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
checkunusedfunctions.h
checkunusedvar.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
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 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
cppcheck.h cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
cppcheck.natvis
cppcheck.vcxproj 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
cppcheck.vcxproj.filters Visual Studio: Added missing file 2021-02-17 21:52:31 +01: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 Report an error if analysis becomes cyclic (#3173) 2021-03-20 14:02:07 +01:00
forwardanalyzer.h cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
importproject.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
importproject.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
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 Refactoring; Reuse simplecpp::characterLiteralToLL 2021-05-02 13:44:37 +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
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 Fix UB on right-shift. (#3235) 2021-04-28 11:57:28 +02:00
programmemory.h cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
reverseanalyzer.cpp Fix issue 10207: FP: derefInvalidIteratorRedundantCheck with ternary operator (#3197) 2021-04-05 11:10: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 astyle formatting 2021-05-01 07:35:03 +02:00
symboldatabase.h Fix issue 10086: false positive: (style) constVariable: Variable 'x' can be declared with const (#3219) 2021-04-30 17:47:08 +02:00
templatesimplifier.cpp fix #10258 (coredump due to (?) template simplification) (#3228) 2021-04-22 22:23:01 +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 Handle c++20 spaceship operator 2021-04-22 19:15:22 +02:00
token.h Fix issue 10086: false positive: (style) constVariable: Variable 'x' can be declared with const (#3219) 2021-04-30 17:47:08 +02:00
tokenize.cpp Fixed #9728 (Support function level try blocks) 2021-05-02 09:05:12 +02:00
tokenize.h Fixed #9728 (Support function level try blocks) 2021-05-02 09:05:12 +02:00
tokenlist.cpp Fixed #9729 (AST broken: lambda with noexcept keyword) (#3243) 2021-05-02 21:34:28 +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
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 astyle formatting 2021-05-01 07:35:03 +02:00
valueflow.h astyle formatting 2021-05-01 07:35:03 +02:00
valueptr.h
version.h 2.4: Set version 2021-03-21 21:25:54 +01:00
version.rc