use of org.eclipse.n4js.flowgraphs.dataflow.Assumption in project n4js by eclipse.
the class NullDereferenceAnalyser method getNullDereferences.
/**
* @return a list of all AST locations where a null pointer dereference can happen
*/
public Iterable<NullDereferenceResult> getNullDereferences() {
Set<NullDereferenceResult> nullDerefs = new HashSet<>();
for (Assumption ass : failedAssumptions.values()) {
IsNotNull inn = (IsNotNull) ass;
ControlFlowElement astLocation = inn.creationSite;
NullDereferenceResult ndr = new NullDereferenceResult(astLocation, inn);
nullDerefs.add(ndr);
}
return nullDerefs;
}
use of org.eclipse.n4js.flowgraphs.dataflow.Assumption in project n4js by eclipse.
the class UsedBeforeDeclaredAnalyserOnDataflow method getUsedButNotDeclaredIdentifierRefs.
/**
* @return all {@link IdentifierRef}s that are used before declared
*/
public List<ControlFlowElement> getUsedButNotDeclaredIdentifierRefs() {
List<ControlFlowElement> idRefs = new LinkedList<>();
for (Assumption ass : failedAssumptions.values()) {
for (PartialResult result : ass.failedBranches) {
UsedBeforeFailed ubf = (UsedBeforeFailed) result;
idRefs.add(ubf.useLocation);
}
}
return idRefs;
}
Aggregations