mirror of
https://github.com/github/codeql.git
synced 2026-05-02 04:05:14 +02:00
C++: Exclude operator= in ExprHasNoEffect
This commit is contained in:
@@ -27,9 +27,6 @@
|
||||
| test.c:27:9:27:10 | 33 | This expression has no effect. | test.c:27:9:27:10 | 33 | |
|
||||
| test.cpp:24:3:24:3 | call to operator++ | This expression has no effect (because $@ has no external side effects). | test.cpp:9:14:9:23 | operator++ | operator++ |
|
||||
| test.cpp:25:3:25:3 | call to operator++ | This expression has no effect (because $@ has no external side effects). | test.cpp:9:14:9:23 | operator++ | operator++ |
|
||||
| test.cpp:62:5:62:5 | call to operator= | This expression has no effect (because $@ has no external side effects). | test.cpp:47:14:47:22 | operator= | operator= |
|
||||
| test.cpp:65:5:65:5 | call to operator= | This expression has no effect (because $@ has no external side effects). | test.cpp:55:7:55:7 | operator= | operator= |
|
||||
| test.cpp:91:5:91:19 | call to operator= | This expression has no effect (because $@ has no external side effects). | test.cpp:77:9:77:17 | operator= | operator= |
|
||||
| volatile.c:9:5:9:5 | c | This expression has no effect. | volatile.c:9:5:9:5 | c | |
|
||||
| volatile.c:12:5:12:9 | access to array | This expression has no effect. | volatile.c:12:5:12:9 | access to array | |
|
||||
| volatile.c:16:5:16:7 | * ... | This expression has no effect. | volatile.c:16:5:16:7 | * ... | |
|
||||
|
||||
@@ -88,7 +88,7 @@ struct Derived : Base {
|
||||
}
|
||||
|
||||
// In case base class has data, now or in the future, copy that first.
|
||||
Base::operator=(rhs); // GOOD [FALSE POSITIVE]
|
||||
Base::operator=(rhs); // GOOD
|
||||
|
||||
this->m_x = rhs.m_x;
|
||||
return *this;
|
||||
|
||||
Reference in New Issue
Block a user