mirror of
https://github.com/github/codeql.git
synced 2026-04-23 07:45:17 +02:00
C++: Fix more inconsistencies (and delete unnecessary override).
This commit is contained in:
@@ -92,7 +92,11 @@ class StdSequenceContainerPush extends MemberFunction, SideEffectFunction, Alias
|
||||
}
|
||||
|
||||
override predicate hasSpecificReadSideEffect(ParameterIndex i, boolean buffer) {
|
||||
i = 0 and buffer = false
|
||||
// the `std::vector<bool>` specialization doesn't take a reference as a
|
||||
// parameter. So we need to check that the parameter is actually a
|
||||
// reference.
|
||||
this.getParameter(i).getUnspecifiedType() instanceof ReferenceType and
|
||||
buffer = false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -471,8 +475,6 @@ private class InitializerListConstructor extends Constructor, SideEffectFunction
|
||||
override predicate hasSpecificWriteSideEffect(ParameterIndex i, boolean buffer, boolean mustWrite) {
|
||||
i = -1 and buffer = false and mustWrite = true
|
||||
}
|
||||
|
||||
override predicate hasSpecificReadSideEffect(ParameterIndex i, boolean buffer) { none() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user