Skip to content

Commit 34ae3bd

Browse files
committed
A8-4-7: exclude user defined operators and special functions
1 parent f99713a commit 34ae3bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpp/autosar/src/rules/A8-4-7/InParametersForCheapToCopyTypesNotPassedByValue.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import cpp
1717
import codingstandards.cpp.autosar
1818
import TriviallySmallType
1919
import codingstandards.cpp.CommonTypes as CommonTypes
20+
import codingstandards.cpp.Class
2021

2122
/*
2223
* For the purposes of this rule, "cheap to copy" is defined as a trivially copyable type that is no
@@ -34,8 +35,7 @@ where
3435
) and
3536
t.isConst() and
3637
not exists(CatchBlock cb | cb.getParameter() = v) and
37-
not exists(CopyConstructor cc | cc.getAParameter() = v) and
38-
not exists(MoveConstructor mc | mc.getAParameter() = v) and
38+
not exists(SpecialMemberFunction cc | cc.getAParameter() = v) and
3939
not exists(Operator op | op.getAParameter() = v) and
4040
not v.isFromUninstantiatedTemplate(_)
4141
select v,

0 commit comments

Comments
 (0)