Skip to content

Replace isDefined by hasDefinition #236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ where
not init.isCompilerGenerated()
) and
// Must be a defined constructor
c.isDefined() and
c.hasDefinition() and
// Not a compiler-generated constructor
not c.isCompilerGenerated() and
// Not a defaulted constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import codingstandards.cpp.autosar

class CandidateFunction extends Function {
CandidateFunction() {
isDefined() and
hasDefinition() and
isStatic() and
not isMember() and
not (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ where
or
//an non-const object defined in a header
exists(GlobalOrNamespaceVariable object |
object.isDefined() and
object.hasDefinition() and
not (
object.isConstexpr()
or
Expand Down
2 changes: 1 addition & 1 deletion cpp/common/src/codingstandards/cpp/TrivialType.qll
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ predicate hasTrivialMoveConstructor(Class c) {
forall(Class baseClass | baseClass = c.getABaseClass() | hasTrivialMoveConstructor(baseClass)) and
// The class has to be defined, otherwise we may not see the information required to deduce
// whether it does or does not have a trivial move constructor
c.isDefined()
c.hasDefinition()
}

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