@@ -23,12 +23,16 @@ predicate isInvalidConstructor(Constructor f, string constructorType, string mis
23
23
f instanceof MoveConstructor and
24
24
if f .isCompilerGenerated ( )
25
25
then constructorType = "Implicit move constructor" and missingAction = "deleted"
26
- else ( constructorType = "Move constructor" and missingAction = "protected" )
26
+ else (
27
+ constructorType = "Move constructor" and missingAction = "protected"
28
+ )
27
29
or
28
30
f instanceof CopyConstructor and
29
31
if f .isCompilerGenerated ( )
30
32
then constructorType = "Implicit copy constructor" and missingAction = "deleted"
31
- else ( constructorType = "Copy constructor" and missingAction = "protected" )
33
+ else (
34
+ constructorType = "Copy constructor" and missingAction = "protected"
35
+ )
32
36
)
33
37
}
34
38
@@ -38,12 +42,16 @@ predicate isInvalidAssignment(Operator f, string operatorType, string missingAct
38
42
f instanceof MoveAssignmentOperator and
39
43
if f .isCompilerGenerated ( )
40
44
then operatorType = "Implicit move assignment operator" and missingAction = "deleted"
41
- else ( operatorType = "Move assignment operator" and missingAction = "protected" )
45
+ else (
46
+ operatorType = "Move assignment operator" and missingAction = "protected"
47
+ )
42
48
or
43
49
f instanceof CopyAssignmentOperator and
44
50
if f .isCompilerGenerated ( )
45
51
then operatorType = "Implicit copy assignment operator" and missingAction = "deleted"
46
- else ( operatorType = "Copy assignment operator" and missingAction = "protected" )
52
+ else (
53
+ operatorType = "Copy assignment operator" and missingAction = "protected"
54
+ )
47
55
) and
48
56
not f .hasSpecifier ( "protected" )
49
57
}
60
68
// To avoid duplicate alerts due to inaccurate location information in the database we don't use the location of the base class.
61
69
// This for example happens if multiple copies of the same header file are present in the database.
62
70
select getDeclarationEntryInClassDeclaration ( mf ) ,
63
- type + " for base class '" + baseClass .getQualifiedName ( ) +
64
- "' is not declared " + missingAction + " ."
71
+ type + " for base class '" + baseClass .getQualifiedName ( ) + "' is not declared " + missingAction +
72
+ "."
0 commit comments