diff options
| author | Roberto Raggi <qtc-committer@nokia.com> | 2008-12-03 14:47:02 +0100 |
|---|---|---|
| committer | Roberto Raggi <qtc-committer@nokia.com> | 2008-12-03 14:47:02 +0100 |
| commit | 9394b4dfbcc05523800de6625bffc6123a9893ac (patch) | |
| tree | 54be8bffe2ac9c9f6ea8847483dc7287d72c7380 /shared/cplusplus/Parser.cpp | |
| parent | 4c4602b739cb502c60fb9387e59167f7d5cf9d06 (diff) | |
| download | qt-creator-9394b4dfbcc05523800de6625bffc6123a9893ac.tar.gz | |
Fixed the parsing of class-specifiers when nested in a function definition.
Diffstat (limited to 'shared/cplusplus/Parser.cpp')
| -rw-r--r-- | shared/cplusplus/Parser.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/shared/cplusplus/Parser.cpp b/shared/cplusplus/Parser.cpp index 46618dd112..13fbaa0160 100644 --- a/shared/cplusplus/Parser.cpp +++ b/shared/cplusplus/Parser.cpp @@ -1191,6 +1191,11 @@ bool Parser::parseClassSpecifier(SpecifierAST *&node) NameAST *name = 0; parseName(name); + bool parsed = false; + + const bool previousInFunctionBody = _inFunctionBody; + _inFunctionBody = false; + if (LA() == T_COLON || LA() == T_LBRACE) { BaseSpecifierAST *base_clause = 0; if (LA() == T_COLON) { @@ -1233,9 +1238,12 @@ bool Parser::parseClassSpecifier(SpecifierAST *&node) } } node = ast; - return true; + parsed = true; } - return false; + + _inFunctionBody = previousInFunctionBody; + + return parsed; } bool Parser::parseAccessSpecifier(SpecifierAST *&node) |
