diff options
author | Erik Verbruggen <erik.verbruggen@nokia.com> | 2010-02-04 16:31:29 +0100 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@nokia.com> | 2010-02-07 10:49:02 +0100 |
commit | 6ca5f5f5f886449f88d1ff7085f640c46bbc8fb2 (patch) | |
tree | ddad79f8d3a8111c63df9c6a7400787e8a345d9f /src/shared/cplusplus/CheckStatement.h | |
parent | fd90c3503db076b95f2e97455e9e8fcf9c374a88 (diff) | |
download | qt-creator-6ca5f5f5f886449f88d1ff7085f640c46bbc8fb2.tar.gz |
Added semantic checks for compound expressions.
Diffstat (limited to 'src/shared/cplusplus/CheckStatement.h')
-rw-r--r-- | src/shared/cplusplus/CheckStatement.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/shared/cplusplus/CheckStatement.h b/src/shared/cplusplus/CheckStatement.h index 5c1b1ff02d..dc8447f37e 100644 --- a/src/shared/cplusplus/CheckStatement.h +++ b/src/shared/cplusplus/CheckStatement.h @@ -50,9 +50,9 @@ #define CPLUSPLUS_CHECKSTATEMENT_H #include "CPlusPlusForwardDeclarations.h" +#include "FullySpecifiedType.h" #include "SemanticCheck.h" - namespace CPlusPlus { class CPLUSPLUS_EXPORT CheckStatement: public SemanticCheck @@ -61,9 +61,10 @@ public: CheckStatement(Semantic *semantic); virtual ~CheckStatement(); - void check(StatementAST *statement, Scope *scope); + FullySpecifiedType check(StatementAST *statement, Scope *scope); protected: + FullySpecifiedType switchExprType(const FullySpecifiedType &type); StatementAST *switchStatement(StatementAST *statement); Scope *switchScope(Scope *scope); @@ -98,9 +99,12 @@ protected: ExpressionAST *expression, StatementAST *statement, Block *&symbol); + FullySpecifiedType checkCompoundStmt(CompoundStatementAST *stmt); + private: StatementAST *_statement; Scope *_scope; + FullySpecifiedType _exprType; }; } // end of namespace CPlusPlus |