Apply suggestions from code review

Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
This commit is contained in:
Mathew Payne
2023-07-12 17:11:40 +01:00
committed by GitHub
parent 3a1e3f71cc
commit 18db525d18

View File

@@ -35,13 +35,10 @@ module GoMicro {
*/
class ProtocMessageType extends Type {
ProtocMessageType() {
exists(TypeEntity te |
te.getType() = this and
te.getDeclaration().getLocation().getFile() instanceof ProtocGeneratedFile and
exists(MethodDecl md |
md.getName() = "ProtoMessage" and
this = md.getReceiverType().(PointerType).getBaseType()
)
this.hasLocationInfo(any(ProtocGeneratedFile f).getAbsolutePath(), _, _, _, _) and
exists(MethodDecl md |
md.getName() = "ProtoMessage" and
this = md.getReceiverDecl().getTypeExpr().getAChild().(TypeName).getType()
)
}