Semmle 1.22
Skip to end of metadata
Go to start of metadata

Finds const methods whose return type is `void`

import cpp

from MemberFunction m
where
  m.hasSpecifier("const") and
  m.getType() instanceof VoidType
select m