-
Notifications
You must be signed in to change notification settings - Fork 69
Closed as duplicate of#789
Labels
Difficulty-MediumA false positive or false negative report which is expected to take 1-5 days effort to addressA false positive or false negative report which is expected to take 1-5 days effort to addressImpact-MediumStandard-AUTOSARfalse positive/false negativeAn issue related to observed false positives or false negatives.An issue related to observed false positives or false negatives.
Description
Affected rules
- A7-1-2
Description
False positive reported for the following test case. In the example, below, a712 must be constexpr for value to be declared constexpr. However, it is not possible to declare parameters (easily) as constexpr. The mitigation for this issue is likely that cases where it is not possible to declare the qualifier as constexpr.
Example
class A7_1_2 {
public:
constexpr auto GetValue() const noexcept { return value_; }
void SetValue(int32_t value) noexcept { value_ = value; }
private:
int32_t value_;
};
std::ostream &operator<<(std::ostream &os, const A7_1_2 a712) noexcept {
const auto value = a712.GetValue(); // Variable value could be marked 'constexpr'.
os << value;
return os;
}Metadata
Metadata
Assignees
Labels
Difficulty-MediumA false positive or false negative report which is expected to take 1-5 days effort to addressA false positive or false negative report which is expected to take 1-5 days effort to addressImpact-MediumStandard-AUTOSARfalse positive/false negativeAn issue related to observed false positives or false negatives.An issue related to observed false positives or false negatives.
Type
Projects
Status
Done