File tree Expand file tree Collapse file tree 1 file changed +17
-18
lines changed
cpp/autosar/src/rules/A13-2-2 Expand file tree Collapse file tree 1 file changed +17
-18
lines changed Original file line number Diff line number Diff line change 1414 * external/autosar/obligation/required
1515 */
1616
17- import cpp
18- import codingstandards.cpp.autosar
19- import codingstandards.cpp.Operator
20- import semmle.code.cpp.Print
17+ import cpp
18+ import codingstandards.cpp.autosar
19+ import codingstandards.cpp.Operator
20+ import semmle.code.cpp.Print
2121
22- from Operator o
23- where
24- not isExcluded ( o , OperatorInvariantsPackage:: binaryOperatorAndBitwiseOperatorReturnAPrvalueQuery ( ) ) and
25- ( o instanceof UserBitwiseOperator or o instanceof UserArithmeticOperator ) and
26- (
27- o .getType ( ) .isDeeplyConst ( )
28- or
29- o .getType ( ) instanceof PointerType
30- or
31- o .getType ( ) instanceof ReferenceType
32- )
33- select o ,
34- "User-defined bitwise or arithmetic operator " + o .toString ( ) +
35- " does not return a prvalue."
22+ from Operator o
23+ where
24+ not isExcluded ( o , OperatorInvariantsPackage:: binaryOperatorAndBitwiseOperatorReturnAPrvalueQuery ( ) ) and
25+ ( o instanceof UserBitwiseOperator or o instanceof UserArithmeticOperator ) and
26+ (
27+ o .getType ( ) .isDeeplyConst ( )
28+ or
29+ o .getType ( ) instanceof PointerType
30+ or
31+ o .getType ( ) instanceof ReferenceType
32+ )
33+ select o ,
34+ "User-defined bitwise or arithmetic operator " + o .toString ( ) + " does not return a prvalue."
You can’t perform that action at this time.
0 commit comments