Skip to content

Commit

Permalink
Fix query formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
fjatWbyT committed Oct 31, 2024
1 parent 61d4ba3 commit 98c7610
Showing 1 changed file with 21 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,28 @@ import codingstandards.cpp.autosar
class UniqueLineStmt extends Locatable {
UniqueLineStmt() {
not isAffectedByMacro() and
(exists(Declaration d |
this = d.getADeclarationEntry() and
not d instanceof Parameter and
not d instanceof TemplateParameter and
// TODO - Needs to be enhanced to solve issues with
// templated inner classes.
not d instanceof Function and
not d.isFromTemplateInstantiation(_) and
not d.(Variable).isCompilerGenerated() and
not exists(RangeBasedForStmt f | f.getADeclaration() = d) and
not exists(DeclStmt declStmt, ForStmt f |
f.getInitialization() = declStmt and
declStmt.getADeclaration() = d
) and
not exists(LambdaCapture lc | lc.getField().getADeclarationEntry() = this)
(
exists(Declaration d |
this = d.getADeclarationEntry() and
not d instanceof Parameter and
not d instanceof TemplateParameter and
// TODO - Needs to be enhanced to solve issues with
// templated inner classes.
not d instanceof Function and
not d.isFromTemplateInstantiation(_) and
not d.(Variable).isCompilerGenerated() and
not exists(RangeBasedForStmt f | f.getADeclaration() = d) and
not exists(DeclStmt declStmt, ForStmt f |
f.getInitialization() = declStmt and
declStmt.getADeclaration() = d
) and
not exists(LambdaCapture lc | lc.getField().getADeclarationEntry() = this)
)
or
this instanceof ExprStmt and
not exists(ForStmt f | f.getInitialization().getAChild*() = this) and
not exists(LambdaExpression l | l.getLambdaFunction().getBlock().getAChild*() = this)
)
or
this instanceof ExprStmt and
not exists(ForStmt f | f.getInitialization().getAChild*() = this) and
not exists(LambdaExpression l | l.getLambdaFunction().getBlock().getAChild*() = this))
}
}

Expand Down

0 comments on commit 98c7610

Please sign in to comment.