mirror of
https://github.com/github/codeql.git
synced 2026-05-03 12:45:27 +02:00
C++: Don't generate WriteSideEffect instructions for const parameter indirections.
This commit is contained in:
@@ -658,14 +658,18 @@ newtype TTranslatedElement =
|
||||
t instanceof ReferenceType
|
||||
) and
|
||||
(
|
||||
isWrite = true or
|
||||
isWrite = true and
|
||||
not call.getTarget().getParameter(n).getType().isDeeplyConstBelow()
|
||||
or
|
||||
isWrite = false
|
||||
)
|
||||
or
|
||||
not call.getTarget() instanceof SideEffectFunction and
|
||||
n = -1 and
|
||||
(
|
||||
isWrite = true or
|
||||
isWrite = true and
|
||||
not call.getTarget() instanceof ConstMemberFunction
|
||||
or
|
||||
isWrite = false
|
||||
)
|
||||
) and
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user