@@ -23,12 +23,16 @@ predicate isInvalidConstructor(Constructor f, string constructorType, string mis
2323 f instanceof MoveConstructor and
2424 if f .isCompilerGenerated ( )
2525 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+ )
2729 or
2830 f instanceof CopyConstructor and
2931 if f .isCompilerGenerated ( )
3032 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+ )
3236 )
3337}
3438
@@ -38,12 +42,16 @@ predicate isInvalidAssignment(Operator f, string operatorType, string missingAct
3842 f instanceof MoveAssignmentOperator and
3943 if f .isCompilerGenerated ( )
4044 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+ )
4248 or
4349 f instanceof CopyAssignmentOperator and
4450 if f .isCompilerGenerated ( )
4551 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+ )
4755 ) and
4856 not f .hasSpecifier ( "protected" )
4957}
6068// To avoid duplicate alerts due to inaccurate location information in the database we don't use the location of the base class.
6169// This for example happens if multiple copies of the same header file are present in the database.
6270select 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