Skip to content

Commit e563637

Browse files
authored
Merge branch 'main' into lcartey/scope-performance-fix
2 parents c56e1ce + 16bfd28 commit e563637

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- `M5-0-3`, `M5-0-7`, `M5-0-8`, `M5-0-9` - `CvalueExpressionConvertedToDifferentUnderlyingType.ql`, `ExplicitFloatingIntegralConversionOfACValueExpr.ql`, `ExplicitWideningConversionOfACValueExpr.ql`, `ExplicitSignedness.ql`:
2+
- Reduce false positives from misidentifying an explicitly casted expression used as a function argument or return value as a `cvalue`.

cpp/common/test/rules/validcontainerelementaccess/test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,14 @@ void f8(const int *ar) {
9696
void f9(const std::string &s, std::string &str) {
9797
std::string::iterator loc = str.begin();
9898
for (auto i = s.begin(), e = s.end(); i != e; ++i, ++loc) { // NON_COMPLIANT
99-
str.insert(loc, 'c'); // NON_COMPLIANT[FALSE POSITIVE for str]
99+
str.insert(loc, 'c'); // NON_COMPLIANT
100100
}
101101
}
102102

103103
void f10(const std::string &s, std::string &str) {
104104
std::string::iterator loc = str.begin();
105105
for (auto i = s.begin(), e = s.end(); i != e; ++i, ++loc) { // COMPLIANT
106-
loc = str.insert(loc, 'c'); // COMPLIANT[FALSE POSITIVE]
106+
loc = str.insert(loc, 'c'); // COMPLIANT
107107
}
108108
}
109109

0 commit comments

Comments
 (0)