Skip to content
GitLab
Menu
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
146ec624
Commit
146ec624
authored
Oct 21, 2009
by
Roberto Raggi
Browse files
Renamed Preprocessor::_true_test
parent
5b7a1942
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/libs/cplusplus/pp-engine.cpp
View file @
146ec624
...
...
@@ -546,7 +546,7 @@ Preprocessor::Preprocessor(Client *client, Environment *env)
env
(
env
),
_expand
(
env
),
_skipping
(
MAX_LEVEL
),
_true
_t
est
(
MAX_LEVEL
),
_true
T
est
(
MAX_LEVEL
),
_result
(
0
),
_markGeneratedTokens
(
false
),
_expandMacros
(
true
)
...
...
@@ -1270,7 +1270,7 @@ void Preprocessor::processIf(TokenIterator firstToken, TokenIterator lastToken)
tokens
.
constEnd
()
-
1
,
condition
);
_true
_t
est
[
iflevel
]
=
!
result
.
is_zero
();
_true
T
est
[
iflevel
]
=
!
result
.
is_zero
();
_skipping
[
iflevel
]
=
result
.
is_zero
();
}
}
...
...
@@ -1284,7 +1284,7 @@ void Preprocessor::processElse(TokenIterator firstToken, TokenIterator lastToken
}
else
if
(
iflevel
>
0
&&
_skipping
[
iflevel
-
1
])
{
_skipping
[
iflevel
]
=
true
;
}
else
{
_skipping
[
iflevel
]
=
_true
_t
est
[
iflevel
];
_skipping
[
iflevel
]
=
_true
T
est
[
iflevel
];
}
}
...
...
@@ -1298,7 +1298,7 @@ void Preprocessor::processElif(TokenIterator firstToken, TokenIterator lastToken
// std::cerr << "*** WARNING: " << __FILE__ << __LINE__ << std::endl;
}
else
if
(
iflevel
==
0
&&
!
skipping
())
{
// std::cerr << "*** WARNING #else without #if" << std::endl;
}
else
if
(
!
_true
_t
est
[
iflevel
]
&&
!
_skipping
[
iflevel
-
1
])
{
}
else
if
(
!
_true
T
est
[
iflevel
]
&&
!
_skipping
[
iflevel
-
1
])
{
const
char
*
first
=
startOfToken
(
*
tk
);
const
char
*
last
=
startOfToken
(
*
lastToken
);
...
...
@@ -1314,7 +1314,7 @@ void Preprocessor::processElif(TokenIterator firstToken, TokenIterator lastToken
tokens
.
constEnd
()
-
1
,
condition
);
_true
_t
est
[
iflevel
]
=
!
result
.
is_zero
();
_true
T
est
[
iflevel
]
=
!
result
.
is_zero
();
_skipping
[
iflevel
]
=
result
.
is_zero
();
}
else
{
_skipping
[
iflevel
]
=
true
;
...
...
@@ -1327,7 +1327,7 @@ void Preprocessor::processEndif(TokenIterator, TokenIterator)
// std::cerr << "*** WARNING #endif without #if" << std::endl;
}
else
{
_skipping
[
iflevel
]
=
false
;
_true
_t
est
[
iflevel
]
=
false
;
_true
T
est
[
iflevel
]
=
false
;
--
iflevel
;
}
...
...
@@ -1349,7 +1349,7 @@ void Preprocessor::processIfdef(bool checkUndefined,
if
(
checkUndefined
)
value
=
!
value
;
_true
_t
est
[
iflevel
]
=
value
;
_true
T
est
[
iflevel
]
=
value
;
_skipping
[
iflevel
]
=
!
value
;
}
}
...
...
@@ -1375,7 +1375,7 @@ void Preprocessor::resetIfLevel ()
{
iflevel
=
0
;
_skipping
[
iflevel
]
=
false
;
_true
_t
est
[
iflevel
]
=
false
;
_true
T
est
[
iflevel
]
=
false
;
}
Preprocessor
::
PP_DIRECTIVE_TYPE
Preprocessor
::
classifyDirective
(
const
QByteArray
&
directive
)
const
...
...
@@ -1433,7 +1433,7 @@ bool Preprocessor::testIfLevel()
{
const
bool
result
=
!
_skipping
[
iflevel
++
];
_skipping
[
iflevel
]
=
_skipping
[
iflevel
-
1
];
_true
_t
est
[
iflevel
]
=
false
;
_true
T
est
[
iflevel
]
=
false
;
return
result
;
}
...
...
src/libs/cplusplus/pp-engine.h
View file @
146ec624
...
...
@@ -179,7 +179,7 @@ private:
MacroExpander
_expand
;
QBitArray
_skipping
;
// ### move in state
QBitArray
_true
_t
est
;
// ### move in state
QBitArray
_true
T
est
;
// ### move in state
int
iflevel
;
// ### move in state
QList
<
State
>
_savedStates
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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