use of com.intellij.codeInspection.dataFlow.value.DfaValue in project intellij-community by JetBrains.
the class EqClass method getMemberValues.
List<DfaValue> getMemberValues() {
final List<DfaValue> result = new ArrayList<>(size());
forEach(new TIntProcedure() {
@Override
public boolean execute(int c1) {
DfaValue value = myFactory.getValue(c1);
result.add(value);
return true;
}
});
return result;
}
use of com.intellij.codeInspection.dataFlow.value.DfaValue in project intellij-community by JetBrains.
the class DataFlowInspectionBase method reportConstantPushes.
private void reportConstantPushes(StandardDataFlowRunner runner, ProblemsHolder holder, DataFlowInstructionVisitor visitor, Set<PsiElement> reportedAnchors) {
for (Instruction instruction : runner.getInstructions()) {
if (instruction instanceof PushInstruction) {
PsiExpression place = ((PushInstruction) instruction).getPlace();
DfaValue value = ((PushInstruction) instruction).getValue();
Object constant = value instanceof DfaConstValue ? ((DfaConstValue) value).getValue() : null;
if (place instanceof PsiPolyadicExpression && constant instanceof Boolean && !isFlagCheck(place) && reportedAnchors.add(place)) {
reportConstantCondition(holder, visitor, place, (Boolean) constant);
}
}
}
}
Aggregations