mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
C++: Fix FP and accept test changes.
This commit is contained in:
@@ -30,6 +30,7 @@ where
|
||||
outlivesFullExpr(c) and
|
||||
not c.isFromUninstantiatedTemplate(_) and
|
||||
isUniquePointerDerefFunction(c.getTarget()) and
|
||||
not c.getActualType() instanceof BoolType and
|
||||
isTemporary(c.getQualifier().getFullyConverted())
|
||||
select c,
|
||||
"The underlying unique pointer object is destroyed after the call to '" + c.getTarget() +
|
||||
|
||||
@@ -9,4 +9,3 @@
|
||||
| test.cpp:177:16:177:16 | call to operator* | The underlying unique pointer object is destroyed after the call to 'operator*' returns. |
|
||||
| test.cpp:177:36:177:36 | call to operator* | The underlying unique pointer object is destroyed after the call to 'operator*' returns. |
|
||||
| test.cpp:179:11:179:11 | call to operator* | The underlying unique pointer object is destroyed after the call to 'operator*' returns. |
|
||||
| test.cpp:209:29:209:31 | call to get | The underlying unique pointer object is destroyed after the call to 'get' returns. |
|
||||
|
||||
@@ -206,7 +206,7 @@ void test2(bool b1, bool b2) {
|
||||
}
|
||||
|
||||
void test_convert_to_bool() {
|
||||
bool b = get_unique_ptr().get(); // GOOD [FALSE POSITIVE]
|
||||
bool b = get_unique_ptr().get(); // GOOD
|
||||
|
||||
if(get_unique_ptr().get()) { // GOOD
|
||||
|
||||
|
||||
Reference in New Issue
Block a user