mirror of
https://github.com/github/codeql.git
synced 2026-03-26 09:18:16 +01:00
Remove empty annotations node from PrintAST
This commit is contained in:
committed by
Chris Smowton
parent
3b09cb2224
commit
b5ae43a887
@@ -120,7 +120,12 @@ private newtype TPrintAstNode =
|
||||
shouldPrint(lvde, _) and lvde.getParent() instanceof SingleLocalVarDeclParent
|
||||
} or
|
||||
TAnnotationsNode(Annotatable ann) {
|
||||
shouldPrint(ann, _) and ann.hasDeclaredAnnotation() and not partOfAnnotation(ann)
|
||||
shouldPrint(ann, _) and
|
||||
ann.hasDeclaredAnnotation() and
|
||||
not partOfAnnotation(ann) and
|
||||
// The Kotlin compiler might add annotations that are only present in byte code, although the annotatable element is
|
||||
// present in source code.
|
||||
exists(Annotation a | a.getAnnotatedElement() = ann and shouldPrint(a, _))
|
||||
} or
|
||||
TParametersNode(Callable c) { shouldPrint(c, _) and not c.hasNoParameters() } or
|
||||
TBaseTypesNode(ClassOrInterface ty) { shouldPrint(ty, _) } or
|
||||
|
||||
Reference in New Issue
Block a user