Skip to content

Commit 99bf138

Browse files
committed
Replace isDefined by hasDefinition
`isDefined` QLDoc marks the predicate as being deprecated and mentions that `hasDefinition` should be used instead.
1 parent dc310b9 commit 99bf138

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

cpp/autosar/src/rules/A12-1-1/ExplicitConstructorBaseClassInitialization.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ where
3535
not init.isCompilerGenerated()
3636
) and
3737
// Must be a defined constructor
38-
c.isDefined() and
38+
c.hasDefinition() and
3939
// Not a compiler-generated constructor
4040
not c.isCompilerGenerated() and
4141
// Not a defaulted constructor

cpp/autosar/src/rules/A2-10-4/IdentifierNameOfStaticFunctionReusedInNamespace.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import codingstandards.cpp.autosar
1717

1818
class CandidateFunction extends Function {
1919
CandidateFunction() {
20-
isDefined() and
20+
hasDefinition() and
2121
isStatic() and
2222
not isMember() and
2323
not (

cpp/autosar/src/rules/A3-1-1/ViolationsOfOneDefinitionRule.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ where
6565
or
6666
//an non-const object defined in a header
6767
exists(GlobalOrNamespaceVariable object |
68-
object.isDefined() and
68+
object.hasDefinition() and
6969
not (
7070
object.isConstexpr()
7171
or

cpp/common/src/codingstandards/cpp/TrivialType.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ predicate hasTrivialMoveConstructor(Class c) {
4848
forall(Class baseClass | baseClass = c.getABaseClass() | hasTrivialMoveConstructor(baseClass)) and
4949
// The class has to be defined, otherwise we may not see the information required to deduce
5050
// whether it does or does not have a trivial move constructor
51-
c.isDefined()
51+
c.hasDefinition()
5252
}
5353

5454
/** A trivial copy or move constructor (see [class.copy]/12). */

0 commit comments

Comments
 (0)