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
Marco Bubke
flatpak-qt-creator
Commits
d0abb5da
Commit
d0abb5da
authored
Dec 15, 2009
by
Roberto Raggi
Browse files
Run the semantic passes.
parent
51de95c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/manual/plain-cplusplus/main.cpp
View file @
d0abb5da
...
...
@@ -40,7 +40,7 @@
#include
<string>
#include
<cstdlib>
#include
<
c
st
dlib
>
#include
<
s
st
ream
>
using
namespace
CPlusPlus
;
...
...
@@ -75,5 +75,13 @@ int main(int argc, char *argv[])
unit
.
setSource
(
source
.
c_str
(),
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
->
members
());
}
}
return
EXIT_SUCCESS
;
}
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