File tree 1 file changed +9
-10
lines changed
cpp/common/src/codingstandards/cpp
1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change 5
5
import cpp
6
6
import codingstandards.cpp.Expr
7
7
8
-
9
8
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
+ )
15
16
}
16
17
17
18
/**
@@ -24,10 +25,8 @@ class BaseClass extends Class {
24
25
this .isAbstract ( )
25
26
}
26
27
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 ) }
31
30
}
32
31
33
32
/**
You can’t perform that action at this time.
0 commit comments