Skip to content

Commit de82e22

Browse files
committed
Format module
1 parent 5c411fe commit de82e22

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

cpp/common/src/codingstandards/cpp/Class.qll

+9-10
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
import cpp
66
import codingstandards.cpp.Expr
77

8-
98
private Class getADerivedClass(Class c) {
10-
not c instanceof ClassTemplateInstantiation and not c instanceof TemplateClass and result = c.getADerivedClass()
11-
or
12-
exists(ClassTemplateInstantiation instantiation |
13-
instantiation.getADerivedClass() = result and c = instantiation.getTemplate()
14-
)
9+
not c instanceof ClassTemplateInstantiation and
10+
not c instanceof TemplateClass and
11+
result = c.getADerivedClass()
12+
or
13+
exists(ClassTemplateInstantiation instantiation |
14+
instantiation.getADerivedClass() = result and c = instantiation.getTemplate()
15+
)
1516
}
1617

1718
/**
@@ -24,10 +25,8 @@ class BaseClass extends Class {
2425
this.isAbstract()
2526
}
2627

27-
// We don't override `getADerivedClass` because that introduces a non-monotonic recursion.
28-
Class getASubClass() {
29-
result = getADerivedClass(this)
30-
}
28+
// We don't override `getADerivedClass` because that introduces a non-monotonic recursion.
29+
Class getASubClass() { result = getADerivedClass(this) }
3130
}
3231

3332
/**

0 commit comments

Comments
 (0)