From 5de57ddad398e2da73dc5c2542270e3a64c3690c Mon Sep 17 00:00:00 2001
From: Roberto Raggi <roberto.raggi@nokia.com>
Date: Fri, 13 Aug 2010 14:00:27 +0200
Subject: [PATCH] Test the new binder.

---
 tests/manual/plain-cplusplus/main.cpp | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/tests/manual/plain-cplusplus/main.cpp b/tests/manual/plain-cplusplus/main.cpp
index 7257d694b2e..0ab0dd47cc9 100644
--- a/tests/manual/plain-cplusplus/main.cpp
+++ b/tests/manual/plain-cplusplus/main.cpp
@@ -32,12 +32,12 @@
 #include <ASTVisitor.h>
 #include <Control.h>
 #include <Scope.h>
-#include <Semantic.h>
 #include <TranslationUnit.h>
 #include <Literals.h>
 #include <Symbols.h>
 #include <Names.h>
 #include <CoreTypes.h>
+#include <Bind.h>
 
 #include <string>
 #include <cstdlib>
@@ -126,11 +126,7 @@ void parse(const char *fileName, const char *source, unsigned size)
     unit.setSource(source, size);
     unit.parse();
 
-    if (TranslationUnitAST *ast = unit.ast()->asTranslationUnit()) {
-        Semantic sem(&unit);
-        Namespace *globalNamespace = control.newNamespace(0);
-        for (List<DeclarationAST *> *it = ast->declaration_list; it; it = it->next) {
-            sem.check(it->value, globalNamespace);
-        }
-    }
+    Namespace *globalNamespace = control.newNamespace(0);
+    Bind bind(&unit);
+    bind(unit.ast()->asTranslationUnit(), globalNamespace);
 }
-- 
GitLab