-
Notifications
You must be signed in to change notification settings - Fork 68
Closed
Labels
Difficulty-LowA false positive or false negative report which is expected to take <1 day effort to addressA false positive or false negative report which is expected to take <1 day effort to addressImpact-Mediumfalse positive/false negativeAn issue related to observed false positives or false negatives.An issue related to observed false positives or false negatives.user-reportIssue reported by an end user of CodeQL Coding StandardsIssue reported by an end user of CodeQL Coding Standards
Description
Affected rules
A15-4-4
Description
The exceptions library makes a conservative assumption about which functions will throw which exceptions. However, for this query that leads to false positives where an externally defined function is known to throw in certain circumstances, but this is not captured in the throw specification for the function.
Example
This function is erroneously identified as a candidate for noexcept
even though append
could throw an out_of_range
error.
std::string concat(const std::string& s1, const std::string& s2) {
std::string s3;
s3.reserve(s1.size() +s2.size());
s3.append(s1.c_str(), s1.size())
s3.append(s2.c_str(), s2.size()));
return s3;
}```
Metadata
Metadata
Assignees
Labels
Difficulty-LowA false positive or false negative report which is expected to take <1 day effort to addressA false positive or false negative report which is expected to take <1 day effort to addressImpact-Mediumfalse positive/false negativeAn issue related to observed false positives or false negatives.An issue related to observed false positives or false negatives.user-reportIssue reported by an end user of CodeQL Coding StandardsIssue reported by an end user of CodeQL Coding Standards
Type
Projects
Status
Done