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 31
31
// Not compiler generated
32
32
not f .isCompilerGenerated ( ) and
33
33
// 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 )
35
37
select 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
24
24
class A {
25
25
public:
26
26
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