diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2010-05-18 10:33:35 +0200 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2010-05-18 10:33:35 +0200 |
commit | 41882862a2433b578d2edec3b5ecdb702f8c1dcc (patch) | |
tree | 50527cae19992eaf86a8c0f533f62921b4467cb8 /tests/manual/cplusplus/main.cpp | |
parent | 1e1d8e450f3108c42fd2816d424d50a6fa6040b4 (diff) | |
download | qt-creator-41882862a2433b578d2edec3b5ecdb702f8c1dcc.tar.gz |
Compile.
Diffstat (limited to 'tests/manual/cplusplus/main.cpp')
-rw-r--r-- | tests/manual/cplusplus/main.cpp | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/tests/manual/cplusplus/main.cpp b/tests/manual/cplusplus/main.cpp index 0bb6dec6b3..2fbb474328 100644 --- a/tests/manual/cplusplus/main.cpp +++ b/tests/manual/cplusplus/main.cpp @@ -55,39 +55,6 @@ using namespace CPlusPlus; -class ForEachNode: protected ASTVisitor -{ - Document::Ptr doc; - AST *pattern; - -public: - ForEachNode(Document::Ptr doc) - : ASTVisitor(doc->translationUnit()), - matcher() {} - - void operator()() { accept(doc->translationUnit()->ast()); } - -protected: - using ASTVisitor::visit; - - virtual bool preVisit(AST *ast) - { - ir.reset(); - IfStatementAST *pattern = ir.IfStatement(ir.SimpleName()); - - //CompoundStatementAST *pattern = ir.CompoundStatement(); - - if (ast->match(ast, pattern, &matcher)) - translationUnit()->warning(ast->firstToken(), "matched"); - - return true; - } - - - ASTPatternBuilder ir; - ASTMatcher matcher; -}; - int main(int argc, char *argv[]) { QCoreApplication app(argc, argv); @@ -107,9 +74,6 @@ int main(int argc, char *argv[]) doc->control()->setDiagnosticClient(0); doc->setSource(source); doc->parse(); - - ForEachNode forEachNode(doc); - forEachNode(); } return EXIT_SUCCESS; |