Description of the issue
The name of the predicate Expr.isParenthesized() suggests that parentheses are considered part of the expression (a name like isEnclosedInParentheses or similar would suggest the opposite).
However, it appears Expr.getLocation does not consider parentheses to be part of the expression.
Example query:
import java
string locationToString(Location l) {
result = l.getStartLine() + "[" + l.getStartColumn() + "]-"
+ l.getEndLine() + "[" + l.getEndColumn() + "]"
}
from Expr e
where
e.isParenthesized()
select e, locationToString(e.getLocation())
Query console
It would therefore be good to clarify this in the Expr.getLocation documentation.