cppcheck/test
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
..
bug-hunting some Python cleanups based on PyCharm inspections (#2999) 2021-01-31 14:27:11 +01:00
cfg Fix issue 10208: FP: knownConditionTrueFalse in for loop with function that assigns by ref (#3198) 2021-04-18 21:42:27 +02:00
cli 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
synthetic fixed/excluded some shellcheck warnings and actually fail the build when something is found (#3068) 2021-01-20 18:43:49 +01:00
testsuites Rename test cases, 'verification' was renamed to 'bug hunting' 2020-01-15 21:11:04 +01:00
CMakeLists.txt fix w64-mingw32-ld linking error (#3184) 2021-03-29 17:04:42 +02:00
options.cpp cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
options.h Update Copyright 2019-06-29 07:49:14 +02:00
precompiled.h Update Copyright year 2021-03-21 20:58:32 +01:00
redirect.h Update copyright year 2020-05-10 11:16:32 +02:00
test.cxx
test64bit.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
testassert.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
testastutils.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
testautovariables.cpp Fix issue 10214: FP: danglingTempReference doesn't account for reference lifetime extension (#3220) 2021-04-19 14:20:29 +02:00
testbool.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
testboost.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
testbufferoverrun.cpp #10244: Fixed false negative: bufferAccessOutOfBounds 2021-04-13 16:40:38 +02:00
testbughuntingchecks.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
testcharvar.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
testclangimport.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
testclass.cpp Running astyle [ci skip] 2021-04-09 08:46:47 +02:00
testcmdlineparser.cpp cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
testcondition.cpp Fix issue 10235: Regression: oppositeInnerCondition (#3223) 2021-04-19 09:15:03 +02:00
testconstructors.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
testcppcheck.cpp made check.h less heavy (#2633) 2020-05-23 07:16:49 +02:00
testerrorlogger.cpp astyle formatting 2021-04-22 19:08:24 +02:00
testexceptionsafety.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
testexprengine.cpp cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
testfilelister.cpp Check stat return value in addFiles2 (#3214) 2021-04-18 21:52:14 +02:00
testfunctions.cpp Fix false positive invalidFunctionArg for zero arguments to calloc. (#3238) 2021-05-01 12:39:01 +02:00
testgarbage.cpp Refactoring __attribute__ simplification 2021-05-01 11:39:26 +02:00
testimportproject.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
testincompletestatement.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
testinternal.cpp Update copyright year 2020-05-10 11:16:32 +02:00
testio.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
testleakautovar.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
testlibrary.cpp cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
testmathlib.cpp Refactoring; Reuse simplecpp::characterLiteralToLL 2021-05-02 13:44:37 +02:00
testmemleak.cpp cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
testnullpointer.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
testoptions.cpp Allow multiple test case arguments to testrunner (#1755) 2019-03-26 20:28:40 +01:00
testother.cpp Fix issue 10086: false positive: (style) constVariable: Variable 'x' can be declared with const (#3219) 2021-04-30 17:47:08 +02:00
testpath.cpp Update copyright year 2019-02-09 07:24:06 +01:00
testpathmatch.cpp Update copyright year 2020-05-10 11:16:32 +02:00
testplatform.cpp Update copyright year 2020-05-10 11:16:32 +02:00
testpostfixoperator.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
testpreprocessor.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
testrunner.cpp Update Copyright 2019-06-29 07:49:14 +02:00
testrunner.vcxproj Set language compatibility to C++14 in Visual Studio (#2967) 2020-12-22 10:24:25 +01:00
testrunner.vcxproj.filters Visual Studio; Try to fix compilation 2020-12-20 21:01:45 +01:00
testsamples.cpp Check stat return value in addFiles2 (#3214) 2021-04-18 21:52:14 +02:00
testsimplifytemplate.cpp fix #10258 (coredump due to (?) template simplification) (#3228) 2021-04-22 22:23:01 +02:00
testsimplifytokens.cpp Fixed #9214 (Tests are run on simplified token list) 2021-04-06 21:21:53 +02:00
testsimplifytypedef.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
testsimplifyusing.cpp fix daca2 paraview crash from uninstantiated recursive template (#3237) 2021-04-29 11:09:51 +02:00
testsizeof.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
teststl.cpp Fix issue 10012: False positive: mismatching container, not containers (#3222) 2021-04-19 09:17:02 +02:00
teststring.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
testsuite.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
testsuite.h Update Copyright year 2021-03-21 20:58:32 +01:00
testsummaries.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
testsuppressions.cpp cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
testsymboldatabase.cpp SymbolDatabase; Add variables when structured binding is used 2021-04-26 18:21:07 +02:00
testthreadexecutor.cpp cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
testtimer.cpp Update copyright year 2019-02-09 07:24:06 +01:00
testtoken.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
testtokenize.cpp Fixed #9729 (AST broken: lambda with noexcept keyword) (#3243) 2021-05-02 21:34:28 +02:00
testtokenlist.cpp Fixed Token::isKeyword: Actually set this flag to a reasonable value in all code paths 2020-05-19 13:47:25 +02:00
testtype.cpp Fix UB on right-shift. (#3235) 2021-04-28 11:57:28 +02:00
testuninitvar.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
testunusedfunctions.cpp Refactoring __attribute__ simplification 2021-05-01 11:39:26 +02:00
testunusedprivfunc.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
testunusedvar.cpp Fix varId assignment for uses of variables declared in the if condition (#3231) 2021-04-26 07:38:03 +02:00
testutils.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
testutils.h Update Copyright year 2021-03-21 20:58:32 +01:00
testvaarg.cpp Update Copyright year 2021-03-21 20:58:32 +01:00
testvalueflow.cpp Fix issue 9932: FP: containerOutOfBounds (#3217) 2021-04-18 10:43:38 +02:00
testvarid.cpp Parser; Set varid for structured binding variables 2021-04-26 18:04:27 +02:00