A15-4-2
: Ignore elided calls when calculating the exception graph
#158
Labels
Difficulty-Medium
A false positive or false negative report which is expected to take 1-5 days effort to address
false positive/false negative
An issue related to observed false positives or false negatives.
Impact-High
Standard-AUTOSAR
top-25-fps
user-report
Issue reported by an end user of CodeQL Coding Standards
Affected rules
A15-4-2
Description
Copy elision allows the compiler to omit copy and move construction in certain circumstances. Some of these circumstances are considered "mandatory" - i.e. the compiler must omit the explicit construction - and in those circumstances copy and move constructors may never be called.
If you have move/copy constructors which are never expected to be called because they are always elided, you may decide to throw an exception from the copy/move constructor to enforce that it is only used in circumstances where the elision occurs. As our call graph does not currently reflect the mandatory elision of functions, this can cause false positives.
Example
The text was updated successfully, but these errors were encountered: