| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 15c90ad commit d36c66c
29 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -237,7 +237,7 @@ class Class extends UserType { | |||
| 237 | 237 | exists(ClassDerivation cd | cd.getBaseClass() = base | | |
| 238 | 238 | result = | |
| 239 | 239 | this.accessOfBaseMemberMulti(cd.getDerivedClass(), | |
| 240 | - fieldInBase.accessInDirectDerived(cd.getASpecifier().(AccessSpecifier))) | ||
| 240 | + fieldInBase.accessInDirectDerived(cd.getASpecifier())) | ||
| 241 | 241 | ) | |
| 242 | 242 | } | |
| 243 | 243 | ||
@@ -261,8 +261,7 @@ class Class extends UserType { | |||
| 261 | 261 | * includes the case of `base` = `this`. | |
| 262 | 262 | */ | |
| 263 | 263 | AccessSpecifier accessOfBaseMember(Declaration member) { | |
| 264 | - result = | ||
| 265 | - this.accessOfBaseMember(member.getDeclaringType(), member.getASpecifier().(AccessSpecifier)) | ||
| 264 | + result = this.accessOfBaseMember(member.getDeclaringType(), member.getASpecifier()) | ||
| 266 | 265 | } | |
| 267 | 266 | ||
| 268 | 267 | /** | |
@@ -319,7 +318,7 @@ class Class extends UserType { | |||
| 319 | 318 | exists(Type t | t = this.getAFieldSubobjectType().getUnspecifiedType() | | |
| 320 | 319 | // Note: Overload resolution is not implemented -- all copy | |
| 321 | 320 | // constructors are considered equal. | |
| 322 | - this.cannotAccessCopyConstructorOnAny(t.(Class)) | ||
| 321 | + this.cannotAccessCopyConstructorOnAny(t) | ||
| 323 | 322 | ) | |
| 324 | 323 | or | |
| 325 | 324 | // - T has direct or virtual base class that cannot be copied (has deleted, | |
@@ -392,7 +391,7 @@ class Class extends UserType { | |||
| 392 | 391 | exists(Type t | t = this.getAFieldSubobjectType().getUnspecifiedType() | | |
| 393 | 392 | // Note: Overload resolution is not implemented -- all copy assignment | |
| 394 | 393 | // operators are considered equal. | |
| 395 | - this.cannotAccessCopyAssignmentOperatorOnAny(t.(Class)) | ||
| 394 | + this.cannotAccessCopyAssignmentOperatorOnAny(t) | ||
| 396 | 395 | ) | |
| 397 | 396 | or | |
| 398 | 397 | exists(Class c | c = this.getADirectOrVirtualBase() | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -490,8 +490,7 @@ class AccessHolder extends Declaration, TAccessHolder { | |||
| 490 | 490 | */ | |
| 491 | 491 | pragma[inline] | |
| 492 | 492 | predicate canAccessMember(Declaration member, Class derived) { | |
| 493 | - this.couldAccessMember(member.getDeclaringType(), member.getASpecifier().(AccessSpecifier), | ||
| 494 | - derived) | ||
| 493 | + this.couldAccessMember(member.getDeclaringType(), member.getASpecifier(), derived) | ||
| 495 | 494 | } | |
| 496 | 495 | ||
| 497 | 496 | /** | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -307,7 +307,7 @@ private predicate dependsOnFull(DependsSource src, Symbol dest, int category) { | |||
| 307 | 307 | // dependency from a Variable / Function use -> non-visible definition (link time) | |
| 308 | 308 | dependsOnTransitive(src, mid) and | |
| 309 | 309 | not mid instanceof EnumConstant and | |
| 310 | - getDeclarationEntries(mid, dest.(DeclarationEntry)) and | ||
| 310 | + getDeclarationEntries(mid, dest) and | ||
| 311 | 311 | not dest instanceof TypeDeclarationEntry and | |
| 312 | 312 | // must be definition | |
| 313 | 313 | dest.(DeclarationEntry).isDefinition() and | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,7 +25,7 @@ predicate definitionUsePair(SemanticStackVariable var, Expr def, Expr use) { | |||
| 25 | 25 | * Holds if the definition `def` of some stack variable can reach `node`, which | |
| 26 | 26 | * is a definition or use, without crossing definitions of the same variable. | |
| 27 | 27 | */ | |
| 28 | - predicate definitionReaches(Expr def, Expr node) { def.(Def).reaches(true, _, node.(DefOrUse)) } | ||
| 28 | + predicate definitionReaches(Expr def, Expr node) { def.(Def).reaches(true, _, node) } | ||
| 29 | 29 | ||
| 30 | 30 | private predicate hasAddressOfAccess(SemanticStackVariable var) { | |
| 31 | 31 | var.getAnAccess().isAddressOfAccessNonConst() | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -62,7 +62,7 @@ class SsaDefinition extends ControlFlowNodeBase { | |||
| 62 | 62 | BasicBlock getBasicBlock() { result.contains(this.getDefinition()) } | |
| 63 | 63 | ||
| 64 | 64 | /** Holds if this definition is a phi node for variable `v`. */ | |
| 65 | - predicate isPhiNode(StackVariable v) { exists(StandardSSA x | x.phi_node(v, this.(BasicBlock))) } | ||
| 65 | + predicate isPhiNode(StackVariable v) { exists(StandardSSA x | x.phi_node(v, this)) } | ||
| 66 | 66 | ||
| 67 | 67 | /** Gets the location of this definition. */ | |
| 68 | 68 | Location getLocation() { result = this.(ControlFlowNode).getLocation() } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -292,7 +292,7 @@ library class SSAHelper extends int { | |||
| 292 | 292 | */ | |
| 293 | 293 | cached | |
| 294 | 294 | string toString(ControlFlowNode node, StackVariable v) { | |
| 295 | - if phi_node(v, node.(BasicBlock)) | ||
| 295 | + if phi_node(v, node) | ||
| 296 | 296 | then result = "SSA phi(" + v.getName() + ")" | |
| 297 | 297 | else ( | |
| 298 | 298 | ssa_defn(v, node, _, _) and result = "SSA def(" + v.getName() + ")" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -484,7 +484,7 @@ library class ExprEvaluator extends int { | |||
| 484 | 484 | this.interestingInternal(e, req, true) and | |
| 485 | 485 | ( | |
| 486 | 486 | result = req.(CompileTimeConstantInt).getIntValue() or | |
| 487 | - result = this.getCompoundValue(e, req.(CompileTimeVariableExpr)) | ||
| 487 | + result = this.getCompoundValue(e, req) | ||
| 488 | 488 | ) and | |
| 489 | 489 | ( | |
| 490 | 490 | req.getUnderlyingType().(IntegralType).isSigned() or | |
@@ -611,7 +611,7 @@ library class ExprEvaluator extends int { | |||
| 611 | 611 | or | |
| 612 | 612 | exists(AssignExpr req | req = val | result = this.getValueInternal(e, req.getRValue())) | |
| 613 | 613 | or | |
| 614 | - result = this.getVariableValue(e, val.(VariableAccess)) | ||
| 614 | + result = this.getVariableValue(e, val) | ||
| 615 | 615 | or | |
| 616 | 616 | exists(FunctionCall call | call = val and not callWithMultipleTargets(call) | | |
| 617 | 617 | result = this.getFunctionValue(call.getTarget()) | |
@@ -663,7 +663,7 @@ library class ExprEvaluator extends int { | |||
| 663 | 663 | this.interestingInternal(_, req, false) and | |
| 664 | 664 | ( | |
| 665 | 665 | result = req.(CompileTimeConstantInt).getIntValue() or | |
| 666 | - result = this.getCompoundValueNonSubExpr(req.(CompileTimeVariableExpr)) | ||
| 666 | + result = this.getCompoundValueNonSubExpr(req) | ||
| 667 | 667 | ) and | |
| 668 | 668 | ( | |
| 669 | 669 | req.getUnderlyingType().(IntegralType).isSigned() or | |
@@ -787,7 +787,7 @@ library class ExprEvaluator extends int { | |||
| 787 | 787 | or | |
| 788 | 788 | exists(AssignExpr req | req = val | result = this.getValueInternalNonSubExpr(req.getRValue())) | |
| 789 | 789 | or | |
| 790 | - result = this.getVariableValueNonSubExpr(val.(VariableAccess)) | ||
| 790 | + result = this.getVariableValueNonSubExpr(val) | ||
| 791 | 791 | or | |
| 792 | 792 | exists(FunctionCall call | call = val and not callWithMultipleTargets(call) | | |
| 793 | 793 | result = this.getFunctionValue(call.getTarget()) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1305,9 +1305,9 @@ class TranslatedBinaryOperation extends TranslatedSingleInstructionExpr { | |||
| 1305 | 1305 | } | |
| 1306 | 1306 | ||
| 1307 | 1307 | override Opcode getOpcode() { | |
| 1308 | - result = binaryArithmeticOpcode(expr.(BinaryArithmeticOperation)) or | ||
| 1309 | - result = binaryBitwiseOpcode(expr.(BinaryBitwiseOperation)) or | ||
| 1310 | - result = comparisonOpcode(expr.(ComparisonOperation)) | ||
| 1308 | + result = binaryArithmeticOpcode(expr) or | ||
| 1309 | + result = binaryBitwiseOpcode(expr) or | ||
| 1310 | + result = comparisonOpcode(expr) | ||
| 1311 | 1311 | } | |
| 1312 | 1312 | ||
| 1313 | 1313 | override int getInstructionElementSize(InstructionTag tag) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -88,7 +88,7 @@ abstract class Architecture extends string { | |||
| 88 | 88 | or | |
| 89 | 89 | t instanceof LongLongType and result = this.longLongSize() | |
| 90 | 90 | or | |
| 91 | - result = this.enumBitSize(t.(Enum)) | ||
| 91 | + result = this.enumBitSize(t) | ||
| 92 | 92 | or | |
| 93 | 93 | result = this.integralBitSize(t.(SpecifiedType).getBaseType()) | |
| 94 | 94 | or | |
@@ -183,7 +183,7 @@ abstract class Architecture extends string { | |||
| 183 | 183 | or | |
| 184 | 184 | t instanceof ReferenceType and result = this.pointerSize() | |
| 185 | 185 | or | |
| 186 | - result = this.enumAlignment(t.(Enum)) | ||
| 186 | + result = this.enumAlignment(t) | ||
| 187 | 187 | or | |
| 188 | 188 | result = this.alignment(t.(SpecifiedType).getBaseType()) | |
| 189 | 189 | or | |
@@ -232,14 +232,14 @@ private Field getAnInitialField(PaddedType t) { | |||
| 232 | 232 | result = t.getAField() | |
| 233 | 233 | or | |
| 234 | 234 | // Initial field of the type of a field of the union | |
| 235 | - result = getAnInitialField(t.getAField().getUnspecifiedType().(PaddedType)) | ||
| 235 | + result = getAnInitialField(t.getAField().getUnspecifiedType()) | ||
| 236 | 236 | else | |
| 237 | 237 | exists(Field firstField | t.fieldIndex(firstField) = 1 | | |
| 238 | 238 | // The first field of `t` | |
| 239 | 239 | result = firstField | |
| 240 | 240 | or | |
| 241 | 241 | // Initial field of the first field of `t` | |
| 242 | - result = getAnInitialField(firstField.getUnspecifiedType().(PaddedType)) | ||
| 242 | + result = getAnInitialField(firstField.getUnspecifiedType()) | ||
| 243 | 243 | ) | |
| 244 | 244 | } | |
| 245 | 245 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -91,7 +91,7 @@ class RangeSsaDefinition extends ControlFlowNodeBase { | |||
| 91 | 91 | BasicBlock getBasicBlock() { result.contains(this.getDefinition()) } | |
| 92 | 92 | ||
| 93 | 93 | /** Whether this definition is a phi node for variable `v`. */ | |
| 94 | - predicate isPhiNode(StackVariable v) { exists(RangeSSA x | x.phi_node(v, this.(BasicBlock))) } | ||
| 94 | + predicate isPhiNode(StackVariable v) { exists(RangeSSA x | x.phi_node(v, this)) } | ||
| 95 | 95 | ||
| 96 | 96 | /** | |
| 97 | 97 | * DEPRECATED: Use isGuardPhi/4 instead | |
| Back | FazBrowse Home | New Git URL |
0 commit comments