Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c89f316

Browse files
tamasvajkigfoo
authored andcommitted
Revert PrintAst changes related to wrong locations
1 parent 026ce2a commit c89f316

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

java/ql/lib/semmle/code/java/PrintAst.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ private predicate isNotNeeded(Element el) {
7373
// simply comparing their getLocation() doesn't work as they have distinct but equivalent locations
7474
)
7575
or
76-
exists(Callable c | el = c and c.getSourceDeclaration() != c)
77-
or
7876
isNotNeeded(el.(Expr).getParent*().(Annotation).getAnnotatedElement())
7977
or
8078
isNotNeeded(el.(Parameter).getCallable())
@@ -700,7 +698,7 @@ final class GenericTypeNode extends PrintAstNode, TGenericTypeNode {
700698
final class GenericCallableNode extends PrintAstNode, TGenericCallableNode {
701699
GenericCallable c;
702700

703-
GenericCallableNode() { this = TGenericCallableNode(c) and not isNotNeeded(c) }
701+
GenericCallableNode() { this = TGenericCallableNode(c) }
704702

705703
override string toString() { result = "(Generic Parameters)" }
706704

0 commit comments

Comments
 (0)