C++: Support crement ops in HashCons

This commit is contained in:
Robert Marsh
2018-08-24 11:38:59 -07:00
parent cf222c51ac
commit a8895f4bed
3 changed files with 2 additions and 2 deletions

View File

@@ -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
}

View File

@@ -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 |

View File

@@ -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