Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
6659e3ec
Commit
6659e3ec
authored
Aug 13, 2010
by
Roberto Raggi
Browse files
Use the new binder
parent
f79187ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/libs/cplusplus/CppDocument.cpp
View file @
6659e3ec
...
...
@@ -31,6 +31,7 @@
#include
"FastPreprocessor.h"
#include
"LookupContext.h"
#include
"Overview.h"
#include
"Bind.h"
#include
<Control.h>
#include
<TranslationUnit.h>
...
...
@@ -545,21 +546,18 @@ void Document::check(CheckMode mode)
if
(
!
isParsed
())
parse
();
Semantic
semantic
(
_translationUnit
);
_globalNamespace
=
_control
->
newNamespace
(
0
);
Bind
semantic
(
_translationUnit
);
if
(
mode
==
FastCheck
)
semantic
.
setSkipFunctionBodies
(
true
);
_globalNamespace
=
_control
->
newNamespace
(
0
);
Scope
*
globals
=
_globalNamespace
;
if
(
!
_translationUnit
->
ast
())
return
;
// nothing to do.
if
(
TranslationUnitAST
*
ast
=
_translationUnit
->
ast
()
->
asTranslationUnit
())
{
for
(
DeclarationListAST
*
decl
=
ast
->
declaration_list
;
decl
;
decl
=
decl
->
next
)
{
semantic
.
check
(
decl
->
value
,
globals
);
}
semantic
(
ast
,
_globalNamespace
);
}
else
if
(
ExpressionAST
*
ast
=
_translationUnit
->
ast
()
->
asExpression
())
{
semantic
.
check
(
ast
,
global
s
);
semantic
(
ast
,
_
global
Namespace
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment