Commit 7b44f174 authored by Roberto Raggi's avatar Roberto Raggi

Run the binding pass

parent 31e0b433
......@@ -567,3 +567,12 @@ bool Binder::visit(Block *)
} // end of anonymous namespace
NamespaceBindingPtr CPlusPlus::bind(Document::Ptr doc, Snapshot snapshot)
{
NamespaceBindingPtr global(new NamespaceBinding());
Binder bind(global.data());
bind(doc, snapshot);
return global;
}
......@@ -30,7 +30,7 @@
#ifndef CPPBINDINGS_H
#define CPPBINDINGS_H
#include <CPlusPlusForwardDeclarations.h>
#include "CppDocument.h"
#include <QtCore/QList>
#include <QtCore/QSharedPointer>
......@@ -171,6 +171,8 @@ public: // attributes
QList<ClassBinding *> baseClassBindings;
};
CPLUSPLUS_EXPORT NamespaceBindingPtr bind(Document::Ptr doc, Snapshot snapshot);
} // end of namespace CPlusPlus
#endif // CPPBINDINGS_H
......@@ -28,6 +28,7 @@
**************************************************************************/
#include <cplusplus/pp.h>
#include <cplusplus/CppBindings.h>
#include "cppmodelmanager.h"
#include "cpptoolsconstants.h"
......@@ -331,6 +332,10 @@ public:
doc->check();
if (_workingCopy.contains(doc->fileName())) {
// run the binding pass
NamespaceBindingPtr ns = bind(doc, _snapshot);
Q_UNUSED(ns);
// check for undefined symbols.
CheckUndefinedBaseClasses checkUndefinedBaseClasses(doc->control());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment