summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@nokia.com>2010-02-10 11:04:31 +0100
committerErik Verbruggen <erik.verbruggen@nokia.com>2010-02-10 11:07:18 +0100
commit9806b1e165a4575aef0243139b02b189584b28e3 (patch)
treee6a6b6a8868f360d26c5aad232d25469d3dcb146 /src/shared/cplusplus
parentb1af22b3ab5e40e47ccf51aef67a508bff7592b2 (diff)
downloadqt-creator-9806b1e165a4575aef0243139b02b189584b28e3.tar.gz
Fixed pre-precessor bug.
When a PP line ended with a \ (join line) and the next line was empty (ending th joining), the following token would be incorrectly marked as joined. Done-with: Roberto Raggi
Diffstat (limited to 'src/shared/cplusplus')
-rw-r--r--src/shared/cplusplus/Lexer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/shared/cplusplus/Lexer.cpp b/src/shared/cplusplus/Lexer.cpp
index 8d806471f2..9a71ccfa7e 100644
--- a/src/shared/cplusplus/Lexer.cpp
+++ b/src/shared/cplusplus/Lexer.cpp
@@ -180,10 +180,12 @@ void Lexer::scan_helper(Token *tok)
{
_Lagain:
while (_yychar && std::isspace(_yychar)) {
- if (_yychar == '\n')
+ if (_yychar == '\n') {
+ tok->f.joined = false;
tok->f.newline = true;
- else
+ } else {
tok->f.whitespace = true;
+ }
yyinp();
}