mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
C++: Support crement ops in HashCons
This commit is contained in:
@@ -287,7 +287,6 @@ private predicate mk_BinaryOp(
|
||||
|
||||
private predicate analyzableUnaryOp(UnaryOperation op) {
|
||||
not (op instanceof PointerDereferenceExpr) and
|
||||
op.isPure() and
|
||||
strictcount (op.getOperand().getFullyConverted()) = 1 and
|
||||
strictcount (op.getOperator()) = 1
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
| test.cpp:79:11:79:14 | vals | 79:c11-c14 79:c24-c27 |
|
||||
| test.cpp:92:11:92:11 | x | 92:c11-c11 93:c10-c10 |
|
||||
| test.cpp:97:3:97:3 | x | 97:c3-c3 98:c3-c3 |
|
||||
| test.cpp:97:3:97:5 | ... ++ | 97:c3-c5 98:c3-c5 |
|
||||
| test.cpp:103:10:103:11 | 1 | 103:c10-c11 104:c7-c7 107:c7-c7 108:c7-c7 10:c16-c16 |
|
||||
| test.cpp:104:3:104:3 | x | 104:c3-c3 105:c3-c3 106:c3-c3 107:c3-c3 108:c3-c3 |
|
||||
| test.cpp:105:7:105:7 | 2 | 105:c7-c7 106:c7-c7 107:c11-c11 108:c11-c11 21:c16-c16 |
|
||||
|
||||
@@ -95,7 +95,7 @@ int regression_test00() {
|
||||
|
||||
void test06(int x) {
|
||||
x++;
|
||||
x++; // x is matched but x++ is not matched?
|
||||
x++; // x++ is matched
|
||||
}
|
||||
|
||||
// literals
|
||||
|
||||
Reference in New Issue
Block a user