File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 3131 // Not compiler generated
3232 not f .isCompilerGenerated ( ) and
3333 // The function is defined in this database
34- f .hasDefinition ( )
34+ f .hasDefinition ( ) and
35+ // This function is not an overriden call operator of lambda expression
36+ not exists ( LambdaExpression lambda | lambda .getLambdaFunction ( ) = f )
3537select f , "Function " + f .getName ( ) + " could be declared noexcept(true)."
Original file line number Diff line number Diff line change @@ -24,4 +24,10 @@ void test_indirect_throw() { // COMPLIANT - throws an exception indirectly
2424class A {
2525public:
2626 A () = delete ; // COMPLIANT - deleted functions imply `noexcept(true)`.
27- };
27+ };
28+
29+ /* Added for testing FP of embedded operator inside lambdas being reported */
30+ void lambda_example () noexcept {
31+ auto with_capture = [=]() {};
32+ auto empty_capture = []() {};
33+ }
You can’t perform that action at this time.
0 commit comments