File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed
cpp/common/src/codingstandards/cpp Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change 55import cpp
66import codingstandards.cpp.Expr
77
8-
98private 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/**
You can’t perform that action at this time.
0 commit comments