diff options
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Tooling/clang-diff-basic.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/clang/test/Tooling/clang-diff-basic.cpp b/clang/test/Tooling/clang-diff-basic.cpp index ac676991e99..e70171509d0 100644 --- a/clang/test/Tooling/clang-diff-basic.cpp +++ b/clang/test/Tooling/clang-diff-basic.cpp @@ -31,6 +31,10 @@ public: int id(int i) { return i; } }; } + +void m() { int x = 0 + 0 + 0; } +int um = 1 + 2 + 3; + #else // CHECK: Match TranslationUnitDecl{{.*}} to TranslationUnitDecl // CHECK: Match NamespaceDecl: src{{.*}} to NamespaceDecl: dst @@ -54,8 +58,8 @@ const char *b = "f" "o" "o"; typedef unsigned nat; // CHECK: Match VarDecl: p(int){{.*}} to VarDecl: prod(double) -// CHECK: Match BinaryOperator: *{{.*}} to BinaryOperator: * // CHECK: Update VarDecl: p(int){{.*}} to prod(double) +// CHECK: Match BinaryOperator: *{{.*}} to BinaryOperator: * double prod = 1 * 2 * 10; // CHECK: Update DeclRefExpr int squared = prod * prod; @@ -70,9 +74,15 @@ class X { return "foo"; return 0; } - // CHECK: Delete AccessSpecDecl: public - X(){}; - // CHECK: Delete CXXMethodDecl + X(){} }; } + +// CHECK: Move DeclStmt{{.*}} into CompoundStmt +void m() { { int x = 0 + 0 + 0; } } +// CHECK: Update and Move IntegerLiteral: 7{{.*}} into BinaryOperator: +({{.*}}) at 1 +int um = 1 + 7; #endif + +// CHECK: Delete AccessSpecDecl: public +// CHECK: Delete CXXMethodDecl |

